Moved '_' symbol in structure definitions to comply with C/C++ standards

Thanks to @elfring
This commit is contained in:
Nikolaj Schlej 2016-04-09 13:47:28 +02:00
parent ba0779b415
commit d6909fe9b6
9 changed files with 69 additions and 69 deletions

View File

@ -32,7 +32,7 @@ Providing both EFI and Tiano decompress algorithms.
extern "C" { extern "C" {
#endif #endif
typedef struct { typedef struct EFI_TIANO_HEADER_ {
UINT32 CompSize; UINT32 CompSize;
UINT32 OrigSize; UINT32 OrigSize;
} EFI_TIANO_HEADER; } EFI_TIANO_HEADER;

View File

@ -137,12 +137,12 @@ typedef UINT8 STATUS;
#define SEARCH_MODE_ALL 3 #define SEARCH_MODE_ALL 3
// EFI GUID // EFI GUID
typedef struct _EFI_GUID { typedef struct EFI_GUID_ {
UINT8 Data[16]; UINT8 Data[16];
} EFI_GUID; } EFI_GUID;
// EFI Time // EFI Time
typedef struct _EFI_TIME { typedef struct EFI_TIME_ {
UINT16 Year; // Year: 2000 - 20XX UINT16 Year; // Year: 2000 - 20XX
UINT8 Month; // Month: 1 - 12 UINT8 Month; // Month: 1 - 12
UINT8 Day; // Day: 1 - 31 UINT8 Day; // Day: 1 - 31

View File

@ -19,7 +19,7 @@ WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
#pragma pack(push,1) #pragma pack(push,1)
// Flash descriptor header // Flash descriptor header
typedef struct _FLASH_DESCRIPTOR_HEADER { typedef struct FLASH_DESCRIPTOR_HEADER_ {
UINT8 ReservedVector[16]; // Reserved for ARM ResetVector, 0xFFs on x86/x86-64 machines UINT8 ReservedVector[16]; // Reserved for ARM ResetVector, 0xFFs on x86/x86-64 machines
UINT32 Signature; // 0x0FF0A55A UINT32 Signature; // 0x0FF0A55A
} FLASH_DESCRIPTOR_HEADER; } FLASH_DESCRIPTOR_HEADER;
@ -35,7 +35,7 @@ typedef struct _FLASH_DESCRIPTOR_HEADER {
// Descriptor map // Descriptor map
// Base fields are storing bits [11:4] of actual base addresses, all other bits are 0 // Base fields are storing bits [11:4] of actual base addresses, all other bits are 0
typedef struct _FLASH_DESCRIPTOR_MAP { typedef struct FLASH_DESCRIPTOR_MAP_ {
// FLMAP0 // FLMAP0
UINT32 ComponentBase : 8; UINT32 ComponentBase : 8;
UINT32 NumberOfFlashChips : 2; // Zero-based number of flash chips installed on board UINT32 NumberOfFlashChips : 2; // Zero-based number of flash chips installed on board
@ -57,7 +57,7 @@ typedef struct _FLASH_DESCRIPTOR_MAP {
// Component section // Component section
// Flash parameters DWORD structure // Flash parameters DWORD structure
typedef struct _FLASH_PARAMETERS { typedef struct FLASH_PARAMETERS_ {
UINT8 FirstChipDensity : 4; UINT8 FirstChipDensity : 4;
UINT8 SecondChipDensity : 4; UINT8 SecondChipDensity : 4;
UINT8 : 8; UINT8 : 8;
@ -90,7 +90,7 @@ typedef struct _FLASH_PARAMETERS {
#define FLASH_FREQUENCY_17MHZ 0x06 #define FLASH_FREQUENCY_17MHZ 0x06
// Component section structure // Component section structure
typedef struct _FLASH_DESCRIPTOR_COMPONENT_SECTION { typedef struct FLASH_DESCRIPTOR_COMPONENT_SECTION_ {
FLASH_PARAMETERS FlashParameters; FLASH_PARAMETERS FlashParameters;
UINT8 InvalidInstruction0; // Instructions for SPI chip, that must not be executed, like FLASH ERASE UINT8 InvalidInstruction0; // Instructions for SPI chip, that must not be executed, like FLASH ERASE
UINT8 InvalidInstruction1; // UINT8 InvalidInstruction1; //
@ -103,7 +103,7 @@ typedef struct _FLASH_DESCRIPTOR_COMPONENT_SECTION {
// Region section // Region section
// All base and limit register are storing upper part of actual UINT32 base and limit // All base and limit register are storing upper part of actual UINT32 base and limit
// If limit is zero - region is not present // If limit is zero - region is not present
typedef struct _FLASH_DESCRIPTOR_REGION_SECTION { typedef struct FLASH_DESCRIPTOR_REGION_SECTION_ {
UINT16 DescriptorBase; // Descriptor UINT16 DescriptorBase; // Descriptor
UINT16 DescriptorLimit; // UINT16 DescriptorLimit; //
UINT16 BiosBase; // BIOS UINT16 BiosBase; // BIOS
@ -127,7 +127,7 @@ typedef struct _FLASH_DESCRIPTOR_REGION_SECTION {
} FLASH_DESCRIPTOR_REGION_SECTION; } FLASH_DESCRIPTOR_REGION_SECTION;
// Master section // Master section
typedef struct _FLASH_DESCRIPTOR_MASTER_SECTION { typedef struct FLASH_DESCRIPTOR_MASTER_SECTION_ {
UINT16 BiosId; UINT16 BiosId;
UINT8 BiosRead; UINT8 BiosRead;
UINT8 BiosWrite; UINT8 BiosWrite;
@ -140,7 +140,7 @@ typedef struct _FLASH_DESCRIPTOR_MASTER_SECTION {
} FLASH_DESCRIPTOR_MASTER_SECTION; } FLASH_DESCRIPTOR_MASTER_SECTION;
// Master section v2 (Skylake+) // Master section v2 (Skylake+)
typedef struct _FLASH_DESCRIPTOR_MASTER_SECTION_V2 { typedef struct FLASH_DESCRIPTOR_MASTER_SECTION_V2_ {
UINT32 : 8; UINT32 : 8;
UINT32 BiosRead : 12; UINT32 BiosRead : 12;
UINT32 BiosWrite : 12; UINT32 BiosWrite : 12;
@ -168,14 +168,14 @@ typedef struct _FLASH_DESCRIPTOR_MASTER_SECTION_V2 {
#define FLASH_DESCRIPTOR_UPPER_MAP_BASE 0x0EFC #define FLASH_DESCRIPTOR_UPPER_MAP_BASE 0x0EFC
// Descriptor upper map structure // Descriptor upper map structure
typedef struct _FLASH_DESCRIPTOR_UPPER_MAP { typedef struct FLASH_DESCRIPTOR_UPPER_MAP_ {
UINT8 VsccTableBase; // Base address of VSCC Table for ME, bits [11:4] UINT8 VsccTableBase; // Base address of VSCC Table for ME, bits [11:4]
UINT8 VsccTableSize; // Counted in UINT32s UINT8 VsccTableSize; // Counted in UINT32s
UINT16 ReservedZero; // Still unknown, zero in all descriptors I have seen UINT16 ReservedZero; // Still unknown, zero in all descriptors I have seen
} FLASH_DESCRIPTOR_UPPER_MAP; } FLASH_DESCRIPTOR_UPPER_MAP;
// VSCC table entry structure // VSCC table entry structure
typedef struct _VSCC_TABLE_ENTRY { typedef struct VSCC_TABLE_ENTRY_ {
UINT8 VendorId; // JEDEC VendorID byte UINT8 VendorId; // JEDEC VendorID byte
UINT8 DeviceId0; // JEDEC DeviceID first byte UINT8 DeviceId0; // JEDEC DeviceID first byte
UINT8 DeviceId1; // JEDEC DeviceID second byte UINT8 DeviceId1; // JEDEC DeviceID second byte

View File

@ -34,7 +34,7 @@ extern QString sectionTypeToQString(const UINT8 type);
// EFI Capsule // EFI Capsule
//***************************************************************************** //*****************************************************************************
// Capsule header // Capsule header
typedef struct _EFI_CAPSULE_HEADER { typedef struct EFI_CAPSULE_HEADER_ {
EFI_GUID CapsuleGuid; EFI_GUID CapsuleGuid;
UINT32 HeaderSize; UINT32 HeaderSize;
UINT32 Flags; UINT32 Flags;
@ -63,7 +63,7 @@ const QByteArray LENOVO2_CAPSULE_GUID
("\x76\xFE\xB5\x25\x43\x82\x5C\x4A\xA9\xBD\x7E\xE3\x24\x61\x98\xB5", 16); ("\x76\xFE\xB5\x25\x43\x82\x5C\x4A\xA9\xBD\x7E\xE3\x24\x61\x98\xB5", 16);
// Toshiba EFI Capsule header // Toshiba EFI Capsule header
typedef struct _TOSHIBA_CAPSULE_HEADER { typedef struct TOSHIBA_CAPSULE_HEADER_ {
EFI_GUID CapsuleGuid; EFI_GUID CapsuleGuid;
UINT32 HeaderSize; UINT32 HeaderSize;
UINT32 FullSize; UINT32 FullSize;
@ -75,7 +75,7 @@ const QByteArray TOSHIBA_CAPSULE_GUID
("\x62\x70\xE0\x3B\x51\x1D\xD2\x45\x83\x2B\xF0\x93\x25\x7E\xD4\x61", 16); ("\x62\x70\xE0\x3B\x51\x1D\xD2\x45\x83\x2B\xF0\x93\x25\x7E\xD4\x61", 16);
// AMI Aptio extended capsule header // AMI Aptio extended capsule header
typedef struct _APTIO_CAPSULE_HEADER { typedef struct APTIO_CAPSULE_HEADER_ {
EFI_CAPSULE_HEADER CapsuleHeader; EFI_CAPSULE_HEADER CapsuleHeader;
UINT16 RomImageOffset; // offset in bytes from the beginning of the capsule header to the start of the capsule volume UINT16 RomImageOffset; // offset in bytes from the beginning of the capsule header to the start of the capsule volume
UINT16 RomLayoutOffset; // offset to the table of the module descriptors in the capsule's volume that are included in the signature calculation UINT16 RomLayoutOffset; // offset to the table of the module descriptors in the capsule's volume that are included in the signature calculation
@ -96,13 +96,13 @@ const QByteArray APTIO_UNSIGNED_CAPSULE_GUID
//***************************************************************************** //*****************************************************************************
// Firmware block map entry // Firmware block map entry
// FvBlockMap ends with an entry {0x00000000, 0x00000000} // FvBlockMap ends with an entry {0x00000000, 0x00000000}
typedef struct _EFI_FV_BLOCK_MAP_ENTRY { typedef struct EFI_FV_BLOCK_MAP_ENTRY_ {
UINT32 NumBlocks; UINT32 NumBlocks;
UINT32 Length; UINT32 Length;
} EFI_FV_BLOCK_MAP_ENTRY; } EFI_FV_BLOCK_MAP_ENTRY;
// Volume header // Volume header
typedef struct _EFI_FIRMWARE_VOLUME_HEADER { typedef struct EFI_FIRMWARE_VOLUME_HEADER_ {
UINT8 ZeroVector[16]; UINT8 ZeroVector[16];
EFI_GUID FileSystemGuid; EFI_GUID FileSystemGuid;
UINT64 FvLength; UINT64 FvLength;
@ -233,7 +233,7 @@ const QByteArray EFI_FV_SIGNATURE("_FVH", 4);
#define EFI_FVB2_WEAK_ALIGNMENT 0x80000000 #define EFI_FVB2_WEAK_ALIGNMENT 0x80000000
// Extended firmware volume header // Extended firmware volume header
typedef struct _EFI_FIRMWARE_VOLUME_EXT_HEADER { typedef struct EFI_FIRMWARE_VOLUME_EXT_HEADER_ {
EFI_GUID FvName; EFI_GUID FvName;
UINT32 ExtHeaderSize; UINT32 ExtHeaderSize;
} EFI_FIRMWARE_VOLUME_EXT_HEADER; } EFI_FIRMWARE_VOLUME_EXT_HEADER;
@ -242,21 +242,21 @@ typedef struct _EFI_FIRMWARE_VOLUME_EXT_HEADER {
// The extended header entries follow each other and are // The extended header entries follow each other and are
// terminated by ExtHeaderType EFI_FV_EXT_TYPE_END // terminated by ExtHeaderType EFI_FV_EXT_TYPE_END
#define EFI_FV_EXT_TYPE_END 0x0000 #define EFI_FV_EXT_TYPE_END 0x0000
typedef struct _EFI_FIRMWARE_VOLUME_EXT_ENTRY { typedef struct EFI_FIRMWARE_VOLUME_EXT_ENTRY_ {
UINT16 ExtEntrySize; UINT16 ExtEntrySize;
UINT16 ExtEntryType; UINT16 ExtEntryType;
} EFI_FIRMWARE_VOLUME_EXT_ENTRY; } EFI_FIRMWARE_VOLUME_EXT_ENTRY;
// GUID that maps OEM file types to GUIDs // GUID that maps OEM file types to GUIDs
#define EFI_FV_EXT_TYPE_OEM_TYPE 0x0001 #define EFI_FV_EXT_TYPE_OEM_TYPE 0x0001
typedef struct _EFI_FIRMWARE_VOLUME_EXT_HEADER_OEM_TYPE { typedef struct EFI_FIRMWARE_VOLUME_EXT_HEADER_OEM_TYPE_ {
EFI_FIRMWARE_VOLUME_EXT_ENTRY Header; EFI_FIRMWARE_VOLUME_EXT_ENTRY Header;
UINT32 TypeMask; UINT32 TypeMask;
//EFI_GUID Types[1]; //EFI_GUID Types[1];
} EFI_FIRMWARE_VOLUME_EXT_HEADER_OEM_TYPE; } EFI_FIRMWARE_VOLUME_EXT_HEADER_OEM_TYPE;
#define EFI_FV_EXT_TYPE_GUID_TYPE 0x0002 #define EFI_FV_EXT_TYPE_GUID_TYPE 0x0002
typedef struct _EFI_FIRMWARE_VOLUME_EXT_ENTRY_GUID_TYPE { typedef struct EFI_FIRMWARE_VOLUME_EXT_ENTRY_GUID_TYPE_ {
EFI_FIRMWARE_VOLUME_EXT_ENTRY Header; EFI_FIRMWARE_VOLUME_EXT_ENTRY Header;
EFI_GUID FormatType; EFI_GUID FormatType;
//UINT8 Data[]; //UINT8 Data[];
@ -275,7 +275,7 @@ typedef union {
UINT16 Checksum16; // Revision 2 UINT16 Checksum16; // Revision 2
} EFI_FFS_INTEGRITY_CHECK; } EFI_FFS_INTEGRITY_CHECK;
// File header // File header
typedef struct _EFI_FFS_FILE_HEADER { typedef struct EFI_FFS_FILE_HEADER_ {
EFI_GUID Name; EFI_GUID Name;
EFI_FFS_INTEGRITY_CHECK IntegrityCheck; EFI_FFS_INTEGRITY_CHECK IntegrityCheck;
UINT8 Type; UINT8 Type;
@ -285,7 +285,7 @@ typedef struct _EFI_FFS_FILE_HEADER {
} EFI_FFS_FILE_HEADER; } EFI_FFS_FILE_HEADER;
// Large file header // Large file header
typedef struct _EFI_FFS_FILE_HEADER2 { typedef struct EFI_FFS_FILE_HEADER2_ {
EFI_GUID Name; EFI_GUID Name;
EFI_FFS_INTEGRITY_CHECK IntegrityCheck; EFI_FFS_INTEGRITY_CHECK IntegrityCheck;
UINT8 Type; UINT8 Type;
@ -365,13 +365,13 @@ extern UINT32 uint24ToUint32(const UINT8* ffsSize);
// EFI FFS File Section // EFI FFS File Section
//***************************************************************************** //*****************************************************************************
// Common section header // Common section header
typedef struct _EFI_COMMON_SECTION_HEADER { typedef struct EFI_COMMON_SECTION_HEADER_ {
UINT8 Size[3]; UINT8 Size[3];
UINT8 Type; UINT8 Type;
} EFI_COMMON_SECTION_HEADER; } EFI_COMMON_SECTION_HEADER;
// Large file common section header // Large file common section header
typedef struct _EFI_COMMON_SECTION_HEADER2 { typedef struct EFI_COMMON_SECTION_HEADER2_ {
UINT8 Size[3]; //Must be 0xFFFFFF for this header to be used UINT8 Size[3]; //Must be 0xFFFFFF for this header to be used
UINT8 Type; UINT8 Type;
UINT32 ExtendedSize; UINT32 ExtendedSize;
@ -405,14 +405,14 @@ typedef struct _EFI_COMMON_SECTION_HEADER2 {
#define INSYDE_SECTION_POSTCODE 0x20 // Specific to Insyde images #define INSYDE_SECTION_POSTCODE 0x20 // Specific to Insyde images
// Compression section // Compression section
typedef struct _EFI_COMPRESSION_SECTION { typedef struct EFI_COMPRESSION_SECTION_ {
UINT8 Size[3]; UINT8 Size[3];
UINT8 Type; UINT8 Type;
UINT32 UncompressedLength; UINT32 UncompressedLength;
UINT8 CompressionType; UINT8 CompressionType;
} EFI_COMPRESSION_SECTION; } EFI_COMPRESSION_SECTION;
typedef struct _EFI_COMPRESSION_SECTION2 { typedef struct EFI_COMPRESSION_SECTION2_ {
UINT8 Size[3]; UINT8 Size[3];
UINT8 Type; UINT8 Type;
UINT32 ExtendedSize; UINT32 ExtendedSize;
@ -426,7 +426,7 @@ typedef struct _EFI_COMPRESSION_SECTION2 {
#define EFI_CUSTOMIZED_COMPRESSION 0x02 #define EFI_CUSTOMIZED_COMPRESSION 0x02
//GUID defined section //GUID defined section
typedef struct _EFI_GUID_DEFINED_SECTION { typedef struct EFI_GUID_DEFINED_SECTION_ {
UINT8 Size[3]; UINT8 Size[3];
UINT8 Type; UINT8 Type;
EFI_GUID SectionDefinitionGuid; EFI_GUID SectionDefinitionGuid;
@ -434,7 +434,7 @@ typedef struct _EFI_GUID_DEFINED_SECTION {
UINT16 Attributes; UINT16 Attributes;
} EFI_GUID_DEFINED_SECTION; } EFI_GUID_DEFINED_SECTION;
typedef struct _EFI_GUID_DEFINED_SECTION2 { typedef struct EFI_GUID_DEFINED_SECTION2_ {
UINT8 Size[3]; UINT8 Size[3];
UINT8 Type; UINT8 Type;
UINT32 ExtendedSize; UINT32 ExtendedSize;
@ -463,14 +463,14 @@ const QByteArray EFI_FIRMWARE_CONTENTS_SIGNED_GUID //0F9D89E8-9259-4F76-A5AF-0C8
//#define WIN_CERT_TYPE_PKCS_SIGNED_DATA 0x0002 //#define WIN_CERT_TYPE_PKCS_SIGNED_DATA 0x0002
#define WIN_CERT_TYPE_EFI_GUID 0x0EF1 #define WIN_CERT_TYPE_EFI_GUID 0x0EF1
typedef struct _WIN_CERTIFICATE { typedef struct WIN_CERTIFICATE_ {
UINT32 Length; UINT32 Length;
UINT16 Revision; UINT16 Revision;
UINT16 CertificateType; UINT16 CertificateType;
//UINT8 CertData[]; //UINT8 CertData[];
} WIN_CERTIFICATE; } WIN_CERTIFICATE;
typedef struct _WIN_CERTIFICATE_UEFI_GUID { typedef struct WIN_CERTIFICATE_UEFI_GUID_ {
WIN_CERTIFICATE Header; // Standard WIN_CERTIFICATE WIN_CERTIFICATE Header; // Standard WIN_CERTIFICATE
EFI_GUID CertType; // Determines format of CertData EFI_GUID CertType; // Determines format of CertData
// UINT8 CertData[]; // Certificate data follows // UINT8 CertData[]; // Certificate data follows
@ -483,20 +483,20 @@ const QByteArray EFI_CERT_TYPE_RSA2048_SHA256_GUID
//("\x9D\xD2\xAF\x4A\xDF\x68\xEE\x49\x8A\xA9\x34\x7D\x37\x56\x65\xA7"); //("\x9D\xD2\xAF\x4A\xDF\x68\xEE\x49\x8A\xA9\x34\x7D\x37\x56\x65\xA7");
// WIN_CERTIFICATE_UEFI_GUID.CertData // WIN_CERTIFICATE_UEFI_GUID.CertData
typedef struct _EFI_CERT_BLOCK_RSA_2048_SHA256 { typedef struct EFI_CERT_BLOCK_RSA_2048_SHA256_ {
UINT32 HashType; UINT32 HashType;
UINT8 PublicKey[256]; UINT8 PublicKey[256];
UINT8 Signature[256]; UINT8 Signature[256];
} EFI_CERT_BLOCK_RSA_2048_SHA256; } EFI_CERT_BLOCK_RSA_2048_SHA256;
// Version section // Version section
typedef struct _EFI_VERSION_SECTION { typedef struct EFI_VERSION_SECTION_ {
UINT8 Size[3]; UINT8 Size[3];
UINT8 Type; UINT8 Type;
UINT16 BuildNumber; UINT16 BuildNumber;
} EFI_VERSION_SECTION; } EFI_VERSION_SECTION;
typedef struct _EFI_VERSION_SECTION2 { typedef struct EFI_VERSION_SECTION2_ {
UINT8 Size[3]; UINT8 Size[3];
UINT8 Type; UINT8 Type;
UINT32 ExtendedSize; UINT32 ExtendedSize;
@ -504,13 +504,13 @@ typedef struct _EFI_VERSION_SECTION2 {
} EFI_VERSION_SECTION2; } EFI_VERSION_SECTION2;
// Freeform subtype GUID section // Freeform subtype GUID section
typedef struct _EFI_FREEFORM_SUBTYPE_GUID_SECTION { typedef struct EFI_FREEFORM_SUBTYPE_GUID_SECTION_ {
UINT8 Size[3]; UINT8 Size[3];
UINT8 Type; UINT8 Type;
EFI_GUID SubTypeGuid; EFI_GUID SubTypeGuid;
} EFI_FREEFORM_SUBTYPE_GUID_SECTION; } EFI_FREEFORM_SUBTYPE_GUID_SECTION;
typedef struct _EFI_FREEFORM_SUBTYPE_GUID_SECTION2 { typedef struct EFI_FREEFORM_SUBTYPE_GUID_SECTION2_ {
UINT8 Size[3]; UINT8 Size[3];
UINT8 Type; UINT8 Type;
UINT32 ExtendedSize; UINT32 ExtendedSize;
@ -518,13 +518,13 @@ typedef struct _EFI_FREEFORM_SUBTYPE_GUID_SECTION2 {
} EFI_FREEFORM_SUBTYPE_GUID_SECTION2; } EFI_FREEFORM_SUBTYPE_GUID_SECTION2;
// Phoenix SCT and HP postcode section // Phoenix SCT and HP postcode section
typedef struct _POSTCODE_SECTION { typedef struct POSTCODE_SECTION_ {
UINT8 Size[3]; UINT8 Size[3];
UINT8 Type; UINT8 Type;
UINT32 Postcode; UINT32 Postcode;
} POSTCODE_SECTION; } POSTCODE_SECTION;
typedef struct _POSTCODE_SECTION2 { typedef struct POSTCODE_SECTION2_ {
UINT8 Size[3]; UINT8 Size[3];
UINT8 Type; UINT8 Type;
UINT32 ExtendedSize; UINT32 ExtendedSize;

View File

@ -40,7 +40,7 @@ WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
const QByteArray FIT_SIGNATURE const QByteArray FIT_SIGNATURE
("\x5F\x46\x49\x54\x5F\x20\x20\x20", 8); ("\x5F\x46\x49\x54\x5F\x20\x20\x20", 8);
typedef struct _FIT_ENTRY { typedef struct FIT_ENTRY_ {
UINT64 Address; UINT64 Address;
UINT32 Size; UINT32 Size;
UINT16 Version; UINT16 Version;
@ -48,7 +48,7 @@ typedef struct _FIT_ENTRY {
UINT8 Checksum; UINT8 Checksum;
} FIT_ENTRY; } FIT_ENTRY;
typedef struct _INTEL_MICROCODE_HEADER { typedef struct INTEL_MICROCODE_HEADER_ {
UINT32 Version; UINT32 Version;
UINT32 Revision; UINT32 Revision;
UINT32 Date; UINT32 Date;

View File

@ -18,14 +18,14 @@ WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
// Make sure we use right packing rules // Make sure we use right packing rules
#pragma pack(push, 1) #pragma pack(push, 1)
typedef struct _GBE_MAC_ADDRESS { typedef struct GBE_MAC_ADDRESS_ {
UINT8 vendor[3]; UINT8 vendor[3];
UINT8 device[3]; UINT8 device[3];
} GBE_MAC_ADDRESS; } GBE_MAC_ADDRESS;
#define GBE_VERSION_OFFSET 10 #define GBE_VERSION_OFFSET 10
typedef struct _GBE_VERSION { typedef struct GBE_VERSION_ {
UINT8 id : 4; UINT8 id : 4;
UINT8 minor : 4; UINT8 minor : 4;
UINT8 major; UINT8 major;

View File

@ -21,7 +21,7 @@ WITHWARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
const QByteArray ME_VERSION_SIGNATURE("\x24\x4D\x41\x4E", 4); //$MAN const QByteArray ME_VERSION_SIGNATURE("\x24\x4D\x41\x4E", 4); //$MAN
const QByteArray ME_VERSION_SIGNATURE2("\x24\x4D\x4E\x32", 4); //$MN2 const QByteArray ME_VERSION_SIGNATURE2("\x24\x4D\x4E\x32", 4); //$MN2
typedef struct _ME_VERSION { typedef struct ME_VERSION_ {
UINT32 signature; UINT32 signature;
UINT32 reserved; // Unknown for me UINT32 reserved; // Unknown for me
UINT16 major; UINT16 major;

View File

@ -39,7 +39,7 @@ extern QString efiTimeToQString(const EFI_TIME & time);
#pragma pack(push, 1) #pragma pack(push, 1)
// Variable header // Variable header
typedef struct _NVAR_VARIABLE_HEADER { typedef struct NVAR_VARIABLE_HEADER_ {
UINT32 Signature; // NVAR UINT32 Signature; // NVAR
UINT16 Size; // Size of the variable including header UINT16 Size; // Size of the variable including header
UINT32 Next : 24; // Offset to the next variable in a list, or empty if latest in the list UINT32 Next : 24; // Offset to the next variable in a list, or empty if latest in the list
@ -95,7 +95,7 @@ const QByteArray NVRAM_ADDITIONAL_STORE_VOLUME_GUID
#define NVRAM_VSS_VARIABLE_STORE_STATUS_UNKNOWN 3 #define NVRAM_VSS_VARIABLE_STORE_STATUS_UNKNOWN 3
// Variable store header // Variable store header
typedef struct _VSS_VARIABLE_STORE_HEADER { typedef struct VSS_VARIABLE_STORE_HEADER_ {
UINT32 Signature; // $VSS signature UINT32 Signature; // $VSS signature
UINT32 Size; // Size of variable store, including store header UINT32 Size; // Size of variable store, including store header
UINT8 Format; // Store format state UINT8 Format; // Store format state
@ -105,7 +105,7 @@ typedef struct _VSS_VARIABLE_STORE_HEADER {
} VSS_VARIABLE_STORE_HEADER; } VSS_VARIABLE_STORE_HEADER;
// Normal variable header // Normal variable header
typedef struct _VSS_VARIABLE_HEADER { typedef struct VSS_VARIABLE_HEADER_ {
UINT16 StartId; // Variable start marker AA55 UINT16 StartId; // Variable start marker AA55
UINT8 State; // Variable state UINT8 State; // Variable state
UINT8 : 8; UINT8 : 8;
@ -116,7 +116,7 @@ typedef struct _VSS_VARIABLE_HEADER {
} VSS_VARIABLE_HEADER; } VSS_VARIABLE_HEADER;
// Apple variation of normal variable header, with one new field // Apple variation of normal variable header, with one new field
typedef struct _VSS_APPLE_VARIABLE_HEADER { typedef struct VSS_APPLE_VARIABLE_HEADER_ {
UINT16 StartId; // Variable start marker AA55 UINT16 StartId; // Variable start marker AA55
UINT8 State; // Variable state UINT8 State; // Variable state
UINT8 : 8; UINT8 : 8;
@ -128,7 +128,7 @@ typedef struct _VSS_APPLE_VARIABLE_HEADER {
} VSS_APPLE_VARIABLE_HEADER; } VSS_APPLE_VARIABLE_HEADER;
// Authenticated variable header, used for SecureBoot vars // Authenticated variable header, used for SecureBoot vars
typedef struct _VSS_AUTH_VARIABLE_HEADER { typedef struct VSS_AUTH_VARIABLE_HEADER_ {
UINT16 StartId; // Variable start marker AA55 UINT16 StartId; // Variable start marker AA55
UINT8 State; // Variable state UINT8 State; // Variable state
UINT8 : 8; UINT8 : 8;
@ -163,7 +163,7 @@ typedef struct _VSS_AUTH_VARIABLE_HEADER {
// _FDC header structure // _FDC header structure
#define NVRAM_FDC_VOLUME_SIGNATURE 0x4344465F #define NVRAM_FDC_VOLUME_SIGNATURE 0x4344465F
typedef struct _FDC_VOLUME_HEADER { typedef struct FDC_VOLUME_HEADER_ {
UINT32 Signature; //_FDC UINT32 Signature; //_FDC
UINT32 Size; UINT32 Size;
//EFI_FIRMWARE_VOLUME_HEADER VolumeHeader; //EFI_FIRMWARE_VOLUME_HEADER VolumeHeader;
@ -197,7 +197,7 @@ typedef struct {
// Apple Fsys // Apple Fsys
// //
typedef struct _APPLE_FSYS_STORE_HEADER { typedef struct APPLE_FSYS_STORE_HEADER_ {
UINT32 Signature; // Fsys signature UINT32 Signature; // Fsys signature
UINT8 Unknown[5]; // Still unknown UINT8 Unknown[5]; // Still unknown
UINT16 Size; // Size of variable store UINT16 Size; // Size of variable store
@ -227,13 +227,13 @@ typedef struct _APPLE_FSYS_STORE_HEADER {
#define NVRAM_EVSA_ENTRY_TYPE_DATA2 0xE3 #define NVRAM_EVSA_ENTRY_TYPE_DATA2 0xE3
#define NVRAM_EVSA_ENTRY_TYPE_DATA3 0x83 #define NVRAM_EVSA_ENTRY_TYPE_DATA3 0x83
typedef struct _EVSA_ENTRY_HEADER { typedef struct EVSA_ENTRY_HEADER_ {
UINT8 Type; UINT8 Type;
UINT8 Checksum; UINT8 Checksum;
UINT16 Size; UINT16 Size;
} EVSA_ENTRY_HEADER; } EVSA_ENTRY_HEADER;
typedef struct _EVSA_STORE_ENTRY { typedef struct EVSA_STORE_ENTRY_ {
EVSA_ENTRY_HEADER Header; EVSA_ENTRY_HEADER Header;
UINT32 Signature; // EVSA UINT32 Signature; // EVSA
UINT32 Attributes; UINT32 Attributes;
@ -241,19 +241,19 @@ typedef struct _EVSA_STORE_ENTRY {
UINT32 : 32; UINT32 : 32;
} EVSA_STORE_ENTRY; } EVSA_STORE_ENTRY;
typedef struct _EVSA_GUID_ENTRY { typedef struct EVSA_GUID_ENTRY_ {
EVSA_ENTRY_HEADER Header; EVSA_ENTRY_HEADER Header;
UINT16 GuidId; UINT16 GuidId;
EFI_GUID Guid; EFI_GUID Guid;
} EVSA_GUID_ENTRY; } EVSA_GUID_ENTRY;
typedef struct _EVSA_NAME_ENTRY { typedef struct EVSA_NAME_ENTRY_ {
EVSA_ENTRY_HEADER Header; EVSA_ENTRY_HEADER Header;
UINT16 VarId; UINT16 VarId;
//CHAR16 Name[]; //CHAR16 Name[];
} EVSA_NAME_ENTRY; } EVSA_NAME_ENTRY;
typedef struct _EVSA_DATA_ENTRY { typedef struct EVSA_DATA_ENTRY_ {
EVSA_ENTRY_HEADER Header; EVSA_ENTRY_HEADER Header;
UINT16 GuidId; UINT16 GuidId;
UINT16 VarId; UINT16 VarId;

View File

@ -19,16 +19,16 @@ routines without the need of backward traversal
#include "basetypes.h" #include "basetypes.h"
//typedef struct _CAPSULE_PARSING_DATA { //typedef struct CAPSULE_PARSING_DATA_ {
//} CAPSULE_PARSING_DATA; //} CAPSULE_PARSING_DATA;
//typedef struct _IMAGE_PARSING_DATA { //typedef struct IMAGE_PARSING_DATA_ {
//} IMAGE_PARSING_DATA; //} IMAGE_PARSING_DATA;
//typedef struct _PADDING_PARSING_DATA { //typedef struct PADDING_PARSING_DATA_ {
//} PADDING_PARSING_DATA; //} PADDING_PARSING_DATA;
typedef struct _VOLUME_PARSING_DATA { typedef struct VOLUME_PARSING_DATA_ {
EFI_GUID extendedHeaderGuid; EFI_GUID extendedHeaderGuid;
UINT32 alignment; UINT32 alignment;
UINT8 revision; UINT8 revision;
@ -38,10 +38,10 @@ typedef struct _VOLUME_PARSING_DATA {
BOOLEAN isWeakAligned; BOOLEAN isWeakAligned;
} VOLUME_PARSING_DATA; } VOLUME_PARSING_DATA;
//typedef struct _FREE_SPACE_PARSING_DATA { //typedef struct FREE_SPACE_PARSING_DATA_ {
//} FREE_SPACE_PARSING_DATA; //} FREE_SPACE_PARSING_DATA;
typedef struct _FILE_PARSING_DATA { typedef struct FILE_PARSING_DATA_ {
union { union {
UINT8 tailArray[2]; UINT8 tailArray[2];
UINT16 tail; UINT16 tail;
@ -53,27 +53,27 @@ typedef struct _FILE_PARSING_DATA {
#define RAW_FILE_FORMAT_UNKNOWN 0 #define RAW_FILE_FORMAT_UNKNOWN 0
#define RAW_FILE_FORMAT_NVAR_STORE 1 #define RAW_FILE_FORMAT_NVAR_STORE 1
typedef struct _COMPRESSED_SECTION_PARSING_DATA { typedef struct COMPRESSED_SECTION_PARSING_DATA_ {
UINT32 uncompressedSize; UINT32 uncompressedSize;
UINT8 compressionType; UINT8 compressionType;
UINT8 algorithm; UINT8 algorithm;
} COMPRESSED_SECTION_PARSING_DATA; } COMPRESSED_SECTION_PARSING_DATA;
typedef struct _GUIDED_SECTION_PARSING_DATA { typedef struct GUIDED_SECTION_PARSING_DATA_ {
EFI_GUID guid; EFI_GUID guid;
} GUIDED_SECTION_PARSING_DATA; } GUIDED_SECTION_PARSING_DATA;
typedef struct _FREEFORM_GUIDED_SECTION_PARSING_DATA { typedef struct FREEFORM_GUIDED_SECTION_PARSING_DATA_ {
EFI_GUID guid; EFI_GUID guid;
} FREEFORM_GUIDED_SECTION_PARSING_DATA; } FREEFORM_GUIDED_SECTION_PARSING_DATA;
typedef struct _TE_IMAGE_SECTION_PARSING_DATA { typedef struct TE_IMAGE_SECTION_PARSING_DATA_ {
UINT32 imageBase; UINT32 imageBase;
UINT32 adjustedImageBase; UINT32 adjustedImageBase;
UINT8 revision; UINT8 revision;
} TE_IMAGE_SECTION_PARSING_DATA; } TE_IMAGE_SECTION_PARSING_DATA;
typedef struct _SECTION_PARSING_DATA { typedef struct SECTION_PARSING_DATA_ {
union { union {
COMPRESSED_SECTION_PARSING_DATA compressed; COMPRESSED_SECTION_PARSING_DATA compressed;
GUIDED_SECTION_PARSING_DATA guidDefined; GUIDED_SECTION_PARSING_DATA guidDefined;
@ -82,7 +82,7 @@ typedef struct _SECTION_PARSING_DATA {
}; };
} SECTION_PARSING_DATA; } SECTION_PARSING_DATA;
typedef struct _NVRAM_NVAR_PARSING_DATA { typedef struct NVRAM_NVAR_PARSING_DATA_ {
UINT32 next; UINT32 next;
UINT8 attributes; UINT8 attributes;
UINT8 extendedAttributes; UINT8 extendedAttributes;
@ -90,7 +90,7 @@ typedef struct _NVRAM_NVAR_PARSING_DATA {
UINT8 hash[0x20]; //SHA256 UINT8 hash[0x20]; //SHA256
} NVRAM_NVAR_PARSING_DATA; } NVRAM_NVAR_PARSING_DATA;
typedef struct _NVRAM_PARSING_DATA { typedef struct NVRAM_PARSING_DATA_ {
//union { //union {
NVRAM_NVAR_PARSING_DATA nvar; NVRAM_NVAR_PARSING_DATA nvar;
//}; //};
@ -98,7 +98,7 @@ typedef struct _NVRAM_PARSING_DATA {
// TODO: add more NVRAM-related PD // TODO: add more NVRAM-related PD
typedef struct _PARSING_DATA { typedef struct PARSING_DATA_ {
UINT8 emptyByte; UINT8 emptyByte;
UINT8 ffsVersion; UINT8 ffsVersion;
UINT32 offset; UINT32 offset;