VirtualBox

Ignore:
Timestamp:
Apr 14, 2023 3:17:44 PM (2 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
156854
Message:

Devices/EFI/FirmwareNew: Update to edk2-stable202302 and make it build, 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/MdePkg/Include/Pi/PiHob.h

    r80721 r99404  
    4949} EFI_HOB_GENERIC_HEADER;
    5050
    51 
    5251///
    5352/// Value of version  in EFI_HOB_HANDOFF_INFO_TABLE.
    5453///
    55 #define EFI_HOB_HANDOFF_TABLE_VERSION 0x0009
     54#define EFI_HOB_HANDOFF_TABLE_VERSION  0x0009
    5655
    5756///
     
    6362  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_HANDOFF.
    6463  ///
    65   EFI_HOB_GENERIC_HEADER  Header;
     64  EFI_HOB_GENERIC_HEADER    Header;
    6665  ///
    6766  /// The version number pertaining to the PHIT HOB definition.
     
    6968  /// when it is combined with the 4-byte BootMode.
    7069  ///
    71   UINT32                  Version;
     70  UINT32                    Version;
    7271  ///
    7372  /// The system boot mode as determined during the HOB producer phase.
    7473  ///
    75   EFI_BOOT_MODE           BootMode;
     74  EFI_BOOT_MODE             BootMode;
    7675  ///
    7776  /// The highest address location of memory that is allocated for use by the HOB producer
    7877  /// phase. This address must be 4-KB aligned to meet page restrictions of UEFI.
    7978  ///
    80   EFI_PHYSICAL_ADDRESS    EfiMemoryTop;
     79  EFI_PHYSICAL_ADDRESS      EfiMemoryTop;
    8180  ///
    8281  /// The lowest address location of memory that is allocated for use by the HOB producer phase.
    8382  ///
    84   EFI_PHYSICAL_ADDRESS    EfiMemoryBottom;
     83  EFI_PHYSICAL_ADDRESS      EfiMemoryBottom;
    8584  ///
    8685  /// The highest address location of free memory that is currently available
    8786  /// for use by the HOB producer phase.
    8887  ///
    89   EFI_PHYSICAL_ADDRESS    EfiFreeMemoryTop;
     88  EFI_PHYSICAL_ADDRESS      EfiFreeMemoryTop;
    9089  ///
    9190  /// The lowest address location of free memory that is available for use by the HOB producer phase.
    9291  ///
    93   EFI_PHYSICAL_ADDRESS    EfiFreeMemoryBottom;
     92  EFI_PHYSICAL_ADDRESS      EfiFreeMemoryBottom;
    9493  ///
    9594  /// The end of the HOB list.
    9695  ///
    97   EFI_PHYSICAL_ADDRESS    EfiEndOfHobList;
     96  EFI_PHYSICAL_ADDRESS      EfiEndOfHobList;
    9897} EFI_HOB_HANDOFF_INFO_TABLE;
    9998
     
    111110  /// specification.
    112111  ///
    113   EFI_GUID              Name;
     112  EFI_GUID                Name;
    114113
    115114  ///
     
    118117  /// specification.
    119118  ///
    120   EFI_PHYSICAL_ADDRESS  MemoryBaseAddress;
     119  EFI_PHYSICAL_ADDRESS    MemoryBaseAddress;
    121120
    122121  ///
    123122  /// The length in bytes of memory allocated by this HOB.
    124123  ///
    125   UINT64                MemoryLength;
     124  UINT64                  MemoryLength;
    126125
    127126  ///
     
    130129  /// in AllocatePages() in the UEFI 2.0 specification.
    131130  ///
    132   EFI_MEMORY_TYPE       MemoryType;
     131  EFI_MEMORY_TYPE         MemoryType;
    133132
    134133  ///
    135134  /// Padding for Itanium processor family
    136135  ///
    137   UINT8                 Reserved[4];
     136  UINT8                   Reserved[4];
    138137} EFI_HOB_MEMORY_ALLOCATION_HEADER;
    139138
     
    147146  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.
    148147  ///
    149   EFI_HOB_GENERIC_HEADER            Header;
     148  EFI_HOB_GENERIC_HEADER              Header;
    150149  ///
    151150  /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the
    152151  /// various attributes of the logical memory allocation.
    153152  ///
    154   EFI_HOB_MEMORY_ALLOCATION_HEADER  AllocDescriptor;
     153  EFI_HOB_MEMORY_ALLOCATION_HEADER    AllocDescriptor;
    155154  //
    156155  // Additional data pertaining to the "Name" Guid memory
     
    159158} EFI_HOB_MEMORY_ALLOCATION;
    160159
    161 
    162160///
    163161/// Describes the memory stack that is produced by the HOB producer
     
    169167  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.
    170168  ///
    171   EFI_HOB_GENERIC_HEADER            Header;
     169  EFI_HOB_GENERIC_HEADER              Header;
    172170  ///
    173171  /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the
    174172  /// various attributes of the logical memory allocation.
    175173  ///
    176   EFI_HOB_MEMORY_ALLOCATION_HEADER  AllocDescriptor;
     174  EFI_HOB_MEMORY_ALLOCATION_HEADER    AllocDescriptor;
    177175} EFI_HOB_MEMORY_ALLOCATION_STACK;
    178176
     
    187185  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.
    188186  ///
    189   EFI_HOB_GENERIC_HEADER            Header;
     187  EFI_HOB_GENERIC_HEADER              Header;
    190188  ///
    191189  /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the
    192190  /// various attributes of the logical memory allocation.
    193191  ///
    194   EFI_HOB_MEMORY_ALLOCATION_HEADER  AllocDescriptor;
     192  EFI_HOB_MEMORY_ALLOCATION_HEADER    AllocDescriptor;
    195193} EFI_HOB_MEMORY_ALLOCATION_BSP_STORE;
    196194
     
    202200  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.
    203201  ///
    204   EFI_HOB_GENERIC_HEADER            Header;
     202  EFI_HOB_GENERIC_HEADER              Header;
    205203  ///
    206204  /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the
    207205  /// various attributes of the logical memory allocation.
    208206  ///
    209   EFI_HOB_MEMORY_ALLOCATION_HEADER  MemoryAllocationHeader;
     207  EFI_HOB_MEMORY_ALLOCATION_HEADER    MemoryAllocationHeader;
    210208  ///
    211209  /// The GUID specifying the values of the firmware file system name
    212210  /// that contains the HOB consumer phase component.
    213211  ///
    214   EFI_GUID                          ModuleName;
     212  EFI_GUID                            ModuleName;
    215213  ///
    216214  /// The address of the memory-mapped firmware volume
    217215  /// that contains the HOB consumer phase firmware file.
    218216  ///
    219   EFI_PHYSICAL_ADDRESS              EntryPoint;
     217  EFI_PHYSICAL_ADDRESS                EntryPoint;
    220218} EFI_HOB_MEMORY_ALLOCATION_MODULE;
    221219
     
    235233#define EFI_RESOURCE_MEMORY_RESERVED        0x00000005
    236234#define EFI_RESOURCE_IO_RESERVED            0x00000006
    237 #define EFI_RESOURCE_MAX_MEMORY_TYPE        0x00000007
     235//
     236// BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED is defined for unaccepted memory.
     237// But this defitinion has not been officially in the PI spec. Base
     238// on the code-first we define BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED at
     239// MdeModulePkg/Include/Pi/PrePiHob.h and update EFI_RESOURCE_MAX_MEMORY_TYPE
     240// to 8. After BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED is officially published
     241// in PI spec, we will re-visit here.
     242//
     243// #define BZ3937_EFI_RESOURCE_MEMORY_UNACCEPTED      0x00000007
     244#define EFI_RESOURCE_MAX_MEMORY_TYPE  0x00000008
    238245
    239246///
     
    247254// The following attributes are used to describe settings
    248255//
    249 #define EFI_RESOURCE_ATTRIBUTE_PRESENT                  0x00000001
    250 #define EFI_RESOURCE_ATTRIBUTE_INITIALIZED              0x00000002
    251 #define EFI_RESOURCE_ATTRIBUTE_TESTED                   0x00000004
    252 #define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED           0x00000080
     256#define EFI_RESOURCE_ATTRIBUTE_PRESENT         0x00000001
     257#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED     0x00000002
     258#define EFI_RESOURCE_ATTRIBUTE_TESTED          0x00000004
     259#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED  0x00000080
    253260//
    254261// This is typically used as memory cacheability attribute today.
     
    258265// a writeprotected cacheable attribute.
    259266//
    260 #define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED          0x00000100
    261 #define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED      0x00000200
    262 #define EFI_RESOURCE_ATTRIBUTE_PERSISTENT               0x00800000
     267#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED      0x00000100
     268#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED  0x00000200
     269#define EFI_RESOURCE_ATTRIBUTE_PERSISTENT           0x00800000
    263270//
    264271// The rest of the attributes are used to describe capabilities
     
    284291// The memory supports being programmed with a writeprotected cacheable attribute.
    285292//
    286 #define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE        0x00200000
    287 #define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE    0x00400000
    288 #define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE              0x01000000
    289 
    290 #define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED      0x00040000
    291 #define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE    0x00080000
     293#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE      0x00200000
     294#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE  0x00400000
     295#define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE            0x01000000
     296
     297#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED    0x00040000
     298#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE  0x00080000
    292299
    293300//
     
    297304// reliability, then this bit is not used.
    298305//
    299 #define EFI_RESOURCE_ATTRIBUTE_MORE_RELIABLE            0x02000000
     306#define EFI_RESOURCE_ATTRIBUTE_MORE_RELIABLE  0x02000000
    300307
    301308///
     
    308315  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_RESOURCE_DESCRIPTOR.
    309316  ///
    310   EFI_HOB_GENERIC_HEADER      Header;
     317  EFI_HOB_GENERIC_HEADER         Header;
    311318  ///
    312319  /// A GUID representing the owner of the resource. This GUID is used by HOB
    313320  /// consumer phase components to correlate device ownership of a resource.
    314321  ///
    315   EFI_GUID                    Owner;
     322  EFI_GUID                       Owner;
    316323  ///
    317324  /// The resource type enumeration as defined by EFI_RESOURCE_TYPE.
    318325  ///
    319   EFI_RESOURCE_TYPE           ResourceType;
     326  EFI_RESOURCE_TYPE              ResourceType;
    320327  ///
    321328  /// Resource attributes as defined by EFI_RESOURCE_ATTRIBUTE_TYPE.
    322329  ///
    323   EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;
     330  EFI_RESOURCE_ATTRIBUTE_TYPE    ResourceAttribute;
    324331  ///
    325332  /// The physical start address of the resource region.
    326333  ///
    327   EFI_PHYSICAL_ADDRESS        PhysicalStart;
     334  EFI_PHYSICAL_ADDRESS           PhysicalStart;
    328335  ///
    329336  /// The number of bytes of the resource region.
    330337  ///
    331   UINT64                      ResourceLength;
     338  UINT64                         ResourceLength;
    332339} EFI_HOB_RESOURCE_DESCRIPTOR;
    333340
     
    340347  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_GUID_EXTENSION.
    341348  ///
    342   EFI_HOB_GENERIC_HEADER      Header;
     349  EFI_HOB_GENERIC_HEADER    Header;
    343350  ///
    344351  /// A GUID that defines the contents of this HOB.
    345352  ///
    346   EFI_GUID                    Name;
     353  EFI_GUID                  Name;
    347354  //
    348355  // Guid specific data goes here
     
    357364  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV.
    358365  ///
    359   EFI_HOB_GENERIC_HEADER Header;
     366  EFI_HOB_GENERIC_HEADER    Header;
    360367  ///
    361368  /// The physical memory-mapped base address of the firmware volume.
    362369  ///
    363   EFI_PHYSICAL_ADDRESS   BaseAddress;
     370  EFI_PHYSICAL_ADDRESS      BaseAddress;
    364371  ///
    365372  /// The length in bytes of the firmware volume.
    366373  ///
    367   UINT64                 Length;
     374  UINT64                    Length;
    368375} EFI_HOB_FIRMWARE_VOLUME;
    369376
     
    376383  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV2.
    377384  ///
    378   EFI_HOB_GENERIC_HEADER  Header;
     385  EFI_HOB_GENERIC_HEADER    Header;
    379386  ///
    380387  /// The physical memory-mapped base address of the firmware volume.
    381388  ///
    382   EFI_PHYSICAL_ADDRESS    BaseAddress;
     389  EFI_PHYSICAL_ADDRESS      BaseAddress;
    383390  ///
    384391  /// The length in bytes of the firmware volume.
    385392  ///
    386   UINT64                  Length;
     393  UINT64                    Length;
    387394  ///
    388395  /// The name of the firmware volume.
    389396  ///
    390   EFI_GUID                FvName;
     397  EFI_GUID                  FvName;
    391398  ///
    392399  /// The name of the firmware file that contained this firmware volume.
    393400  ///
    394   EFI_GUID                FileName;
     401  EFI_GUID                  FileName;
    395402} EFI_HOB_FIRMWARE_VOLUME2;
    396403
     
    403410  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV3.
    404411  ///
    405   EFI_HOB_GENERIC_HEADER  Header;
     412  EFI_HOB_GENERIC_HEADER    Header;
    406413  ///
    407414  /// The physical memory-mapped base address of the firmware volume.
    408415  ///
    409   EFI_PHYSICAL_ADDRESS    BaseAddress;
     416  EFI_PHYSICAL_ADDRESS      BaseAddress;
    410417  ///
    411418  /// The length in bytes of the firmware volume.
    412419  ///
    413   UINT64                  Length;
     420  UINT64                    Length;
    414421  ///
    415422  /// The authentication status.
    416423  ///
    417   UINT32                  AuthenticationStatus;
     424  UINT32                    AuthenticationStatus;
    418425  ///
    419426  /// TRUE if the FV was extracted as a file within another firmware volume.
    420427  /// FALSE otherwise.
    421428  ///
    422   BOOLEAN                 ExtractedFv;
     429  BOOLEAN                   ExtractedFv;
    423430  ///
    424431  /// The name of the firmware volume.
    425432  /// Valid only if IsExtractedFv is TRUE.
    426433  ///
    427   EFI_GUID                FvName;
     434  EFI_GUID                  FvName;
    428435  ///
    429436  /// The name of the firmware file that contained this firmware volume.
    430437  /// Valid only if IsExtractedFv is TRUE.
    431438  ///
    432   EFI_GUID                FileName;
     439  EFI_GUID                  FileName;
    433440} EFI_HOB_FIRMWARE_VOLUME3;
    434441
     
    440447  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_CPU.
    441448  ///
    442   EFI_HOB_GENERIC_HEADER  Header;
     449  EFI_HOB_GENERIC_HEADER    Header;
    443450  ///
    444451  /// Identifies the maximum physical memory addressability of the processor.
    445452  ///
    446   UINT8                   SizeOfMemorySpace;
     453  UINT8                     SizeOfMemorySpace;
    447454  ///
    448455  /// Identifies the maximum physical I/O addressability of the processor.
    449456  ///
    450   UINT8                   SizeOfIoSpace;
     457  UINT8                     SizeOfIoSpace;
    451458  ///
    452459  /// This field will always be set to zero.
    453460  ///
    454   UINT8                   Reserved[6];
     461  UINT8                     Reserved[6];
    455462} EFI_HOB_CPU;
    456463
    457 
    458464///
    459465/// Describes pool memory allocations.
     
    463469  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_POOL.
    464470  ///
    465   EFI_HOB_GENERIC_HEADER  Header;
     471  EFI_HOB_GENERIC_HEADER    Header;
    466472} EFI_HOB_MEMORY_POOL;
    467473
     
    477483  /// The HOB generic header where Header.HobType = EFI_HOB_TYPE_UEFI_CAPSULE.
    478484  ///
    479   EFI_HOB_GENERIC_HEADER Header;
     485  EFI_HOB_GENERIC_HEADER    Header;
    480486
    481487  ///
     
    484490  /// The length of the contiguous memory in bytes.
    485491  ///
    486   EFI_PHYSICAL_ADDRESS   BaseAddress;
    487   UINT64                 Length;
     492  EFI_PHYSICAL_ADDRESS      BaseAddress;
     493  UINT64                    Length;
    488494} EFI_HOB_UEFI_CAPSULE;
    489495
     
    492498///
    493499typedef union {
    494   EFI_HOB_GENERIC_HEADER              *Header;
    495   EFI_HOB_HANDOFF_INFO_TABLE          *HandoffInformationTable;
    496   EFI_HOB_MEMORY_ALLOCATION           *MemoryAllocation;
    497   EFI_HOB_MEMORY_ALLOCATION_BSP_STORE *MemoryAllocationBspStore;
    498   EFI_HOB_MEMORY_ALLOCATION_STACK     *MemoryAllocationStack;
    499   EFI_HOB_MEMORY_ALLOCATION_MODULE    *MemoryAllocationModule;
    500   EFI_HOB_RESOURCE_DESCRIPTOR         *ResourceDescriptor;
    501   EFI_HOB_GUID_TYPE                   *Guid;
    502   EFI_HOB_FIRMWARE_VOLUME             *FirmwareVolume;
    503   EFI_HOB_FIRMWARE_VOLUME2            *FirmwareVolume2;
    504   EFI_HOB_FIRMWARE_VOLUME3            *FirmwareVolume3;
    505   EFI_HOB_CPU                         *Cpu;
    506   EFI_HOB_MEMORY_POOL                 *Pool;
    507   EFI_HOB_UEFI_CAPSULE                *Capsule;
    508   UINT8                               *Raw;
     500  EFI_HOB_GENERIC_HEADER                 *Header;
     501  EFI_HOB_HANDOFF_INFO_TABLE             *HandoffInformationTable;
     502  EFI_HOB_MEMORY_ALLOCATION              *MemoryAllocation;
     503  EFI_HOB_MEMORY_ALLOCATION_BSP_STORE    *MemoryAllocationBspStore;
     504  EFI_HOB_MEMORY_ALLOCATION_STACK        *MemoryAllocationStack;
     505  EFI_HOB_MEMORY_ALLOCATION_MODULE       *MemoryAllocationModule;
     506  EFI_HOB_RESOURCE_DESCRIPTOR            *ResourceDescriptor;
     507  EFI_HOB_GUID_TYPE                      *Guid;
     508  EFI_HOB_FIRMWARE_VOLUME                *FirmwareVolume;
     509  EFI_HOB_FIRMWARE_VOLUME2               *FirmwareVolume2;
     510  EFI_HOB_FIRMWARE_VOLUME3               *FirmwareVolume3;
     511  EFI_HOB_CPU                            *Cpu;
     512  EFI_HOB_MEMORY_POOL                    *Pool;
     513  EFI_HOB_UEFI_CAPSULE                   *Capsule;
     514  UINT8                                  *Raw;
    509515} EFI_PEI_HOB_POINTERS;
    510516
    511 
    512517#endif
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