VirtualBox

Ignore:
Timestamp:
Mar 31, 2025 11:31:09 AM (2 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168237
Message:

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

Location:
trunk/src/VBox/Devices/EFI/FirmwareNew
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/EFI/FirmwareNew

  • trunk/src/VBox/Devices/EFI/FirmwareNew/FatPkg/EnhancedFatDxe/Fat.h

    r99404 r108794  
    8585#define FAT_FATCACHE_GROUP_MAX_COUNT      16
    8686
     87// For cache block bits, use a UINT64
     88typedef UINT64 DIRTY_BLOCKS;
     89#define BITS_PER_BYTE         8
     90#define DIRTY_BITS_PER_BLOCK  ((sizeof (DIRTY_BLOCKS) * BITS_PER_BYTE))
     91
     92// largest cache line (64KB) / MinLbaSize (512) = 128 bits
     93#define DIRTY_BITS  ((1 << FAT_DATACACHE_PAGE_MAX_ALIGNMENT) / (1 << MIN_BLOCK_ALIGNMENT))
     94
     95// Number of DIRTY_BLOCKS to hold DIRTY_BITS bits.
     96#define DIRTY_BLOCKS_SIZE  (DIRTY_BITS / sizeof (DIRTY_BLOCKS))
     97
     98STATIC_ASSERT ((((1 << FAT_DATACACHE_PAGE_MAX_ALIGNMENT) / (1 << MIN_BLOCK_ALIGNMENT)) % sizeof (DIRTY_BLOCKS)) == 0, "DIRTY_BLOCKS not a proper size");
     99
    87100//
    88101// Used in 8.3 generation algorithm
     
    144157//
    145158typedef struct {
    146   UINTN      PageNo;
    147   UINTN      RealSize;
    148   BOOLEAN    Dirty;
     159  UINTN           PageNo;
     160  UINTN           RealSize;
     161  BOOLEAN         Dirty;
     162  DIRTY_BLOCKS    DirtyBlocks[DIRTY_BLOCKS_SIZE];
    149163} CACHE_TAG;
    150164
     
    153167  UINT64       LimitAddress;
    154168  UINT8        *CacheBase;
     169  UINT32       BlockSize;
    155170  BOOLEAN      Dirty;
    156171  UINT8        PageAlignment;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette