diff options
Diffstat (limited to 'src/include/ipxe/efi/Uefi')
-rw-r--r-- | src/include/ipxe/efi/Uefi/UefiBaseType.h | 168 | ||||
-rw-r--r-- | src/include/ipxe/efi/Uefi/UefiGpt.h | 50 | ||||
-rw-r--r-- | src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h | 1479 | ||||
-rw-r--r-- | src/include/ipxe/efi/Uefi/UefiMultiPhase.h | 81 | ||||
-rw-r--r-- | src/include/ipxe/efi/Uefi/UefiPxe.h | 620 | ||||
-rw-r--r-- | src/include/ipxe/efi/Uefi/UefiSpec.h | 495 |
6 files changed, 1468 insertions, 1425 deletions
diff --git a/src/include/ipxe/efi/Uefi/UefiBaseType.h b/src/include/ipxe/efi/Uefi/UefiBaseType.h index 5bfcccf34..049275995 100644 --- a/src/include/ipxe/efi/Uefi/UefiBaseType.h +++ b/src/include/ipxe/efi/Uefi/UefiBaseType.h @@ -1,23 +1,19 @@ /** @file Defines data types and constants introduced in UEFI. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR> Portions copyright (c) 2011 - 2016, ARM Ltd. All rights reserved.<BR> +Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> +Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR> -This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. -The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __UEFI_BASETYPE_H__ #define __UEFI_BASETYPE_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Base.h> @@ -28,37 +24,37 @@ FILE_LICENCE ( BSD3 ); /// /// 128-bit buffer containing a unique identifier value. /// -typedef GUID EFI_GUID; +typedef GUID EFI_GUID; /// /// Function return status for EFI API. /// -typedef RETURN_STATUS EFI_STATUS; +typedef RETURN_STATUS EFI_STATUS; /// /// A collection of related interfaces. /// -typedef VOID *EFI_HANDLE; +typedef VOID *EFI_HANDLE; /// /// Handle to an event structure. /// -typedef VOID *EFI_EVENT; +typedef VOID *EFI_EVENT; /// /// Task priority level. /// -typedef UINTN EFI_TPL; +typedef UINTN EFI_TPL; /// /// Logical block address. /// -typedef UINT64 EFI_LBA; +typedef UINT64 EFI_LBA; /// /// 64-bit physical memory address. /// -typedef UINT64 EFI_PHYSICAL_ADDRESS; +typedef UINT64 EFI_PHYSICAL_ADDRESS; /// /// 64-bit virtual memory address. /// -typedef UINT64 EFI_VIRTUAL_ADDRESS; +typedef UINT64 EFI_VIRTUAL_ADDRESS; /// /// EFI Time Abstraction: @@ -72,20 +68,19 @@ typedef UINT64 EFI_VIRTUAL_ADDRESS; /// TimeZone: -1440 to 1440 or 2047 /// typedef struct { - UINT16 Year; - UINT8 Month; - UINT8 Day; - UINT8 Hour; - UINT8 Minute; - UINT8 Second; - UINT8 Pad1; - UINT32 Nanosecond; - INT16 TimeZone; - UINT8 Daylight; - UINT8 Pad2; + UINT16 Year; + UINT8 Month; + UINT8 Day; + UINT8 Hour; + UINT8 Minute; + UINT8 Second; + UINT8 Pad1; + UINT32 Nanosecond; + INT16 TimeZone; + UINT8 Daylight; + UINT8 Pad2; } EFI_TIME; - /// /// 4-byte buffer. An IPv4 internet protocol address. /// @@ -100,7 +95,7 @@ typedef IPv6_ADDRESS EFI_IPv6_ADDRESS; /// 32-byte buffer containing a network Media Access Control address. /// typedef struct { - UINT8 Addr[32]; + UINT8 Addr[32]; } EFI_MAC_ADDRESS; /// @@ -108,12 +103,11 @@ typedef struct { /// An IPv4 or IPv6 internet protocol address. /// typedef union { - UINT32 Addr[4]; - EFI_IPv4_ADDRESS v4; - EFI_IPv6_ADDRESS v6; + UINT32 Addr[4]; + EFI_IPv4_ADDRESS v4; + EFI_IPv6_ADDRESS v6; } EFI_IP_ADDRESS; - /// /// Enumeration of EFI_STATUS. ///@{ @@ -151,20 +145,20 @@ typedef union { #define EFI_COMPROMISED_DATA RETURN_COMPROMISED_DATA #define EFI_HTTP_ERROR RETURN_HTTP_ERROR -#define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH -#define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE -#define EFI_WARN_WRITE_FAILURE RETURN_WARN_WRITE_FAILURE -#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL -#define EFI_WARN_STALE_DATA RETURN_WARN_STALE_DATA -#define EFI_WARN_FILE_SYSTEM RETURN_WARN_FILE_SYSTEM +#define EFI_WARN_UNKNOWN_GLYPH RETURN_WARN_UNKNOWN_GLYPH +#define EFI_WARN_DELETE_FAILURE RETURN_WARN_DELETE_FAILURE +#define EFI_WARN_WRITE_FAILURE RETURN_WARN_WRITE_FAILURE +#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL +#define EFI_WARN_STALE_DATA RETURN_WARN_STALE_DATA +#define EFI_WARN_FILE_SYSTEM RETURN_WARN_FILE_SYSTEM ///@} /// /// Define macro to encode the status code. /// -#define EFIERR(_a) ENCODE_ERROR(_a) +#define EFIERR(_a) ENCODE_ERROR(_a) -#define EFI_ERROR(A) RETURN_ERROR(A) +#define EFI_ERROR(A) RETURN_ERROR(A) /// /// ICMP error definitions @@ -178,9 +172,9 @@ typedef union { /// /// Tcp connection status definitions ///@{ -#define EFI_CONNECTION_FIN EFIERR(104) -#define EFI_CONNECTION_RESET EFIERR(105) -#define EFI_CONNECTION_REFUSED EFIERR(106) +#define EFI_CONNECTION_FIN EFIERR(104) +#define EFI_CONNECTION_RESET EFIERR(105) +#define EFI_CONNECTION_REFUSED EFIERR(106) ///@} // @@ -188,9 +182,9 @@ typedef union { // 4KB. This should in no way be confused with the page size of the processor. // An EFI_PAGE is just the quanta of memory in EFI. // -#define EFI_PAGE_SIZE SIZE_4KB -#define EFI_PAGE_MASK 0xFFF -#define EFI_PAGE_SHIFT 12 +#define EFI_PAGE_SIZE SIZE_4KB +#define EFI_PAGE_MASK 0xFFF +#define EFI_PAGE_SHIFT 12 /** Macro that converts a size, in bytes, to a number of EFI_PAGESs. @@ -221,22 +215,22 @@ typedef union { /// /// PE32+ Machine type for IA32 UEFI images. /// -#define EFI_IMAGE_MACHINE_IA32 0x014C +#define EFI_IMAGE_MACHINE_IA32 0x014C /// /// PE32+ Machine type for IA64 UEFI images. /// -#define EFI_IMAGE_MACHINE_IA64 0x0200 +#define EFI_IMAGE_MACHINE_IA64 0x0200 /// /// PE32+ Machine type for EBC UEFI images. /// -#define EFI_IMAGE_MACHINE_EBC 0x0EBC +#define EFI_IMAGE_MACHINE_EBC 0x0EBC /// /// PE32+ Machine type for X64 UEFI images. /// -#define EFI_IMAGE_MACHINE_X64 0x8664 +#define EFI_IMAGE_MACHINE_X64 0x8664 /// /// PE32+ Machine type for ARM mixed ARM and Thumb/Thumb2 images. @@ -248,54 +242,84 @@ typedef union { /// #define EFI_IMAGE_MACHINE_AARCH64 0xAA64 +/// +/// PE32+ Machine type for RISC-V 32/64/128 +/// +#define EFI_IMAGE_MACHINE_RISCV32 0x5032 +#define EFI_IMAGE_MACHINE_RISCV64 0x5064 +#define EFI_IMAGE_MACHINE_RISCV128 0x5128 + +/// +/// PE32+ Machine type for LoongArch 32/64 images. +/// +#define EFI_IMAGE_MACHINE_LOONGARCH32 0x6232 +#define EFI_IMAGE_MACHINE_LOONGARCH64 0x6264 -#if defined (MDE_CPU_IA32) +#if !defined (EFI_IMAGE_MACHINE_TYPE_VALUE) && !defined (EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE) + #if defined (MDE_CPU_IA32) #define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ - (((Machine) == EFI_IMAGE_MACHINE_IA32) || ((Machine) == EFI_IMAGE_MACHINE_EBC)) + ((Machine) == EFI_IMAGE_MACHINE_IA32) -#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_X64) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_X64) -#elif defined (MDE_CPU_IPF) + #elif defined (MDE_CPU_X64) #define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ - (((Machine) == EFI_IMAGE_MACHINE_IA64) || ((Machine) == EFI_IMAGE_MACHINE_EBC)) + ((Machine) == EFI_IMAGE_MACHINE_X64) -#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_IA32) -#elif defined (MDE_CPU_X64) + #elif defined (MDE_CPU_ARM) -#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ - (((Machine) == EFI_IMAGE_MACHINE_X64) || ((Machine) == EFI_IMAGE_MACHINE_EBC)) +#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED) -#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_IA32) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) + + #elif defined (MDE_CPU_AARCH64) + +#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ + ((Machine) == EFI_IMAGE_MACHINE_AARCH64) -#elif defined (MDE_CPU_ARM) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) + #elif defined (MDE_CPU_RISCV64) #define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ - (((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED) || ((Machine) == EFI_IMAGE_MACHINE_EBC)) + ((Machine) == EFI_IMAGE_MACHINE_RISCV64) -#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_ARMTHUMB_MIXED) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) -#elif defined (MDE_CPU_AARCH64) + #elif defined (MDE_CPU_LOONGARCH64) #define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \ - (((Machine) == EFI_IMAGE_MACHINE_AARCH64) || ((Machine) == EFI_IMAGE_MACHINE_EBC)) + ((Machine) == EFI_IMAGE_MACHINE_LOONGARCH64) -#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) -#elif defined (MDE_CPU_EBC) + #elif defined (MDE_CPU_EBC) /// /// This is just to make sure you can cross compile with the EBC compiler. /// It does not make sense to have a PE loader coded in EBC. /// -#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_EBC) +#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_EBC) -#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) + #else + #error Unknown Processor Type + #endif #else -#error Unknown Processor Type + #if defined (EFI_IMAGE_MACHINE_TYPE_VALUE) +#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_TYPE_VALUE) + #else +#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) (FALSE) + #endif + #if defined (EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE) +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_CROSS_TYPE_VALUE) + #else +#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE) + #endif #endif #endif diff --git a/src/include/ipxe/efi/Uefi/UefiGpt.h b/src/include/ipxe/efi/Uefi/UefiGpt.h index 19acf55d4..38eff7df5 100644 --- a/src/include/ipxe/efi/Uefi/UefiGpt.h +++ b/src/include/ipxe/efi/Uefi/UefiGpt.h @@ -1,31 +1,29 @@ /** @file EFI Guid Partition Table Format Definition. -Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR> -This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. -The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __UEFI_GPT_H__ #define __UEFI_GPT_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); /// /// The primary GUID Partition Table Header must be /// located in LBA 1 (i.e., the second logical block). /// -#define PRIMARY_PART_HEADER_LBA 1 +#define PRIMARY_PART_HEADER_LBA 1 /// /// EFI Partition Table Signature: "EFI PART". /// -#define EFI_PTAB_HEADER_ID SIGNATURE_64 ('E','F','I',' ','P','A','R','T') +#define EFI_PTAB_HEADER_ID SIGNATURE_64 ('E','F','I',' ','P','A','R','T') +/// +/// Minimum bytes reserve for EFI entry array buffer. +/// +#define EFI_GPT_PART_ENTRY_MIN_SIZE 16384 #pragma pack(1) @@ -37,51 +35,51 @@ typedef struct { /// The table header for the GPT partition Table. /// This header contains EFI_PTAB_HEADER_ID. /// - EFI_TABLE_HEADER Header; + EFI_TABLE_HEADER Header; /// /// The LBA that contains this data structure. /// - EFI_LBA MyLBA; + EFI_LBA MyLBA; /// /// LBA address of the alternate GUID Partition Table Header. /// - EFI_LBA AlternateLBA; + EFI_LBA AlternateLBA; /// /// The first usable logical block that may be used /// by a partition described by a GUID Partition Entry. /// - EFI_LBA FirstUsableLBA; + EFI_LBA FirstUsableLBA; /// /// The last usable logical block that may be used /// by a partition described by a GUID Partition Entry. /// - EFI_LBA LastUsableLBA; + EFI_LBA LastUsableLBA; /// /// GUID that can be used to uniquely identify the disk. /// - EFI_GUID DiskGUID; + EFI_GUID DiskGUID; /// /// The starting LBA of the GUID Partition Entry array. /// - EFI_LBA PartitionEntryLBA; + EFI_LBA PartitionEntryLBA; /// /// The number of Partition Entries in the GUID Partition Entry array. /// - UINT32 NumberOfPartitionEntries; + UINT32 NumberOfPartitionEntries; /// /// The size, in bytes, of each the GUID Partition /// Entry structures in the GUID Partition Entry /// array. This field shall be set to a value of 128 x 2^n where n is /// an integer greater than or equal to zero (e.g., 128, 256, 512, etc.). /// - UINT32 SizeOfPartitionEntry; + UINT32 SizeOfPartitionEntry; /// /// The CRC32 of the GUID Partition Entry array. /// Starts at PartitionEntryLBA and is /// computed over a byte length of /// NumberOfPartitionEntries * SizeOfPartitionEntry. /// - UINT32 PartitionEntryArrayCRC32; + UINT32 PartitionEntryArrayCRC32; } EFI_PARTITION_TABLE_HEADER; /// @@ -92,21 +90,21 @@ typedef struct { /// Unique ID that defines the purpose and type of this Partition. A value of /// zero defines that this partition entry is not being used. /// - EFI_GUID PartitionTypeGUID; + EFI_GUID PartitionTypeGUID; /// /// GUID that is unique for every partition entry. Every partition ever /// created will have a unique GUID. /// This GUID must be assigned when the GUID Partition Entry is created. /// - EFI_GUID UniquePartitionGUID; + EFI_GUID UniquePartitionGUID; /// /// Starting LBA of the partition defined by this entry /// - EFI_LBA StartingLBA; + EFI_LBA StartingLBA; /// /// Ending LBA of the partition defined by this entry. /// - EFI_LBA EndingLBA; + EFI_LBA EndingLBA; /// /// Attribute bits, all bits reserved by UEFI /// Bit 0: If this bit is set, the partition is required for the platform to function. The owner/creator of the @@ -139,5 +137,3 @@ typedef struct { #pragma pack() #endif - - diff --git a/src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h b/src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h index 88c026201..36468e022 100644 --- a/src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h +++ b/src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h @@ -3,15 +3,9 @@ IFR is primarily consumed by the EFI presentation engine, and produced by EFI internal application and drivers as well as all add-in card option-ROM drivers -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR> -This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. -The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: These definitions are from UEFI 2.1 and 2.2. @@ -21,15 +15,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __UEFI_INTERNAL_FORMREPRESENTATION_H__ #define __UEFI_INTERNAL_FORMREPRESENTATION_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Guid/HiiFormMapMethodGuid.h> /// /// The following types are currently defined: /// -typedef VOID* EFI_HII_HANDLE; -typedef CHAR16* EFI_STRING; +typedef VOID *EFI_HII_HANDLE; +typedef CHAR16 *EFI_STRING; typedef UINT16 EFI_IMAGE_ID; typedef UINT16 EFI_QUESTION_ID; typedef UINT16 EFI_STRING_ID; @@ -37,11 +31,9 @@ typedef UINT16 EFI_FORM_ID; typedef UINT16 EFI_VARSTORE_ID; typedef UINT16 EFI_ANIMATION_ID; -typedef UINT16 EFI_DEFAULT_ID; - -typedef UINT32 EFI_HII_FONT_STYLE; - +typedef UINT16 EFI_DEFAULT_ID; +typedef UINT32 EFI_HII_FONT_STYLE; #pragma pack(1) @@ -54,35 +46,35 @@ typedef UINT32 EFI_HII_FONT_STYLE; /// The header found at the start of each package list. /// typedef struct { - EFI_GUID PackageListGuid; - UINT32 PackageLength; + EFI_GUID PackageListGuid; + UINT32 PackageLength; } EFI_HII_PACKAGE_LIST_HEADER; /// /// The header found at the start of each package. /// typedef struct { - UINT32 Length:24; - UINT32 Type:8; + UINT32 Length : 24; + UINT32 Type : 8; // UINT8 Data[...]; } EFI_HII_PACKAGE_HEADER; // // Value of HII package type // -#define EFI_HII_PACKAGE_TYPE_ALL 0x00 -#define EFI_HII_PACKAGE_TYPE_GUID 0x01 -#define EFI_HII_PACKAGE_FORMS 0x02 -#define EFI_HII_PACKAGE_STRINGS 0x04 -#define EFI_HII_PACKAGE_FONTS 0x05 -#define EFI_HII_PACKAGE_IMAGES 0x06 -#define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07 -#define EFI_HII_PACKAGE_DEVICE_PATH 0x08 -#define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09 -#define EFI_HII_PACKAGE_ANIMATIONS 0x0A -#define EFI_HII_PACKAGE_END 0xDF -#define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0 -#define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF +#define EFI_HII_PACKAGE_TYPE_ALL 0x00 +#define EFI_HII_PACKAGE_TYPE_GUID 0x01 +#define EFI_HII_PACKAGE_FORMS 0x02 +#define EFI_HII_PACKAGE_STRINGS 0x04 +#define EFI_HII_PACKAGE_FONTS 0x05 +#define EFI_HII_PACKAGE_IMAGES 0x06 +#define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07 +#define EFI_HII_PACKAGE_DEVICE_PATH 0x08 +#define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09 +#define EFI_HII_PACKAGE_ANIMATIONS 0x0A +#define EFI_HII_PACKAGE_END 0xDF +#define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0 +#define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF // // Definitions for Simplified Font Package @@ -91,10 +83,10 @@ typedef struct { /// /// Contents of EFI_NARROW_GLYPH.Attributes. ///@{ -#define EFI_GLYPH_NON_SPACING 0x01 -#define EFI_GLYPH_WIDE 0x02 -#define EFI_GLYPH_HEIGHT 19 -#define EFI_GLYPH_WIDTH 8 +#define EFI_GLYPH_NON_SPACING 0x01 +#define EFI_GLYPH_WIDE 0x02 +#define EFI_GLYPH_HEIGHT 19 +#define EFI_GLYPH_WIDTH 8 ///@} /// @@ -105,17 +97,17 @@ typedef struct { /// The Unicode representation of the glyph. The term weight is the /// technical term for a character code. /// - CHAR16 UnicodeWeight; + CHAR16 UnicodeWeight; /// /// The data element containing the glyph definitions. /// - UINT8 Attributes; + UINT8 Attributes; /// /// The column major glyph representation of the character. Bits /// with values of one indicate that the corresponding pixel is to be /// on when normally displayed; those with zero are off. /// - UINT8 GlyphCol1[EFI_GLYPH_HEIGHT]; + UINT8 GlyphCol1[EFI_GLYPH_HEIGHT]; } EFI_NARROW_GLYPH; /// @@ -127,29 +119,29 @@ typedef struct { /// The Unicode representation of the glyph. The term weight is the /// technical term for a character code. /// - CHAR16 UnicodeWeight; + CHAR16 UnicodeWeight; /// /// The data element containing the glyph definitions. /// - UINT8 Attributes; + UINT8 Attributes; /// /// The column major glyph representation of the character. Bits /// with values of one indicate that the corresponding pixel is to be /// on when normally displayed; those with zero are off. /// - UINT8 GlyphCol1[EFI_GLYPH_HEIGHT]; + UINT8 GlyphCol1[EFI_GLYPH_HEIGHT]; /// /// The column major glyph representation of the character. Bits /// with values of one indicate that the corresponding pixel is to be /// on when normally displayed; those with zero are off. /// - UINT8 GlyphCol2[EFI_GLYPH_HEIGHT]; + UINT8 GlyphCol2[EFI_GLYPH_HEIGHT]; /// /// Ensures that sizeof (EFI_WIDE_GLYPH) is twice the /// sizeof (EFI_NARROW_GLYPH). The contents of Pad must /// be zero. /// - UINT8 Pad[3]; + UINT8 Pad[3]; } EFI_WIDE_GLYPH; /// @@ -157,9 +149,9 @@ typedef struct { /// followed by a series of glyph structures. /// typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR { - EFI_HII_PACKAGE_HEADER Header; - UINT16 NumberOfNarrowGlyphs; - UINT16 NumberOfWideGlyphs; + EFI_HII_PACKAGE_HEADER Header; + UINT16 NumberOfNarrowGlyphs; + UINT16 NumberOfWideGlyphs; // EFI_NARROW_GLYPH NarrowGlyphs[]; // EFI_WIDE_GLYPH WideGlyphs[]; } EFI_HII_SIMPLE_FONT_PACKAGE_HDR; @@ -172,21 +164,21 @@ typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR { // // Value for font style // -#define EFI_HII_FONT_STYLE_NORMAL 0x00000000 -#define EFI_HII_FONT_STYLE_BOLD 0x00000001 -#define EFI_HII_FONT_STYLE_ITALIC 0x00000002 -#define EFI_HII_FONT_STYLE_EMBOSS 0x00010000 -#define EFI_HII_FONT_STYLE_OUTLINE 0x00020000 -#define EFI_HII_FONT_STYLE_SHADOW 0x00040000 -#define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000 -#define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000 +#define EFI_HII_FONT_STYLE_NORMAL 0x00000000 +#define EFI_HII_FONT_STYLE_BOLD 0x00000001 +#define EFI_HII_FONT_STYLE_ITALIC 0x00000002 +#define EFI_HII_FONT_STYLE_EMBOSS 0x00010000 +#define EFI_HII_FONT_STYLE_OUTLINE 0x00020000 +#define EFI_HII_FONT_STYLE_SHADOW 0x00040000 +#define EFI_HII_FONT_STYLE_UNDERLINE 0x00080000 +#define EFI_HII_FONT_STYLE_DBL_UNDER 0x00100000 typedef struct _EFI_HII_GLYPH_INFO { - UINT16 Width; - UINT16 Height; - INT16 OffsetX; - INT16 OffsetY; - INT16 AdvanceX; + UINT16 Width; + UINT16 Height; + INT16 OffsetX; + INT16 OffsetY; + INT16 AdvanceX; } EFI_HII_GLYPH_INFO; /// @@ -196,33 +188,33 @@ typedef struct _EFI_HII_GLYPH_INFO { /// information, the glyph bitmaps and the character map. /// typedef struct _EFI_HII_FONT_PACKAGE_HDR { - EFI_HII_PACKAGE_HEADER Header; - UINT32 HdrSize; - UINT32 GlyphBlockOffset; - EFI_HII_GLYPH_INFO Cell; - EFI_HII_FONT_STYLE FontStyle; - CHAR16 FontFamily[1]; + EFI_HII_PACKAGE_HEADER Header; + UINT32 HdrSize; + UINT32 GlyphBlockOffset; + EFI_HII_GLYPH_INFO Cell; + EFI_HII_FONT_STYLE FontStyle; + CHAR16 FontFamily[1]; } EFI_HII_FONT_PACKAGE_HDR; // // Value of different glyph info block types // -#define EFI_HII_GIBT_END 0x00 -#define EFI_HII_GIBT_GLYPH 0x10 -#define EFI_HII_GIBT_GLYPHS 0x11 -#define EFI_HII_GIBT_GLYPH_DEFAULT 0x12 -#define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13 -#define EFI_HII_GIBT_GLYPH_VARIABILITY 0x14 -#define EFI_HII_GIBT_DUPLICATE 0x20 -#define EFI_HII_GIBT_SKIP2 0x21 -#define EFI_HII_GIBT_SKIP1 0x22 -#define EFI_HII_GIBT_DEFAULTS 0x23 -#define EFI_HII_GIBT_EXT1 0x30 -#define EFI_HII_GIBT_EXT2 0x31 -#define EFI_HII_GIBT_EXT4 0x32 +#define EFI_HII_GIBT_END 0x00 +#define EFI_HII_GIBT_GLYPH 0x10 +#define EFI_HII_GIBT_GLYPHS 0x11 +#define EFI_HII_GIBT_GLYPH_DEFAULT 0x12 +#define EFI_HII_GIBT_GLYPHS_DEFAULT 0x13 +#define EFI_HII_GIBT_GLYPH_VARIABILITY 0x14 +#define EFI_HII_GIBT_DUPLICATE 0x20 +#define EFI_HII_GIBT_SKIP2 0x21 +#define EFI_HII_GIBT_SKIP1 0x22 +#define EFI_HII_GIBT_DEFAULTS 0x23 +#define EFI_HII_GIBT_EXT1 0x30 +#define EFI_HII_GIBT_EXT2 0x31 +#define EFI_HII_GIBT_EXT4 0x32 typedef struct _EFI_HII_GLYPH_BLOCK { - UINT8 BlockType; + UINT8 BlockType; } EFI_HII_GLYPH_BLOCK; // @@ -289,7 +281,7 @@ typedef struct _EFI_HII_GIBT_VARIABILITY_BLOCK { EFI_HII_GLYPH_BLOCK Header; EFI_HII_GLYPH_INFO Cell; UINT8 GlyphPackInBits; - UINT8 BitmapData [1]; + UINT8 BitmapData[1]; } EFI_HII_GIBT_VARIABILITY_BLOCK; typedef struct _EFI_HII_GIBT_SKIP1_BLOCK { @@ -312,7 +304,7 @@ typedef struct _EFI_HII_GIBT_SKIP2_BLOCK { /// associated with the package list. /// typedef struct _EFI_HII_DEVICE_PATH_PACKAGE_HDR { - EFI_HII_PACKAGE_HEADER Header; + EFI_HII_PACKAGE_HEADER Header; // EFI_DEVICE_PATH_PROTOCOL DevicePath[]; } EFI_HII_DEVICE_PATH_PACKAGE_HDR; @@ -325,8 +317,8 @@ typedef struct _EFI_HII_DEVICE_PATH_PACKAGE_HDR { /// The GUID package is used to carry data where the format is defined by a GUID. /// typedef struct _EFI_HII_GUID_PACKAGE_HDR { - EFI_HII_PACKAGE_HEADER Header; - EFI_GUID Guid; + EFI_HII_PACKAGE_HEADER Header; + EFI_GUID Guid; // Data per GUID definition may follow } EFI_HII_GUID_PACKAGE_HDR; @@ -335,45 +327,45 @@ typedef struct _EFI_HII_GUID_PACKAGE_HDR { // Section 27.3.6 // -#define UEFI_CONFIG_LANG "x-UEFI" -#define UEFI_CONFIG_LANG_2 "x-i-UEFI" +#define UEFI_CONFIG_LANG "x-UEFI" +#define UEFI_CONFIG_LANG_2 "x-i-UEFI" /// /// The fixed header consists of a standard record header and then the string identifiers /// contained in this section and the offsets of the string and language information. /// typedef struct _EFI_HII_STRING_PACKAGE_HDR { - EFI_HII_PACKAGE_HEADER Header; - UINT32 HdrSize; - UINT32 StringInfoOffset; - CHAR16 LanguageWindow[16]; - EFI_STRING_ID LanguageName; - CHAR8 Language[1]; + EFI_HII_PACKAGE_HEADER Header; + UINT32 HdrSize; + UINT32 StringInfoOffset; + CHAR16 LanguageWindow[16]; + EFI_STRING_ID LanguageName; + CHAR8 Language[1]; } EFI_HII_STRING_PACKAGE_HDR; typedef struct { - UINT8 BlockType; + UINT8 BlockType; } EFI_HII_STRING_BLOCK; // // Value of different string information block types // -#define EFI_HII_SIBT_END 0x00 -#define EFI_HII_SIBT_STRING_SCSU 0x10 -#define EFI_HII_SIBT_STRING_SCSU_FONT 0x11 -#define EFI_HII_SIBT_STRINGS_SCSU 0x12 -#define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13 -#define EFI_HII_SIBT_STRING_UCS2 0x14 -#define EFI_HII_SIBT_STRING_UCS2_FONT 0x15 -#define EFI_HII_SIBT_STRINGS_UCS2 0x16 -#define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17 -#define EFI_HII_SIBT_DUPLICATE 0x20 -#define EFI_HII_SIBT_SKIP2 0x21 -#define EFI_HII_SIBT_SKIP1 0x22 -#define EFI_HII_SIBT_EXT1 0x30 -#define EFI_HII_SIBT_EXT2 0x31 -#define EFI_HII_SIBT_EXT4 0x32 -#define EFI_HII_SIBT_FONT 0x40 +#define EFI_HII_SIBT_END 0x00 +#define EFI_HII_SIBT_STRING_SCSU 0x10 +#define EFI_HII_SIBT_STRING_SCSU_FONT 0x11 +#define EFI_HII_SIBT_STRINGS_SCSU 0x12 +#define EFI_HII_SIBT_STRINGS_SCSU_FONT 0x13 +#define EFI_HII_SIBT_STRING_UCS2 0x14 +#define EFI_HII_SIBT_STRING_UCS2_FONT 0x15 +#define EFI_HII_SIBT_STRINGS_UCS2 0x16 +#define EFI_HII_SIBT_STRINGS_UCS2_FONT 0x17 +#define EFI_HII_SIBT_DUPLICATE 0x20 +#define EFI_HII_SIBT_SKIP2 0x21 +#define EFI_HII_SIBT_SKIP1 0x22 +#define EFI_HII_SIBT_EXT1 0x30 +#define EFI_HII_SIBT_EXT2 0x31 +#define EFI_HII_SIBT_EXT4 0x32 +#define EFI_HII_SIBT_FONT 0x40 // // Definition of different string information block types @@ -407,11 +399,11 @@ typedef struct _EFI_HII_SIBT_EXT4_BLOCK { } EFI_HII_SIBT_EXT4_BLOCK; typedef struct _EFI_HII_SIBT_FONT_BLOCK { - EFI_HII_SIBT_EXT2_BLOCK Header; - UINT8 FontId; - UINT16 FontSize; - EFI_HII_FONT_STYLE FontStyle; - CHAR16 FontName[1]; + EFI_HII_SIBT_EXT2_BLOCK Header; + UINT8 FontId; + UINT16 FontSize; + EFI_HII_FONT_STYLE FontStyle; + CHAR16 FontName[1]; } EFI_HII_SIBT_FONT_BLOCK; typedef struct _EFI_HII_SIBT_SKIP1_BLOCK { @@ -478,163 +470,163 @@ typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK { // typedef struct _EFI_HII_IMAGE_PACKAGE_HDR { - EFI_HII_PACKAGE_HEADER Header; - UINT32 ImageInfoOffset; - UINT32 PaletteInfoOffset; + EFI_HII_PACKAGE_HEADER Header; + UINT32 ImageInfoOffset; + UINT32 PaletteInfoOffset; } EFI_HII_IMAGE_PACKAGE_HDR; typedef struct _EFI_HII_IMAGE_BLOCK { - UINT8 BlockType; + UINT8 BlockType; } EFI_HII_IMAGE_BLOCK; // // Value of different image information block types // -#define EFI_HII_IIBT_END 0x00 -#define EFI_HII_IIBT_IMAGE_1BIT 0x10 -#define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11 -#define EFI_HII_IIBT_IMAGE_4BIT 0x12 -#define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13 -#define EFI_HII_IIBT_IMAGE_8BIT 0x14 -#define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15 -#define EFI_HII_IIBT_IMAGE_24BIT 0x16 -#define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17 -#define EFI_HII_IIBT_IMAGE_JPEG 0x18 -#define EFI_HII_IIBT_IMAGE_PNG 0x19 -#define EFI_HII_IIBT_DUPLICATE 0x20 -#define EFI_HII_IIBT_SKIP2 0x21 -#define EFI_HII_IIBT_SKIP1 0x22 -#define EFI_HII_IIBT_EXT1 0x30 -#define EFI_HII_IIBT_EXT2 0x31 -#define EFI_HII_IIBT_EXT4 0x32 +#define EFI_HII_IIBT_END 0x00 +#define EFI_HII_IIBT_IMAGE_1BIT 0x10 +#define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11 +#define EFI_HII_IIBT_IMAGE_4BIT 0x12 +#define EFI_HII_IIBT_IMAGE_4BIT_TRANS 0x13 +#define EFI_HII_IIBT_IMAGE_8BIT 0x14 +#define EFI_HII_IIBT_IMAGE_8BIT_TRANS 0x15 +#define EFI_HII_IIBT_IMAGE_24BIT 0x16 +#define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17 +#define EFI_HII_IIBT_IMAGE_JPEG 0x18 +#define EFI_HII_IIBT_IMAGE_PNG 0x19 +#define EFI_HII_IIBT_DUPLICATE 0x20 +#define EFI_HII_IIBT_SKIP2 0x21 +#define EFI_HII_IIBT_SKIP1 0x22 +#define EFI_HII_IIBT_EXT1 0x30 +#define EFI_HII_IIBT_EXT2 0x31 +#define EFI_HII_IIBT_EXT4 0x32 // // Definition of different image information block types // typedef struct _EFI_HII_IIBT_END_BLOCK { - EFI_HII_IMAGE_BLOCK Header; + EFI_HII_IMAGE_BLOCK Header; } EFI_HII_IIBT_END_BLOCK; typedef struct _EFI_HII_IIBT_EXT1_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 BlockType2; - UINT8 Length; + EFI_HII_IMAGE_BLOCK Header; + UINT8 BlockType2; + UINT8 Length; } EFI_HII_IIBT_EXT1_BLOCK; typedef struct _EFI_HII_IIBT_EXT2_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 BlockType2; - UINT16 Length; + EFI_HII_IMAGE_BLOCK Header; + UINT8 BlockType2; + UINT16 Length; } EFI_HII_IIBT_EXT2_BLOCK; typedef struct _EFI_HII_IIBT_EXT4_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 BlockType2; - UINT32 Length; + EFI_HII_IMAGE_BLOCK Header; + UINT8 BlockType2; + UINT32 Length; } EFI_HII_IIBT_EXT4_BLOCK; typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BASE { - UINT16 Width; - UINT16 Height; - UINT8 Data[1]; + UINT16 Width; + UINT16 Height; + UINT8 Data[1]; } EFI_HII_IIBT_IMAGE_1BIT_BASE; typedef struct _EFI_HII_IIBT_IMAGE_1BIT_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 PaletteIndex; - EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + UINT8 PaletteIndex; + EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_1BIT_BLOCK; typedef struct _EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 PaletteIndex; - EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + UINT8 PaletteIndex; + EFI_HII_IIBT_IMAGE_1BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_1BIT_TRANS_BLOCK; typedef struct _EFI_HII_RGB_PIXEL { - UINT8 b; - UINT8 g; - UINT8 r; + UINT8 b; + UINT8 g; + UINT8 r; } EFI_HII_RGB_PIXEL; typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BASE { - UINT16 Width; - UINT16 Height; - EFI_HII_RGB_PIXEL Bitmap[1]; + UINT16 Width; + UINT16 Height; + EFI_HII_RGB_PIXEL Bitmap[1]; } EFI_HII_IIBT_IMAGE_24BIT_BASE; typedef struct _EFI_HII_IIBT_IMAGE_24BIT_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_24BIT_BLOCK; typedef struct _EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + EFI_HII_IIBT_IMAGE_24BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_24BIT_TRANS_BLOCK; typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BASE { - UINT16 Width; - UINT16 Height; - UINT8 Data[1]; + UINT16 Width; + UINT16 Height; + UINT8 Data[1]; } EFI_HII_IIBT_IMAGE_4BIT_BASE; typedef struct _EFI_HII_IIBT_IMAGE_4BIT_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 PaletteIndex; - EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + UINT8 PaletteIndex; + EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_4BIT_BLOCK; typedef struct _EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 PaletteIndex; - EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + UINT8 PaletteIndex; + EFI_HII_IIBT_IMAGE_4BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_4BIT_TRANS_BLOCK; typedef struct _EFI_HII_IIBT_IMAGE_8BIT_BASE { - UINT16 Width; - UINT16 Height; - UINT8 Data[1]; + UINT16 Width; + UINT16 Height; + UINT8 Data[1]; } EFI_HII_IIBT_IMAGE_8BIT_BASE; typedef struct _EFI_HII_IIBT_IMAGE_8BIT_PALETTE_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 PaletteIndex; - EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + UINT8 PaletteIndex; + EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_8BIT_BLOCK; typedef struct _EFI_HII_IIBT_IMAGE_8BIT_TRANS_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 PaletteIndex; - EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap; + EFI_HII_IMAGE_BLOCK Header; + UINT8 PaletteIndex; + EFI_HII_IIBT_IMAGE_8BIT_BASE Bitmap; } EFI_HII_IIBT_IMAGE_8BIT_TRAN_BLOCK; typedef struct _EFI_HII_IIBT_DUPLICATE_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - EFI_IMAGE_ID ImageId; + EFI_HII_IMAGE_BLOCK Header; + EFI_IMAGE_ID ImageId; } EFI_HII_IIBT_DUPLICATE_BLOCK; typedef struct _EFI_HII_IIBT_JPEG_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT32 Size; - UINT8 Data[1]; + EFI_HII_IMAGE_BLOCK Header; + UINT32 Size; + UINT8 Data[1]; } EFI_HII_IIBT_JPEG_BLOCK; typedef struct _EFI_HII_IIBT_PNG_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT32 Size; - UINT8 Data[1]; + EFI_HII_IMAGE_BLOCK Header; + UINT32 Size; + UINT8 Data[1]; } EFI_HII_IIBT_PNG_BLOCK; typedef struct _EFI_HII_IIBT_SKIP1_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT8 SkipCount; + EFI_HII_IMAGE_BLOCK Header; + UINT8 SkipCount; } EFI_HII_IIBT_SKIP1_BLOCK; typedef struct _EFI_HII_IIBT_SKIP2_BLOCK { - EFI_HII_IMAGE_BLOCK Header; - UINT16 SkipCount; + EFI_HII_IMAGE_BLOCK Header; + UINT16 SkipCount; } EFI_HII_IIBT_SKIP2_BLOCK; // @@ -642,12 +634,12 @@ typedef struct _EFI_HII_IIBT_SKIP2_BLOCK { // typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER { - UINT16 PaletteCount; + UINT16 PaletteCount; } EFI_HII_IMAGE_PALETTE_INFO_HEADER; typedef struct _EFI_HII_IMAGE_PALETTE_INFO { - UINT16 PaletteSize; - EFI_HII_RGB_PIXEL PaletteValue[1]; + UINT16 PaletteSize; + EFI_HII_RGB_PIXEL PaletteValue[1]; } EFI_HII_IMAGE_PALETTE_INFO; // @@ -659,146 +651,146 @@ typedef struct _EFI_HII_IMAGE_PALETTE_INFO { /// The Form package is used to carry form-based encoding data. /// typedef struct _EFI_HII_FORM_PACKAGE_HDR { - EFI_HII_PACKAGE_HEADER Header; + EFI_HII_PACKAGE_HEADER Header; // EFI_IFR_OP_HEADER OpCodeHeader; // More op-codes follow } EFI_HII_FORM_PACKAGE_HDR; typedef struct { - UINT8 Hour; - UINT8 Minute; - UINT8 Second; + UINT8 Hour; + UINT8 Minute; + UINT8 Second; } EFI_HII_TIME; typedef struct { - UINT16 Year; - UINT8 Month; - UINT8 Day; + UINT16 Year; + UINT8 Month; + UINT8 Day; } EFI_HII_DATE; typedef struct { - EFI_QUESTION_ID QuestionId; - EFI_FORM_ID FormId; - EFI_GUID FormSetGuid; - EFI_STRING_ID DevicePath; + EFI_QUESTION_ID QuestionId; + EFI_FORM_ID FormId; + EFI_GUID FormSetGuid; + EFI_STRING_ID DevicePath; } EFI_HII_REF; typedef union { - UINT8 u8; - UINT16 u16; - UINT32 u32; - UINT64 u64; - BOOLEAN b; - EFI_HII_TIME time; - EFI_HII_DATE date; - EFI_STRING_ID string; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION - EFI_HII_REF ref; ///< EFI_IFR_TYPE_REF + UINT8 u8; + UINT16 u16; + UINT32 u32; + UINT64 u64; + BOOLEAN b; + EFI_HII_TIME time; + EFI_HII_DATE date; + EFI_STRING_ID string; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION + EFI_HII_REF ref; ///< EFI_IFR_TYPE_REF // UINT8 buffer[]; ///< EFI_IFR_TYPE_BUFFER } EFI_IFR_TYPE_VALUE; // // IFR Opcodes // -#define EFI_IFR_FORM_OP 0x01 -#define EFI_IFR_SUBTITLE_OP 0x02 -#define EFI_IFR_TEXT_OP 0x03 -#define EFI_IFR_IMAGE_OP 0x04 -#define EFI_IFR_ONE_OF_OP 0x05 -#define EFI_IFR_CHECKBOX_OP 0x06 -#define EFI_IFR_NUMERIC_OP 0x07 -#define EFI_IFR_PASSWORD_OP 0x08 -#define EFI_IFR_ONE_OF_OPTION_OP 0x09 -#define EFI_IFR_SUPPRESS_IF_OP 0x0A -#define EFI_IFR_LOCKED_OP 0x0B -#define EFI_IFR_ACTION_OP 0x0C -#define EFI_IFR_RESET_BUTTON_OP 0x0D -#define EFI_IFR_FORM_SET_OP 0x0E -#define EFI_IFR_REF_OP 0x0F -#define EFI_IFR_NO_SUBMIT_IF_OP 0x10 -#define EFI_IFR_INCONSISTENT_IF_OP 0x11 -#define EFI_IFR_EQ_ID_VAL_OP 0x12 -#define EFI_IFR_EQ_ID_ID_OP 0x13 -#define EFI_IFR_EQ_ID_VAL_LIST_OP 0x14 -#define EFI_IFR_AND_OP 0x15 -#define EFI_IFR_OR_OP 0x16 -#define EFI_IFR_NOT_OP 0x17 -#define EFI_IFR_RULE_OP 0x18 -#define EFI_IFR_GRAY_OUT_IF_OP 0x19 -#define EFI_IFR_DATE_OP 0x1A -#define EFI_IFR_TIME_OP 0x1B -#define EFI_IFR_STRING_OP 0x1C -#define EFI_IFR_REFRESH_OP 0x1D -#define EFI_IFR_DISABLE_IF_OP 0x1E -#define EFI_IFR_ANIMATION_OP 0x1F -#define EFI_IFR_TO_LOWER_OP 0x20 -#define EFI_IFR_TO_UPPER_OP 0x21 -#define EFI_IFR_MAP_OP 0x22 -#define EFI_IFR_ORDERED_LIST_OP 0x23 -#define EFI_IFR_VARSTORE_OP 0x24 -#define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25 -#define EFI_IFR_VARSTORE_EFI_OP 0x26 -#define EFI_IFR_VARSTORE_DEVICE_OP 0x27 -#define EFI_IFR_VERSION_OP 0x28 -#define EFI_IFR_END_OP 0x29 -#define EFI_IFR_MATCH_OP 0x2A -#define EFI_IFR_GET_OP 0x2B -#define EFI_IFR_SET_OP 0x2C -#define EFI_IFR_READ_OP 0x2D -#define EFI_IFR_WRITE_OP 0x2E -#define EFI_IFR_EQUAL_OP 0x2F -#define EFI_IFR_NOT_EQUAL_OP 0x30 -#define EFI_IFR_GREATER_THAN_OP 0x31 -#define EFI_IFR_GREATER_EQUAL_OP 0x32 -#define EFI_IFR_LESS_THAN_OP 0x33 -#define EFI_IFR_LESS_EQUAL_OP 0x34 -#define EFI_IFR_BITWISE_AND_OP 0x35 -#define EFI_IFR_BITWISE_OR_OP 0x36 -#define EFI_IFR_BITWISE_NOT_OP 0x37 -#define EFI_IFR_SHIFT_LEFT_OP 0x38 -#define EFI_IFR_SHIFT_RIGHT_OP 0x39 -#define EFI_IFR_ADD_OP 0x3A -#define EFI_IFR_SUBTRACT_OP 0x3B -#define EFI_IFR_MULTIPLY_OP 0x3C -#define EFI_IFR_DIVIDE_OP 0x3D -#define EFI_IFR_MODULO_OP 0x3E -#define EFI_IFR_RULE_REF_OP 0x3F -#define EFI_IFR_QUESTION_REF1_OP 0x40 -#define EFI_IFR_QUESTION_REF2_OP 0x41 -#define EFI_IFR_UINT8_OP 0x42 -#define EFI_IFR_UINT16_OP 0x43 -#define EFI_IFR_UINT32_OP 0x44 -#define EFI_IFR_UINT64_OP 0x45 -#define EFI_IFR_TRUE_OP 0x46 -#define EFI_IFR_FALSE_OP 0x47 -#define EFI_IFR_TO_UINT_OP 0x48 -#define EFI_IFR_TO_STRING_OP 0x49 -#define EFI_IFR_TO_BOOLEAN_OP 0x4A -#define EFI_IFR_MID_OP 0x4B -#define EFI_IFR_FIND_OP 0x4C -#define EFI_IFR_TOKEN_OP 0x4D -#define EFI_IFR_STRING_REF1_OP 0x4E -#define EFI_IFR_STRING_REF2_OP 0x4F -#define EFI_IFR_CONDITIONAL_OP 0x50 -#define EFI_IFR_QUESTION_REF3_OP 0x51 -#define EFI_IFR_ZERO_OP 0x52 -#define EFI_IFR_ONE_OP 0x53 -#define EFI_IFR_ONES_OP 0x54 -#define EFI_IFR_UNDEFINED_OP 0x55 -#define EFI_IFR_LENGTH_OP 0x56 -#define EFI_IFR_DUP_OP 0x57 -#define EFI_IFR_THIS_OP 0x58 -#define EFI_IFR_SPAN_OP 0x59 -#define EFI_IFR_VALUE_OP 0x5A -#define EFI_IFR_DEFAULT_OP 0x5B -#define EFI_IFR_DEFAULTSTORE_OP 0x5C -#define EFI_IFR_FORM_MAP_OP 0x5D -#define EFI_IFR_CATENATE_OP 0x5E -#define EFI_IFR_GUID_OP 0x5F -#define EFI_IFR_SECURITY_OP 0x60 -#define EFI_IFR_MODAL_TAG_OP 0x61 -#define EFI_IFR_REFRESH_ID_OP 0x62 -#define EFI_IFR_WARNING_IF_OP 0x63 -#define EFI_IFR_MATCH2_OP 0x64 +#define EFI_IFR_FORM_OP 0x01 +#define EFI_IFR_SUBTITLE_OP 0x02 +#define EFI_IFR_TEXT_OP 0x03 +#define EFI_IFR_IMAGE_OP 0x04 +#define EFI_IFR_ONE_OF_OP 0x05 +#define EFI_IFR_CHECKBOX_OP 0x06 +#define EFI_IFR_NUMERIC_OP 0x07 +#define EFI_IFR_PASSWORD_OP 0x08 +#define EFI_IFR_ONE_OF_OPTION_OP 0x09 +#define EFI_IFR_SUPPRESS_IF_OP 0x0A +#define EFI_IFR_LOCKED_OP 0x0B +#define EFI_IFR_ACTION_OP 0x0C +#define EFI_IFR_RESET_BUTTON_OP 0x0D +#define EFI_IFR_FORM_SET_OP 0x0E +#define EFI_IFR_REF_OP 0x0F +#define EFI_IFR_NO_SUBMIT_IF_OP 0x10 +#define EFI_IFR_INCONSISTENT_IF_OP 0x11 +#define EFI_IFR_EQ_ID_VAL_OP 0x12 +#define EFI_IFR_EQ_ID_ID_OP 0x13 +#define EFI_IFR_EQ_ID_VAL_LIST_OP 0x14 +#define EFI_IFR_AND_OP 0x15 +#define EFI_IFR_OR_OP 0x16 +#define EFI_IFR_NOT_OP 0x17 +#define EFI_IFR_RULE_OP 0x18 +#define EFI_IFR_GRAY_OUT_IF_OP 0x19 +#define EFI_IFR_DATE_OP 0x1A +#define EFI_IFR_TIME_OP 0x1B +#define EFI_IFR_STRING_OP 0x1C +#define EFI_IFR_REFRESH_OP 0x1D +#define EFI_IFR_DISABLE_IF_OP 0x1E +#define EFI_IFR_ANIMATION_OP 0x1F +#define EFI_IFR_TO_LOWER_OP 0x20 +#define EFI_IFR_TO_UPPER_OP 0x21 +#define EFI_IFR_MAP_OP 0x22 +#define EFI_IFR_ORDERED_LIST_OP 0x23 +#define EFI_IFR_VARSTORE_OP 0x24 +#define EFI_IFR_VARSTORE_NAME_VALUE_OP 0x25 +#define EFI_IFR_VARSTORE_EFI_OP 0x26 +#define EFI_IFR_VARSTORE_DEVICE_OP 0x27 +#define EFI_IFR_VERSION_OP 0x28 +#define EFI_IFR_END_OP 0x29 +#define EFI_IFR_MATCH_OP 0x2A +#define EFI_IFR_GET_OP 0x2B +#define EFI_IFR_SET_OP 0x2C +#define EFI_IFR_READ_OP 0x2D +#define EFI_IFR_WRITE_OP 0x2E +#define EFI_IFR_EQUAL_OP 0x2F +#define EFI_IFR_NOT_EQUAL_OP 0x30 +#define EFI_IFR_GREATER_THAN_OP 0x31 +#define EFI_IFR_GREATER_EQUAL_OP 0x32 +#define EFI_IFR_LESS_THAN_OP 0x33 +#define EFI_IFR_LESS_EQUAL_OP 0x34 +#define EFI_IFR_BITWISE_AND_OP 0x35 +#define EFI_IFR_BITWISE_OR_OP 0x36 +#define EFI_IFR_BITWISE_NOT_OP 0x37 +#define EFI_IFR_SHIFT_LEFT_OP 0x38 +#define EFI_IFR_SHIFT_RIGHT_OP 0x39 +#define EFI_IFR_ADD_OP 0x3A +#define EFI_IFR_SUBTRACT_OP 0x3B +#define EFI_IFR_MULTIPLY_OP 0x3C +#define EFI_IFR_DIVIDE_OP 0x3D +#define EFI_IFR_MODULO_OP 0x3E +#define EFI_IFR_RULE_REF_OP 0x3F +#define EFI_IFR_QUESTION_REF1_OP 0x40 +#define EFI_IFR_QUESTION_REF2_OP 0x41 +#define EFI_IFR_UINT8_OP 0x42 +#define EFI_IFR_UINT16_OP 0x43 +#define EFI_IFR_UINT32_OP 0x44 +#define EFI_IFR_UINT64_OP 0x45 +#define EFI_IFR_TRUE_OP 0x46 +#define EFI_IFR_FALSE_OP 0x47 +#define EFI_IFR_TO_UINT_OP 0x48 +#define EFI_IFR_TO_STRING_OP 0x49 +#define EFI_IFR_TO_BOOLEAN_OP 0x4A +#define EFI_IFR_MID_OP 0x4B +#define EFI_IFR_FIND_OP 0x4C +#define EFI_IFR_TOKEN_OP 0x4D +#define EFI_IFR_STRING_REF1_OP 0x4E +#define EFI_IFR_STRING_REF2_OP 0x4F +#define EFI_IFR_CONDITIONAL_OP 0x50 +#define EFI_IFR_QUESTION_REF3_OP 0x51 +#define EFI_IFR_ZERO_OP 0x52 +#define EFI_IFR_ONE_OP 0x53 +#define EFI_IFR_ONES_OP 0x54 +#define EFI_IFR_UNDEFINED_OP 0x55 +#define EFI_IFR_LENGTH_OP 0x56 +#define EFI_IFR_DUP_OP 0x57 +#define EFI_IFR_THIS_OP 0x58 +#define EFI_IFR_SPAN_OP 0x59 +#define EFI_IFR_VALUE_OP 0x5A +#define EFI_IFR_DEFAULT_OP 0x5B +#define EFI_IFR_DEFAULTSTORE_OP 0x5C +#define EFI_IFR_FORM_MAP_OP 0x5D +#define EFI_IFR_CATENATE_OP 0x5E +#define EFI_IFR_GUID_OP 0x5F +#define EFI_IFR_SECURITY_OP 0x60 +#define EFI_IFR_MODAL_TAG_OP 0x61 +#define EFI_IFR_REFRESH_ID_OP 0x62 +#define EFI_IFR_WARNING_IF_OP 0x63 +#define EFI_IFR_MATCH2_OP 0x64 // // Definitions of IFR Standard Headers @@ -806,529 +798,530 @@ typedef union { // typedef struct _EFI_IFR_OP_HEADER { - UINT8 OpCode; - UINT8 Length:7; - UINT8 Scope:1; + UINT8 OpCode; + UINT8 Length : 7; + UINT8 Scope : 1; } EFI_IFR_OP_HEADER; typedef struct _EFI_IFR_STATEMENT_HEADER { - EFI_STRING_ID Prompt; - EFI_STRING_ID Help; + EFI_STRING_ID Prompt; + EFI_STRING_ID Help; } EFI_IFR_STATEMENT_HEADER; typedef struct _EFI_IFR_QUESTION_HEADER { - EFI_IFR_STATEMENT_HEADER Header; - EFI_QUESTION_ID QuestionId; - EFI_VARSTORE_ID VarStoreId; + EFI_IFR_STATEMENT_HEADER Header; + EFI_QUESTION_ID QuestionId; + EFI_VARSTORE_ID VarStoreId; union { - EFI_STRING_ID VarName; - UINT16 VarOffset; + EFI_STRING_ID VarName; + UINT16 VarOffset; } VarStoreInfo; - UINT8 Flags; + UINT8 Flags; } EFI_IFR_QUESTION_HEADER; // // Flag values of EFI_IFR_QUESTION_HEADER // -#define EFI_IFR_FLAG_READ_ONLY 0x01 -#define EFI_IFR_FLAG_CALLBACK 0x04 -#define EFI_IFR_FLAG_RESET_REQUIRED 0x10 -#define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40 -#define EFI_IFR_FLAG_OPTIONS_ONLY 0x80 +#define EFI_IFR_FLAG_READ_ONLY 0x01 +#define EFI_IFR_FLAG_CALLBACK 0x04 +#define EFI_IFR_FLAG_RESET_REQUIRED 0x10 +#define EFI_IFR_FLAG_REST_STYLE 0x20 +#define EFI_IFR_FLAG_RECONNECT_REQUIRED 0x40 +#define EFI_IFR_FLAG_OPTIONS_ONLY 0x80 // // Definition for Opcode Reference // Section 27.3.8.3 // typedef struct _EFI_IFR_DEFAULTSTORE { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID DefaultName; - UINT16 DefaultId; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID DefaultName; + UINT16 DefaultId; } EFI_IFR_DEFAULTSTORE; // // Default Identifier of default store // -#define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000 -#define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001 -#define EFI_HII_DEFAULT_CLASS_SAFE 0x0002 -#define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000 -#define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff -#define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000 -#define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff -#define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000 -#define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff +#define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000 +#define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001 +#define EFI_HII_DEFAULT_CLASS_SAFE 0x0002 +#define EFI_HII_DEFAULT_CLASS_PLATFORM_BEGIN 0x4000 +#define EFI_HII_DEFAULT_CLASS_PLATFORM_END 0x7fff +#define EFI_HII_DEFAULT_CLASS_HARDWARE_BEGIN 0x8000 +#define EFI_HII_DEFAULT_CLASS_HARDWARE_END 0xbfff +#define EFI_HII_DEFAULT_CLASS_FIRMWARE_BEGIN 0xc000 +#define EFI_HII_DEFAULT_CLASS_FIRMWARE_END 0xffff typedef struct _EFI_IFR_VARSTORE { - EFI_IFR_OP_HEADER Header; - EFI_GUID Guid; - EFI_VARSTORE_ID VarStoreId; - UINT16 Size; - UINT8 Name[1]; + EFI_IFR_OP_HEADER Header; + EFI_GUID Guid; + EFI_VARSTORE_ID VarStoreId; + UINT16 Size; + UINT8 Name[1]; } EFI_IFR_VARSTORE; typedef struct _EFI_IFR_VARSTORE_EFI { - EFI_IFR_OP_HEADER Header; - EFI_VARSTORE_ID VarStoreId; - EFI_GUID Guid; - UINT32 Attributes; - UINT16 Size; - UINT8 Name[1]; + EFI_IFR_OP_HEADER Header; + EFI_VARSTORE_ID VarStoreId; + EFI_GUID Guid; + UINT32 Attributes; + UINT16 Size; + UINT8 Name[1]; } EFI_IFR_VARSTORE_EFI; typedef struct _EFI_IFR_VARSTORE_NAME_VALUE { - EFI_IFR_OP_HEADER Header; - EFI_VARSTORE_ID VarStoreId; - EFI_GUID Guid; + EFI_IFR_OP_HEADER Header; + EFI_VARSTORE_ID VarStoreId; + EFI_GUID Guid; } EFI_IFR_VARSTORE_NAME_VALUE; typedef struct _EFI_IFR_FORM_SET { - EFI_IFR_OP_HEADER Header; - EFI_GUID Guid; - EFI_STRING_ID FormSetTitle; - EFI_STRING_ID Help; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + EFI_GUID Guid; + EFI_STRING_ID FormSetTitle; + EFI_STRING_ID Help; + UINT8 Flags; // EFI_GUID ClassGuid[]; } EFI_IFR_FORM_SET; typedef struct _EFI_IFR_END { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_END; typedef struct _EFI_IFR_FORM { - EFI_IFR_OP_HEADER Header; - UINT16 FormId; - EFI_STRING_ID FormTitle; + EFI_IFR_OP_HEADER Header; + UINT16 FormId; + EFI_STRING_ID FormTitle; } EFI_IFR_FORM; typedef struct _EFI_IFR_IMAGE { - EFI_IFR_OP_HEADER Header; - EFI_IMAGE_ID Id; + EFI_IFR_OP_HEADER Header; + EFI_IMAGE_ID Id; } EFI_IFR_IMAGE; typedef struct _EFI_IFR_MODAL_TAG { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_MODAL_TAG; typedef struct _EFI_IFR_LOCKED { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_LOCKED; typedef struct _EFI_IFR_RULE { - EFI_IFR_OP_HEADER Header; - UINT8 RuleId; + EFI_IFR_OP_HEADER Header; + UINT8 RuleId; } EFI_IFR_RULE; typedef struct _EFI_IFR_DEFAULT { - EFI_IFR_OP_HEADER Header; - UINT16 DefaultId; - UINT8 Type; - EFI_IFR_TYPE_VALUE Value; + EFI_IFR_OP_HEADER Header; + UINT16 DefaultId; + UINT8 Type; + EFI_IFR_TYPE_VALUE Value; } EFI_IFR_DEFAULT; typedef struct _EFI_IFR_DEFAULT_2 { - EFI_IFR_OP_HEADER Header; - UINT16 DefaultId; - UINT8 Type; + EFI_IFR_OP_HEADER Header; + UINT16 DefaultId; + UINT8 Type; } EFI_IFR_DEFAULT_2; typedef struct _EFI_IFR_VALUE { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_VALUE; typedef struct _EFI_IFR_SUBTITLE { - EFI_IFR_OP_HEADER Header; - EFI_IFR_STATEMENT_HEADER Statement; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + EFI_IFR_STATEMENT_HEADER Statement; + UINT8 Flags; } EFI_IFR_SUBTITLE; -#define EFI_IFR_FLAGS_HORIZONTAL 0x01 +#define EFI_IFR_FLAGS_HORIZONTAL 0x01 typedef struct _EFI_IFR_CHECKBOX { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT8 Flags; } EFI_IFR_CHECKBOX; -#define EFI_IFR_CHECKBOX_DEFAULT 0x01 -#define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02 +#define EFI_IFR_CHECKBOX_DEFAULT 0x01 +#define EFI_IFR_CHECKBOX_DEFAULT_MFG 0x02 typedef struct _EFI_IFR_TEXT { - EFI_IFR_OP_HEADER Header; - EFI_IFR_STATEMENT_HEADER Statement; - EFI_STRING_ID TextTwo; + EFI_IFR_OP_HEADER Header; + EFI_IFR_STATEMENT_HEADER Statement; + EFI_STRING_ID TextTwo; } EFI_IFR_TEXT; typedef struct _EFI_IFR_REF { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - EFI_FORM_ID FormId; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + EFI_FORM_ID FormId; } EFI_IFR_REF; typedef struct _EFI_IFR_REF2 { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - EFI_FORM_ID FormId; - EFI_QUESTION_ID QuestionId; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + EFI_FORM_ID FormId; + EFI_QUESTION_ID QuestionId; } EFI_IFR_REF2; typedef struct _EFI_IFR_REF3 { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - EFI_FORM_ID FormId; - EFI_QUESTION_ID QuestionId; - EFI_GUID FormSetId; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + EFI_FORM_ID FormId; + EFI_QUESTION_ID QuestionId; + EFI_GUID FormSetId; } EFI_IFR_REF3; typedef struct _EFI_IFR_REF4 { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - EFI_FORM_ID FormId; - EFI_QUESTION_ID QuestionId; - EFI_GUID FormSetId; - EFI_STRING_ID DevicePath; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + EFI_FORM_ID FormId; + EFI_QUESTION_ID QuestionId; + EFI_GUID FormSetId; + EFI_STRING_ID DevicePath; } EFI_IFR_REF4; typedef struct _EFI_IFR_REF5 { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; } EFI_IFR_REF5; typedef struct _EFI_IFR_RESET_BUTTON { - EFI_IFR_OP_HEADER Header; - EFI_IFR_STATEMENT_HEADER Statement; - EFI_DEFAULT_ID DefaultId; + EFI_IFR_OP_HEADER Header; + EFI_IFR_STATEMENT_HEADER Statement; + EFI_DEFAULT_ID DefaultId; } EFI_IFR_RESET_BUTTON; typedef struct _EFI_IFR_ACTION { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - EFI_STRING_ID QuestionConfig; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + EFI_STRING_ID QuestionConfig; } EFI_IFR_ACTION; typedef struct _EFI_IFR_ACTION_1 { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; } EFI_IFR_ACTION_1; typedef struct _EFI_IFR_DATE { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT8 Flags; } EFI_IFR_DATE; // // Flags that describe the behavior of the question. // -#define EFI_QF_DATE_YEAR_SUPPRESS 0x01 -#define EFI_QF_DATE_MONTH_SUPPRESS 0x02 -#define EFI_QF_DATE_DAY_SUPPRESS 0x04 +#define EFI_QF_DATE_YEAR_SUPPRESS 0x01 +#define EFI_QF_DATE_MONTH_SUPPRESS 0x02 +#define EFI_QF_DATE_DAY_SUPPRESS 0x04 -#define EFI_QF_DATE_STORAGE 0x30 -#define QF_DATE_STORAGE_NORMAL 0x00 -#define QF_DATE_STORAGE_TIME 0x10 -#define QF_DATE_STORAGE_WAKEUP 0x20 +#define EFI_QF_DATE_STORAGE 0x30 +#define QF_DATE_STORAGE_NORMAL 0x00 +#define QF_DATE_STORAGE_TIME 0x10 +#define QF_DATE_STORAGE_WAKEUP 0x20 typedef union { struct { - UINT8 MinValue; - UINT8 MaxValue; - UINT8 Step; + UINT8 MinValue; + UINT8 MaxValue; + UINT8 Step; } u8; struct { - UINT16 MinValue; - UINT16 MaxValue; - UINT16 Step; + UINT16 MinValue; + UINT16 MaxValue; + UINT16 Step; } u16; struct { - UINT32 MinValue; - UINT32 MaxValue; - UINT32 Step; + UINT32 MinValue; + UINT32 MaxValue; + UINT32 Step; } u32; struct { - UINT64 MinValue; - UINT64 MaxValue; - UINT64 Step; + UINT64 MinValue; + UINT64 MaxValue; + UINT64 Step; } u64; } MINMAXSTEP_DATA; typedef struct _EFI_IFR_NUMERIC { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT8 Flags; - MINMAXSTEP_DATA data; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT8 Flags; + MINMAXSTEP_DATA data; } EFI_IFR_NUMERIC; // // Flags related to the numeric question // -#define EFI_IFR_NUMERIC_SIZE 0x03 -#define EFI_IFR_NUMERIC_SIZE_1 0x00 -#define EFI_IFR_NUMERIC_SIZE_2 0x01 -#define EFI_IFR_NUMERIC_SIZE_4 0x02 -#define EFI_IFR_NUMERIC_SIZE_8 0x03 +#define EFI_IFR_NUMERIC_SIZE 0x03 +#define EFI_IFR_NUMERIC_SIZE_1 0x00 +#define EFI_IFR_NUMERIC_SIZE_2 0x01 +#define EFI_IFR_NUMERIC_SIZE_4 0x02 +#define EFI_IFR_NUMERIC_SIZE_8 0x03 -#define EFI_IFR_DISPLAY 0x30 -#define EFI_IFR_DISPLAY_INT_DEC 0x00 -#define EFI_IFR_DISPLAY_UINT_DEC 0x10 -#define EFI_IFR_DISPLAY_UINT_HEX 0x20 +#define EFI_IFR_DISPLAY 0x30 +#define EFI_IFR_DISPLAY_INT_DEC 0x00 +#define EFI_IFR_DISPLAY_UINT_DEC 0x10 +#define EFI_IFR_DISPLAY_UINT_HEX 0x20 typedef struct _EFI_IFR_ONE_OF { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT8 Flags; - MINMAXSTEP_DATA data; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT8 Flags; + MINMAXSTEP_DATA data; } EFI_IFR_ONE_OF; typedef struct _EFI_IFR_STRING { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT8 MinSize; - UINT8 MaxSize; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT8 MinSize; + UINT8 MaxSize; + UINT8 Flags; } EFI_IFR_STRING; -#define EFI_IFR_STRING_MULTI_LINE 0x01 +#define EFI_IFR_STRING_MULTI_LINE 0x01 typedef struct _EFI_IFR_PASSWORD { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT16 MinSize; - UINT16 MaxSize; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT16 MinSize; + UINT16 MaxSize; } EFI_IFR_PASSWORD; typedef struct _EFI_IFR_ORDERED_LIST { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT8 MaxContainers; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT8 MaxContainers; + UINT8 Flags; } EFI_IFR_ORDERED_LIST; -#define EFI_IFR_UNIQUE_SET 0x01 -#define EFI_IFR_NO_EMPTY_SET 0x02 +#define EFI_IFR_UNIQUE_SET 0x01 +#define EFI_IFR_NO_EMPTY_SET 0x02 typedef struct _EFI_IFR_TIME { - EFI_IFR_OP_HEADER Header; - EFI_IFR_QUESTION_HEADER Question; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + EFI_IFR_QUESTION_HEADER Question; + UINT8 Flags; } EFI_IFR_TIME; // // A bit-mask that determines which unique settings are active for this opcode. // -#define QF_TIME_HOUR_SUPPRESS 0x01 -#define QF_TIME_MINUTE_SUPPRESS 0x02 -#define QF_TIME_SECOND_SUPPRESS 0x04 +#define QF_TIME_HOUR_SUPPRESS 0x01 +#define QF_TIME_MINUTE_SUPPRESS 0x02 +#define QF_TIME_SECOND_SUPPRESS 0x04 -#define QF_TIME_STORAGE 0x30 -#define QF_TIME_STORAGE_NORMAL 0x00 -#define QF_TIME_STORAGE_TIME 0x10 -#define QF_TIME_STORAGE_WAKEUP 0x20 +#define QF_TIME_STORAGE 0x30 +#define QF_TIME_STORAGE_NORMAL 0x00 +#define QF_TIME_STORAGE_TIME 0x10 +#define QF_TIME_STORAGE_WAKEUP 0x20 typedef struct _EFI_IFR_DISABLE_IF { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_DISABLE_IF; typedef struct _EFI_IFR_SUPPRESS_IF { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_SUPPRESS_IF; typedef struct _EFI_IFR_GRAY_OUT_IF { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_GRAY_OUT_IF; typedef struct _EFI_IFR_INCONSISTENT_IF { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID Error; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID Error; } EFI_IFR_INCONSISTENT_IF; typedef struct _EFI_IFR_NO_SUBMIT_IF { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID Error; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID Error; } EFI_IFR_NO_SUBMIT_IF; typedef struct _EFI_IFR_WARNING_IF { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID Warning; - UINT8 TimeOut; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID Warning; + UINT8 TimeOut; } EFI_IFR_WARNING_IF; typedef struct _EFI_IFR_REFRESH { - EFI_IFR_OP_HEADER Header; - UINT8 RefreshInterval; + EFI_IFR_OP_HEADER Header; + UINT8 RefreshInterval; } EFI_IFR_REFRESH; typedef struct _EFI_IFR_VARSTORE_DEVICE { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID DevicePath; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID DevicePath; } EFI_IFR_VARSTORE_DEVICE; typedef struct _EFI_IFR_ONE_OF_OPTION { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID Option; - UINT8 Flags; - UINT8 Type; - EFI_IFR_TYPE_VALUE Value; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID Option; + UINT8 Flags; + UINT8 Type; + EFI_IFR_TYPE_VALUE Value; } EFI_IFR_ONE_OF_OPTION; // // Types of the option's value. // -#define EFI_IFR_TYPE_NUM_SIZE_8 0x00 -#define EFI_IFR_TYPE_NUM_SIZE_16 0x01 -#define EFI_IFR_TYPE_NUM_SIZE_32 0x02 -#define EFI_IFR_TYPE_NUM_SIZE_64 0x03 -#define EFI_IFR_TYPE_BOOLEAN 0x04 -#define EFI_IFR_TYPE_TIME 0x05 -#define EFI_IFR_TYPE_DATE 0x06 -#define EFI_IFR_TYPE_STRING 0x07 -#define EFI_IFR_TYPE_OTHER 0x08 -#define EFI_IFR_TYPE_UNDEFINED 0x09 -#define EFI_IFR_TYPE_ACTION 0x0A -#define EFI_IFR_TYPE_BUFFER 0x0B -#define EFI_IFR_TYPE_REF 0x0C - -#define EFI_IFR_OPTION_DEFAULT 0x10 -#define EFI_IFR_OPTION_DEFAULT_MFG 0x20 +#define EFI_IFR_TYPE_NUM_SIZE_8 0x00 +#define EFI_IFR_TYPE_NUM_SIZE_16 0x01 +#define EFI_IFR_TYPE_NUM_SIZE_32 0x02 +#define EFI_IFR_TYPE_NUM_SIZE_64 0x03 +#define EFI_IFR_TYPE_BOOLEAN 0x04 +#define EFI_IFR_TYPE_TIME 0x05 +#define EFI_IFR_TYPE_DATE 0x06 +#define EFI_IFR_TYPE_STRING 0x07 +#define EFI_IFR_TYPE_OTHER 0x08 +#define EFI_IFR_TYPE_UNDEFINED 0x09 +#define EFI_IFR_TYPE_ACTION 0x0A +#define EFI_IFR_TYPE_BUFFER 0x0B +#define EFI_IFR_TYPE_REF 0x0C + +#define EFI_IFR_OPTION_DEFAULT 0x10 +#define EFI_IFR_OPTION_DEFAULT_MFG 0x20 typedef struct _EFI_IFR_GUID { - EFI_IFR_OP_HEADER Header; - EFI_GUID Guid; - //Optional Data Follows + EFI_IFR_OP_HEADER Header; + EFI_GUID Guid; + // Optional Data Follows } EFI_IFR_GUID; typedef struct _EFI_IFR_REFRESH_ID { - EFI_IFR_OP_HEADER Header; - EFI_GUID RefreshEventGroupId; + EFI_IFR_OP_HEADER Header; + EFI_GUID RefreshEventGroupId; } EFI_IFR_REFRESH_ID; typedef struct _EFI_IFR_DUP { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_DUP; typedef struct _EFI_IFR_EQ_ID_ID { - EFI_IFR_OP_HEADER Header; - EFI_QUESTION_ID QuestionId1; - EFI_QUESTION_ID QuestionId2; + EFI_IFR_OP_HEADER Header; + EFI_QUESTION_ID QuestionId1; + EFI_QUESTION_ID QuestionId2; } EFI_IFR_EQ_ID_ID; typedef struct _EFI_IFR_EQ_ID_VAL { - EFI_IFR_OP_HEADER Header; - EFI_QUESTION_ID QuestionId; - UINT16 Value; + EFI_IFR_OP_HEADER Header; + EFI_QUESTION_ID QuestionId; + UINT16 Value; } EFI_IFR_EQ_ID_VAL; typedef struct _EFI_IFR_EQ_ID_VAL_LIST { - EFI_IFR_OP_HEADER Header; - EFI_QUESTION_ID QuestionId; - UINT16 ListLength; - UINT16 ValueList[1]; + EFI_IFR_OP_HEADER Header; + EFI_QUESTION_ID QuestionId; + UINT16 ListLength; + UINT16 ValueList[1]; } EFI_IFR_EQ_ID_VAL_LIST; typedef struct _EFI_IFR_UINT8 { - EFI_IFR_OP_HEADER Header; - UINT8 Value; + EFI_IFR_OP_HEADER Header; + UINT8 Value; } EFI_IFR_UINT8; typedef struct _EFI_IFR_UINT16 { - EFI_IFR_OP_HEADER Header; - UINT16 Value; + EFI_IFR_OP_HEADER Header; + UINT16 Value; } EFI_IFR_UINT16; typedef struct _EFI_IFR_UINT32 { - EFI_IFR_OP_HEADER Header; - UINT32 Value; + EFI_IFR_OP_HEADER Header; + UINT32 Value; } EFI_IFR_UINT32; typedef struct _EFI_IFR_UINT64 { - EFI_IFR_OP_HEADER Header; - UINT64 Value; + EFI_IFR_OP_HEADER Header; + UINT64 Value; } EFI_IFR_UINT64; typedef struct _EFI_IFR_QUESTION_REF1 { - EFI_IFR_OP_HEADER Header; - EFI_QUESTION_ID QuestionId; + EFI_IFR_OP_HEADER Header; + EFI_QUESTION_ID QuestionId; } EFI_IFR_QUESTION_REF1; typedef struct _EFI_IFR_QUESTION_REF2 { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_QUESTION_REF2; typedef struct _EFI_IFR_QUESTION_REF3 { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_QUESTION_REF3; typedef struct _EFI_IFR_QUESTION_REF3_2 { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID DevicePath; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID DevicePath; } EFI_IFR_QUESTION_REF3_2; typedef struct _EFI_IFR_QUESTION_REF3_3 { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID DevicePath; - EFI_GUID Guid; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID DevicePath; + EFI_GUID Guid; } EFI_IFR_QUESTION_REF3_3; typedef struct _EFI_IFR_RULE_REF { - EFI_IFR_OP_HEADER Header; - UINT8 RuleId; + EFI_IFR_OP_HEADER Header; + UINT8 RuleId; } EFI_IFR_RULE_REF; typedef struct _EFI_IFR_STRING_REF1 { - EFI_IFR_OP_HEADER Header; - EFI_STRING_ID StringId; + EFI_IFR_OP_HEADER Header; + EFI_STRING_ID StringId; } EFI_IFR_STRING_REF1; typedef struct _EFI_IFR_STRING_REF2 { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_STRING_REF2; typedef struct _EFI_IFR_THIS { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_THIS; typedef struct _EFI_IFR_TRUE { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_TRUE; typedef struct _EFI_IFR_FALSE { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_FALSE; typedef struct _EFI_IFR_ONE { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_ONE; typedef struct _EFI_IFR_ONES { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_ONES; typedef struct _EFI_IFR_ZERO { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_ZERO; typedef struct _EFI_IFR_UNDEFINED { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_UNDEFINED; typedef struct _EFI_IFR_VERSION { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_VERSION; typedef struct _EFI_IFR_LENGTH { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_LENGTH; typedef struct _EFI_IFR_NOT { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_NOT; typedef struct _EFI_IFR_BITWISE_NOT { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_BITWISE_NOT; typedef struct _EFI_IFR_TO_BOOLEAN { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_TO_BOOLEAN; /// @@ -1339,10 +1332,10 @@ typedef struct _EFI_IFR_TO_BOOLEAN { /// 2 = hexadecimal (lower-case alpha). /// 3 = hexadecimal (upper-case alpha). ///@{ -#define EFI_IFR_STRING_UNSIGNED_DEC 0 -#define EFI_IFR_STRING_SIGNED_DEC 1 -#define EFI_IFR_STRING_LOWERCASE_HEX 2 -#define EFI_IFR_STRING_UPPERCASE_HEX 3 +#define EFI_IFR_STRING_UNSIGNED_DEC 0 +#define EFI_IFR_STRING_SIGNED_DEC 1 +#define EFI_IFR_STRING_LOWERCASE_HEX 2 +#define EFI_IFR_STRING_UPPERCASE_HEX 3 ///@} /// @@ -1350,110 +1343,110 @@ typedef struct _EFI_IFR_TO_BOOLEAN { /// 0 = ASCII. /// 8 = Unicode. ///@{ -#define EFI_IFR_STRING_ASCII 0 -#define EFI_IFR_STRING_UNICODE 8 +#define EFI_IFR_STRING_ASCII 0 +#define EFI_IFR_STRING_UNICODE 8 ///@} typedef struct _EFI_IFR_TO_STRING { - EFI_IFR_OP_HEADER Header; - UINT8 Format; + EFI_IFR_OP_HEADER Header; + UINT8 Format; } EFI_IFR_TO_STRING; typedef struct _EFI_IFR_TO_UINT { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_TO_UINT; typedef struct _EFI_IFR_TO_UPPER { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_TO_UPPER; typedef struct _EFI_IFR_TO_LOWER { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_TO_LOWER; typedef struct _EFI_IFR_ADD { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_ADD; typedef struct _EFI_IFR_AND { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_AND; typedef struct _EFI_IFR_BITWISE_AND { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_BITWISE_AND; typedef struct _EFI_IFR_BITWISE_OR { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_BITWISE_OR; typedef struct _EFI_IFR_CATENATE { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_CATENATE; typedef struct _EFI_IFR_DIVIDE { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_DIVIDE; typedef struct _EFI_IFR_EQUAL { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_EQUAL; typedef struct _EFI_IFR_GREATER_EQUAL { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_GREATER_EQUAL; typedef struct _EFI_IFR_GREATER_THAN { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_GREATER_THAN; typedef struct _EFI_IFR_LESS_EQUAL { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_LESS_EQUAL; typedef struct _EFI_IFR_LESS_THAN { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_LESS_THAN; typedef struct _EFI_IFR_MATCH { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_MATCH; typedef struct _EFI_IFR_MATCH2 { - EFI_IFR_OP_HEADER Header; - EFI_GUID SyntaxType; + EFI_IFR_OP_HEADER Header; + EFI_GUID SyntaxType; } EFI_IFR_MATCH2; typedef struct _EFI_IFR_MULTIPLY { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_MULTIPLY; typedef struct _EFI_IFR_MODULO { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_MODULO; typedef struct _EFI_IFR_NOT_EQUAL { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_NOT_EQUAL; typedef struct _EFI_IFR_OR { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_OR; typedef struct _EFI_IFR_SHIFT_LEFT { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_SHIFT_LEFT; typedef struct _EFI_IFR_SHIFT_RIGHT { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_SHIFT_RIGHT; typedef struct _EFI_IFR_SUBTRACT { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_SUBTRACT; typedef struct _EFI_IFR_CONDITIONAL { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_CONDITIONAL; // @@ -1463,39 +1456,39 @@ typedef struct _EFI_IFR_CONDITIONAL { #define EFI_IFR_FF_CASE_INSENSITIVE 0x01 typedef struct _EFI_IFR_FIND { - EFI_IFR_OP_HEADER Header; - UINT8 Format; + EFI_IFR_OP_HEADER Header; + UINT8 Format; } EFI_IFR_FIND; typedef struct _EFI_IFR_MID { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_MID; typedef struct _EFI_IFR_TOKEN { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_TOKEN; // // Flags specifying whether to find the first matching string // or the first non-matching string. // -#define EFI_IFR_FLAGS_FIRST_MATCHING 0x00 -#define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01 +#define EFI_IFR_FLAGS_FIRST_MATCHING 0x00 +#define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01 typedef struct _EFI_IFR_SPAN { - EFI_IFR_OP_HEADER Header; - UINT8 Flags; + EFI_IFR_OP_HEADER Header; + UINT8 Flags; } EFI_IFR_SPAN; typedef struct _EFI_IFR_SECURITY { /// /// Standard opcode header, where Header.Op = EFI_IFR_SECURITY_OP. /// - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; /// /// Security permission level. /// - EFI_GUID Permissions; + EFI_GUID Permissions; } EFI_IFR_SECURITY; typedef struct _EFI_IFR_FORM_MAP_METHOD { @@ -1503,12 +1496,12 @@ typedef struct _EFI_IFR_FORM_MAP_METHOD { /// The string identifier which provides the human-readable name of /// the configuration method for this standards map form. /// - EFI_STRING_ID MethodTitle; + EFI_STRING_ID MethodTitle; /// /// Identifier which uniquely specifies the configuration methods /// associated with this standards map form. /// - EFI_GUID MethodIdentifier; + EFI_GUID MethodIdentifier; } EFI_IFR_FORM_MAP_METHOD; typedef struct _EFI_IFR_FORM_MAP { @@ -1516,11 +1509,11 @@ typedef struct _EFI_IFR_FORM_MAP { /// The sequence that defines the type of opcode as well as the length /// of the opcode being defined. Header.OpCode = EFI_IFR_FORM_MAP_OP. /// - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; /// /// The unique identifier for this particular form. /// - EFI_FORM_ID FormId; + EFI_FORM_ID FormId; /// /// One or more configuration method's name and unique identifier. /// @@ -1532,12 +1525,12 @@ typedef struct _EFI_IFR_SET { /// The sequence that defines the type of opcode as well as the length /// of the opcode being defined. Header.OpCode = EFI_IFR_SET_OP. /// - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; /// /// Specifies the identifier of a previously declared variable store to /// use when storing the question's value. /// - EFI_VARSTORE_ID VarStoreId; + EFI_VARSTORE_ID VarStoreId; union { /// /// A 16-bit Buffer Storage offset. @@ -1551,7 +1544,7 @@ typedef struct _EFI_IFR_SET { /// /// Specifies the type used for storage. /// - UINT8 VarStoreType; + UINT8 VarStoreType; } EFI_IFR_SET; typedef struct _EFI_IFR_GET { @@ -1559,12 +1552,12 @@ typedef struct _EFI_IFR_GET { /// The sequence that defines the type of opcode as well as the length /// of the opcode being defined. Header.OpCode = EFI_IFR_GET_OP. /// - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; /// /// Specifies the identifier of a previously declared variable store to /// use when retrieving the value. /// - EFI_VARSTORE_ID VarStoreId; + EFI_VARSTORE_ID VarStoreId; union { /// /// A 16-bit Buffer Storage offset. @@ -1578,19 +1571,19 @@ typedef struct _EFI_IFR_GET { /// /// Specifies the type used for storage. /// - UINT8 VarStoreType; + UINT8 VarStoreType; } EFI_IFR_GET; typedef struct _EFI_IFR_READ { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_READ; typedef struct _EFI_IFR_WRITE { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_WRITE; typedef struct _EFI_IFR_MAP { - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; } EFI_IFR_MAP; // // Definitions for Keyboard Package @@ -1712,37 +1705,37 @@ typedef struct { /// /// Used to describe a physical key on a keyboard. /// - EFI_KEY Key; + EFI_KEY Key; /// /// Unicode character code for the Key. /// - CHAR16 Unicode; + CHAR16 Unicode; /// /// Unicode character code for the key with the shift key being held down. /// - CHAR16 ShiftedUnicode; + CHAR16 ShiftedUnicode; /// /// Unicode character code for the key with the Alt-GR being held down. /// - CHAR16 AltGrUnicode; + CHAR16 AltGrUnicode; /// /// Unicode character code for the key with the Alt-GR and shift keys being held down. /// - CHAR16 ShiftedAltGrUnicode; + CHAR16 ShiftedAltGrUnicode; /// /// Modifier keys are defined to allow for special functionality that is not necessarily /// accomplished by a printable character. Many of these modifier keys are flags to toggle /// certain state bits on and off inside of a keyboard driver. /// - UINT16 Modifier; - UINT16 AffectedAttribute; + UINT16 Modifier; + UINT16 AffectedAttribute; } EFI_KEY_DESCRIPTOR; /// /// A key which is affected by all the standard shift modifiers. /// Most keys would be expected to have this bit active. /// -#define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001 +#define EFI_AFFECTED_BY_STANDARD_SHIFT 0x0001 /// /// This key is affected by the caps lock so that if a keyboard driver @@ -1750,65 +1743,65 @@ typedef struct { /// versus an "a" character. Having this bit turned on would tell /// the keyboard driver to use the appropriate shifted state or not. /// -#define EFI_AFFECTED_BY_CAPS_LOCK 0x0002 +#define EFI_AFFECTED_BY_CAPS_LOCK 0x0002 /// /// Similar to the case of CAPS lock, if this bit is active, the key /// is affected by the num lock being turned on. /// -#define EFI_AFFECTED_BY_NUM_LOCK 0x0004 +#define EFI_AFFECTED_BY_NUM_LOCK 0x0004 typedef struct { - UINT16 LayoutLength; - EFI_GUID Guid; - UINT32 LayoutDescriptorStringOffset; - UINT8 DescriptorCount; + UINT16 LayoutLength; + EFI_GUID Guid; + UINT32 LayoutDescriptorStringOffset; + UINT8 DescriptorCount; // EFI_KEY_DESCRIPTOR Descriptors[]; } EFI_HII_KEYBOARD_LAYOUT; typedef struct { - EFI_HII_PACKAGE_HEADER Header; - UINT16 LayoutCount; + EFI_HII_PACKAGE_HEADER Header; + UINT16 LayoutCount; // EFI_HII_KEYBOARD_LAYOUT Layout[]; } EFI_HII_KEYBOARD_PACKAGE_HDR; // // Modifier values // -#define EFI_NULL_MODIFIER 0x0000 -#define EFI_LEFT_CONTROL_MODIFIER 0x0001 -#define EFI_RIGHT_CONTROL_MODIFIER 0x0002 -#define EFI_LEFT_ALT_MODIFIER 0x0003 -#define EFI_RIGHT_ALT_MODIFIER 0x0004 -#define EFI_ALT_GR_MODIFIER 0x0005 -#define EFI_INSERT_MODIFIER 0x0006 -#define EFI_DELETE_MODIFIER 0x0007 -#define EFI_PAGE_DOWN_MODIFIER 0x0008 -#define EFI_PAGE_UP_MODIFIER 0x0009 -#define EFI_HOME_MODIFIER 0x000A -#define EFI_END_MODIFIER 0x000B -#define EFI_LEFT_SHIFT_MODIFIER 0x000C -#define EFI_RIGHT_SHIFT_MODIFIER 0x000D -#define EFI_CAPS_LOCK_MODIFIER 0x000E -#define EFI_NUM_LOCK_MODIFIER 0x000F -#define EFI_LEFT_ARROW_MODIFIER 0x0010 -#define EFI_RIGHT_ARROW_MODIFIER 0x0011 -#define EFI_DOWN_ARROW_MODIFIER 0x0012 -#define EFI_UP_ARROW_MODIFIER 0x0013 -#define EFI_NS_KEY_MODIFIER 0x0014 -#define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015 -#define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016 -#define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017 -#define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018 -#define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019 -#define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A -#define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B -#define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C -#define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D -#define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E -#define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F -#define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020 -#define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021 +#define EFI_NULL_MODIFIER 0x0000 +#define EFI_LEFT_CONTROL_MODIFIER 0x0001 +#define EFI_RIGHT_CONTROL_MODIFIER 0x0002 +#define EFI_LEFT_ALT_MODIFIER 0x0003 +#define EFI_RIGHT_ALT_MODIFIER 0x0004 +#define EFI_ALT_GR_MODIFIER 0x0005 +#define EFI_INSERT_MODIFIER 0x0006 +#define EFI_DELETE_MODIFIER 0x0007 +#define EFI_PAGE_DOWN_MODIFIER 0x0008 +#define EFI_PAGE_UP_MODIFIER 0x0009 +#define EFI_HOME_MODIFIER 0x000A +#define EFI_END_MODIFIER 0x000B +#define EFI_LEFT_SHIFT_MODIFIER 0x000C +#define EFI_RIGHT_SHIFT_MODIFIER 0x000D +#define EFI_CAPS_LOCK_MODIFIER 0x000E +#define EFI_NUM_LOCK_MODIFIER 0x000F +#define EFI_LEFT_ARROW_MODIFIER 0x0010 +#define EFI_RIGHT_ARROW_MODIFIER 0x0011 +#define EFI_DOWN_ARROW_MODIFIER 0x0012 +#define EFI_UP_ARROW_MODIFIER 0x0013 +#define EFI_NS_KEY_MODIFIER 0x0014 +#define EFI_NS_KEY_DEPENDENCY_MODIFIER 0x0015 +#define EFI_FUNCTION_KEY_ONE_MODIFIER 0x0016 +#define EFI_FUNCTION_KEY_TWO_MODIFIER 0x0017 +#define EFI_FUNCTION_KEY_THREE_MODIFIER 0x0018 +#define EFI_FUNCTION_KEY_FOUR_MODIFIER 0x0019 +#define EFI_FUNCTION_KEY_FIVE_MODIFIER 0x001A +#define EFI_FUNCTION_KEY_SIX_MODIFIER 0x001B +#define EFI_FUNCTION_KEY_SEVEN_MODIFIER 0x001C +#define EFI_FUNCTION_KEY_EIGHT_MODIFIER 0x001D +#define EFI_FUNCTION_KEY_NINE_MODIFIER 0x001E +#define EFI_FUNCTION_KEY_TEN_MODIFIER 0x001F +#define EFI_FUNCTION_KEY_ELEVEN_MODIFIER 0x0020 +#define EFI_FUNCTION_KEY_TWELVE_MODIFIER 0x0021 // // Keys that have multiple control functions based on modifier @@ -1817,15 +1810,15 @@ typedef struct { // is still a nonprinting character, but might have an alternate // control function like SYSREQUEST // -#define EFI_PRINT_MODIFIER 0x0022 -#define EFI_SYS_REQUEST_MODIFIER 0x0023 -#define EFI_SCROLL_LOCK_MODIFIER 0x0024 -#define EFI_PAUSE_MODIFIER 0x0025 -#define EFI_BREAK_MODIFIER 0x0026 +#define EFI_PRINT_MODIFIER 0x0022 +#define EFI_SYS_REQUEST_MODIFIER 0x0023 +#define EFI_SCROLL_LOCK_MODIFIER 0x0024 +#define EFI_PAUSE_MODIFIER 0x0025 +#define EFI_BREAK_MODIFIER 0x0026 -#define EFI_LEFT_LOGO_MODIFIER 0x0027 -#define EFI_RIGHT_LOGO_MODIFIER 0x0028 -#define EFI_MENU_MODIFIER 0x0029 +#define EFI_LEFT_LOGO_MODIFIER 0x0027 +#define EFI_RIGHT_LOGO_MODIFIER 0x0028 +#define EFI_MENU_MODIFIER 0x0029 /// /// Animation IFR opcode @@ -1835,11 +1828,11 @@ typedef struct _EFI_IFR_ANIMATION { /// Standard opcode header, where Header.OpCode is /// EFI_IFR_ANIMATION_OP. /// - EFI_IFR_OP_HEADER Header; + EFI_IFR_OP_HEADER Header; /// /// Animation identifier in the HII database. /// - EFI_ANIMATION_ID Id; + EFI_ANIMATION_ID Id; } EFI_IFR_ANIMATION; /// @@ -1849,12 +1842,12 @@ typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR { /// /// Standard package header, where Header.Type = EFI_HII_PACKAGE_ANIMATIONS. /// - EFI_HII_PACKAGE_HEADER Header; + EFI_HII_PACKAGE_HEADER Header; /// /// Offset, relative to this header, of the animation information. If /// this is zero, then there are no animation sequences in the package. /// - UINT32 AnimationInfoOffset; + UINT32 AnimationInfoOffset; } EFI_HII_ANIMATION_PACKAGE_HDR; /// @@ -1862,26 +1855,26 @@ typedef struct _EFI_HII_ANIMATION_PACKAGE_HDR { /// with each block prefixed by a single byte header EFI_HII_ANIMATION_BLOCK. /// typedef struct _EFI_HII_ANIMATION_BLOCK { - UINT8 BlockType; - //UINT8 BlockBody[]; + UINT8 BlockType; + // UINT8 BlockBody[]; } EFI_HII_ANIMATION_BLOCK; /// /// Animation block types. /// -#define EFI_HII_AIBT_END 0x00 -#define EFI_HII_AIBT_OVERLAY_IMAGES 0x10 -#define EFI_HII_AIBT_CLEAR_IMAGES 0x11 -#define EFI_HII_AIBT_RESTORE_SCRN 0x12 -#define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18 -#define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19 -#define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A -#define EFI_HII_AIBT_DUPLICATE 0x20 -#define EFI_HII_AIBT_SKIP2 0x21 -#define EFI_HII_AIBT_SKIP1 0x22 -#define EFI_HII_AIBT_EXT1 0x30 -#define EFI_HII_AIBT_EXT2 0x31 -#define EFI_HII_AIBT_EXT4 0x32 +#define EFI_HII_AIBT_END 0x00 +#define EFI_HII_AIBT_OVERLAY_IMAGES 0x10 +#define EFI_HII_AIBT_CLEAR_IMAGES 0x11 +#define EFI_HII_AIBT_RESTORE_SCRN 0x12 +#define EFI_HII_AIBT_OVERLAY_IMAGES_LOOP 0x18 +#define EFI_HII_AIBT_CLEAR_IMAGES_LOOP 0x19 +#define EFI_HII_AIBT_RESTORE_SCRN_LOOP 0x1A +#define EFI_HII_AIBT_DUPLICATE 0x20 +#define EFI_HII_AIBT_SKIP2 0x21 +#define EFI_HII_AIBT_SKIP1 0x22 +#define EFI_HII_AIBT_EXT1 0x30 +#define EFI_HII_AIBT_EXT2 0x31 +#define EFI_HII_AIBT_EXT4 0x32 /// /// Extended block headers used for variable sized animation records @@ -1892,45 +1885,45 @@ typedef struct _EFI_HII_AIBT_EXT1_BLOCK { /// /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT1. /// - EFI_HII_ANIMATION_BLOCK Header; + EFI_HII_ANIMATION_BLOCK Header; /// /// The block type. /// - UINT8 BlockType2; + UINT8 BlockType2; /// /// Size of the animation block, in bytes, including the animation block header. /// - UINT8 Length; + UINT8 Length; } EFI_HII_AIBT_EXT1_BLOCK; typedef struct _EFI_HII_AIBT_EXT2_BLOCK { /// /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT2. /// - EFI_HII_ANIMATION_BLOCK Header; + EFI_HII_ANIMATION_BLOCK Header; /// /// The block type /// - UINT8 BlockType2; + UINT8 BlockType2; /// /// Size of the animation block, in bytes, including the animation block header. /// - UINT16 Length; + UINT16 Length; } EFI_HII_AIBT_EXT2_BLOCK; typedef struct _EFI_HII_AIBT_EXT4_BLOCK { /// /// Standard animation header, where Header.BlockType = EFI_HII_AIBT_EXT4. /// - EFI_HII_ANIMATION_BLOCK Header; + EFI_HII_ANIMATION_BLOCK Header; /// /// The block type /// - UINT8 BlockType2; + UINT8 BlockType2; /// /// Size of the animation block, in bytes, including the animation block header. /// - UINT32 Length; + UINT32 Length; } EFI_HII_AIBT_EXT4_BLOCK; typedef struct _EFI_HII_ANIMATION_CELL { @@ -1938,23 +1931,23 @@ typedef struct _EFI_HII_ANIMATION_CELL { /// The X offset from the upper left hand corner of the logical /// window to position the indexed image. /// - UINT16 OffsetX; + UINT16 OffsetX; /// /// The Y offset from the upper left hand corner of the logical /// window to position the indexed image. /// - UINT16 OffsetY; + UINT16 OffsetY; /// /// The image to display at the specified offset from the upper left /// hand corner of the logical window. /// - EFI_IMAGE_ID ImageId; + EFI_IMAGE_ID ImageId; /// /// The number of milliseconds to delay after displaying the indexed /// image and before continuing on to the next linked image. If value /// is zero, no delay. /// - UINT16 Delay; + UINT16 Delay; } EFI_HII_ANIMATION_CELL; /// @@ -1970,24 +1963,24 @@ typedef struct _EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK { /// image that can be displayed alone. If the value is zero, no image /// is displayed. /// - EFI_IMAGE_ID DftImageId; + EFI_IMAGE_ID DftImageId; /// /// The overall width of the set of images (logical window width). /// - UINT16 Width; + UINT16 Width; /// /// The overall height of the set of images (logical window height). /// - UINT16 Height; + UINT16 Height; /// /// The number of EFI_HII_ANIMATION_CELL contained in the /// animation sequence. /// - UINT16 CellCount; + UINT16 CellCount; /// /// An array of CellCount animation cells. /// - EFI_HII_ANIMATION_CELL AnimationCell[1]; + EFI_HII_ANIMATION_CELL AnimationCell[1]; } EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK; /// @@ -2004,29 +1997,29 @@ typedef struct _EFI_HII_AIBT_CLEAR_IMAGES_BLOCK { /// image that can be displayed alone. If the value is zero, no image /// is displayed. /// - EFI_IMAGE_ID DftImageId; + EFI_IMAGE_ID DftImageId; /// /// The overall width of the set of images (logical window width). /// - UINT16 Width; + UINT16 Width; /// /// The overall height of the set of images (logical window height). /// - UINT16 Height; + UINT16 Height; /// /// The number of EFI_HII_ANIMATION_CELL contained in the /// animation sequence. /// - UINT16 CellCount; + UINT16 CellCount; /// /// The color to clear the logical window to before displaying the /// indexed image. /// - EFI_HII_RGB_PIXEL BackgndColor; + EFI_HII_RGB_PIXEL BackgndColor; /// /// An array of CellCount animation cells. /// - EFI_HII_ANIMATION_CELL AnimationCell[1]; + EFI_HII_ANIMATION_CELL AnimationCell[1]; } EFI_HII_AIBT_CLEAR_IMAGES_BLOCK; /// @@ -2043,45 +2036,45 @@ typedef struct _EFI_HII_AIBT_RESTORE_SCRN_BLOCK { /// image that can be displayed alone. If the value is zero, no image /// is displayed. /// - EFI_IMAGE_ID DftImageId; + EFI_IMAGE_ID DftImageId; /// /// The overall width of the set of images (logical window width). /// - UINT16 Width; + UINT16 Width; /// /// The overall height of the set of images (logical window height). /// - UINT16 Height; + UINT16 Height; /// /// The number of EFI_HII_ANIMATION_CELL contained in the /// animation sequence. /// - UINT16 CellCount; + UINT16 CellCount; /// /// An array of CellCount animation cells. /// - EFI_HII_ANIMATION_CELL AnimationCell[1]; + EFI_HII_ANIMATION_CELL AnimationCell[1]; } EFI_HII_AIBT_RESTORE_SCRN_BLOCK; /// /// An animation block to describe an animation sequence that continuously cycles, /// and where one image is simply displayed over the previous image. /// -typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK; +typedef EFI_HII_AIBT_OVERLAY_IMAGES_BLOCK EFI_HII_AIBT_OVERLAY_IMAGES_LOOP_BLOCK; /// /// An animation block to describe an animation sequence that continuously cycles, /// and where the logical window is cleared to the specified color before /// the next image is displayed. /// -typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK; +typedef EFI_HII_AIBT_CLEAR_IMAGES_BLOCK EFI_HII_AIBT_CLEAR_IMAGES_LOOP_BLOCK; /// /// An animation block to describe an animation sequence that continuously cycles, /// and where the screen is restored to the original state before /// the next image is displayed. /// -typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK; +typedef EFI_HII_AIBT_RESTORE_SCRN_BLOCK EFI_HII_AIBT_RESTORE_SCRN_LOOP_BLOCK; /// /// Assigns a new character value to a previously defined animation sequence. @@ -2091,7 +2084,7 @@ typedef struct _EFI_HII_AIBT_DUPLICATE_BLOCK { /// The previously defined animation ID with the exact same /// animation information. /// - EFI_ANIMATION_ID AnimationId; + EFI_ANIMATION_ID AnimationId; } EFI_HII_AIBT_DUPLICATE_BLOCK; /// @@ -2101,7 +2094,7 @@ typedef struct _EFI_HII_AIBT_SKIP1_BLOCK { /// /// The unsigned 8-bit value to add to AnimationIdCurrent. /// - UINT8 SkipCount; + UINT8 SkipCount; } EFI_HII_AIBT_SKIP1_BLOCK; /// @@ -2111,13 +2104,11 @@ typedef struct _EFI_HII_AIBT_SKIP2_BLOCK { /// /// The unsigned 16-bit value to add to AnimationIdCurrent. /// - UINT16 SkipCount; + UINT16 SkipCount; } EFI_HII_AIBT_SKIP2_BLOCK; #pragma pack() - - /// /// References to string tokens must use this macro to enable scanning for /// token usages. @@ -2126,12 +2117,12 @@ typedef struct _EFI_HII_AIBT_SKIP2_BLOCK { /// STRING_TOKEN is not defined in UEFI specification. But it is placed /// here for the easy access by C files and VFR source files. /// -#define STRING_TOKEN(t) t +#define STRING_TOKEN(t) t /// /// IMAGE_TOKEN is not defined in UEFI specification. But it is placed /// here for the easy access by C files and VFR source files. /// -#define IMAGE_TOKEN(t) t +#define IMAGE_TOKEN(t) t #endif diff --git a/src/include/ipxe/efi/Uefi/UefiMultiPhase.h b/src/include/ipxe/efi/Uefi/UefiMultiPhase.h index 38ec09f3d..4ac760469 100644 --- a/src/include/ipxe/efi/Uefi/UefiMultiPhase.h +++ b/src/include/ipxe/efi/Uefi/UefiMultiPhase.h @@ -1,23 +1,39 @@ /** @file This includes some definitions introduced in UEFI that will be used in both PEI and DXE phases. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR> -This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. -The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __UEFI_MULTIPHASE_H__ #define __UEFI_MULTIPHASE_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); + +/// +/// Attributes of variable. +/// +#define EFI_VARIABLE_NON_VOLATILE 0x00000001 +#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 +#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 +/// +/// This attribute is identified by the mnemonic 'HR' +/// elsewhere in this specification. +/// +#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008 +/// +/// Attributes of Authenticated Variable +/// +#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020 +#define EFI_VARIABLE_APPEND_WRITE 0x00000040 +/// +/// NOTE: EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and should be considered reserved. +/// +#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010 -#include <ipxe/efi/Guid/WinCertificate.h> +#ifndef VFRCOMPILE + #include <ipxe/efi/Guid/WinCertificate.h> /// /// Enumeration of memory types introduced in UEFI. /// @@ -89,6 +105,11 @@ typedef enum { /// however it happens to also support byte-addressable non-volatility. /// EfiPersistentMemory, + /// + /// A memory region that describes system memory that has not been accepted + /// by a corresponding call to the underlying isolation architecture. + /// + EfiUnacceptedMemoryType, EfiMaxMemoryType } EFI_MEMORY_TYPE; @@ -134,49 +155,30 @@ typedef struct { /// Unique signatures have been generated for the EFI System Table, /// the EFI Boot Services Table, and the EFI Runtime Services Table. /// - UINT64 Signature; + UINT64 Signature; /// /// The revision of the EFI Specification to which this table /// conforms. The upper 16 bits of this field contain the major /// revision value, and the lower 16 bits contain the minor revision /// value. The minor revision values are limited to the range of 00..99. /// - UINT32 Revision; + UINT32 Revision; /// /// The size, in bytes, of the entire table including the EFI_TABLE_HEADER. /// - UINT32 HeaderSize; + UINT32 HeaderSize; /// /// The 32-bit CRC for the entire table. This value is computed by /// setting this field to 0, and computing the 32-bit CRC for HeaderSize bytes. /// - UINT32 CRC32; + UINT32 CRC32; /// /// Reserved field that must be set to 0. /// - UINT32 Reserved; + UINT32 Reserved; } EFI_TABLE_HEADER; /// -/// Attributes of variable. -/// -#define EFI_VARIABLE_NON_VOLATILE 0x00000001 -#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002 -#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004 -/// -/// This attribute is identified by the mnemonic 'HR' -/// elsewhere in this specification. -/// -#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008 -/// -/// Attributes of Authenticated Variable -/// -#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010 -#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS 0x00000020 -#define EFI_VARIABLE_APPEND_WRITE 0x00000040 - - -/// /// AuthInfo is a WIN_CERTIFICATE using the wCertificateType /// WIN_CERTIFICATE_UEFI_GUID and the CertType /// EFI_CERT_TYPE_RSA2048_SHA256_GUID. If the attribute specifies @@ -198,7 +200,7 @@ typedef struct { /// replay. Incremented during each /// "Write" access. /// - UINT64 MonotonicCount; + UINT64 MonotonicCount; /// /// Provides the authorization for the variable /// access. It is a signature across the @@ -207,7 +209,7 @@ typedef struct { /// associated with a public key that has been /// provisioned via the key exchange. /// - WIN_CERTIFICATE_UEFI_GUID AuthInfo; + WIN_CERTIFICATE_UEFI_GUID AuthInfo; } EFI_VARIABLE_AUTHENTICATION; /// @@ -223,11 +225,12 @@ typedef struct { /// For the TimeStamp value, components Pad1, Nanosecond, TimeZone, Daylight and /// Pad2 shall be set to 0. This means that the time shall always be expressed in GMT. /// - EFI_TIME TimeStamp; + EFI_TIME TimeStamp; /// /// Only a CertType of EFI_CERT_TYPE_PKCS7_GUID is accepted. /// - WIN_CERTIFICATE_UEFI_GUID AuthInfo; - } EFI_VARIABLE_AUTHENTICATION_2; + WIN_CERTIFICATE_UEFI_GUID AuthInfo; +} EFI_VARIABLE_AUTHENTICATION_2; +#endif // VFRCOMPILE #endif diff --git a/src/include/ipxe/efi/Uefi/UefiPxe.h b/src/include/ipxe/efi/Uefi/UefiPxe.h index 6ed5c9a22..b4366eda5 100644 --- a/src/include/ipxe/efi/Uefi/UefiPxe.h +++ b/src/include/ipxe/efi/Uefi/UefiPxe.h @@ -3,14 +3,8 @@ structure prototypes, global variables and constants that are needed for porting PXE to EFI. -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. -The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR> +SPDX-License-Identifier: BSD-2-Clause-Patent @par Revision Reference: 32/64-bit PXE specification: @@ -21,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #ifndef __EFI_PXE_H__ #define __EFI_PXE_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #pragma pack(1) @@ -34,15 +28,15 @@ FILE_LICENCE ( BSD3 ); /// /// UNDI ROM ID and devive ID signature. /// -#define PXE_BUSTYPE_PXE PXE_BUSTYPE ('!', 'P', 'X', 'E') +#define PXE_BUSTYPE_PXE PXE_BUSTYPE ('!', 'P', 'X', 'E') /// /// BUS ROM ID signatures. /// -#define PXE_BUSTYPE_PCI PXE_BUSTYPE ('P', 'C', 'I', 'R') -#define PXE_BUSTYPE_PC_CARD PXE_BUSTYPE ('P', 'C', 'C', 'R') -#define PXE_BUSTYPE_USB PXE_BUSTYPE ('U', 'S', 'B', 'R') -#define PXE_BUSTYPE_1394 PXE_BUSTYPE ('1', '3', '9', '4') +#define PXE_BUSTYPE_PCI PXE_BUSTYPE ('P', 'C', 'I', 'R') +#define PXE_BUSTYPE_PC_CARD PXE_BUSTYPE ('P', 'C', 'C', 'R') +#define PXE_BUSTYPE_USB PXE_BUSTYPE ('U', 'S', 'B', 'R') +#define PXE_BUSTYPE_1394 PXE_BUSTYPE ('1', '3', '9', '4') #define PXE_SWAP_UINT16(n) ((((PXE_UINT16) (n) & 0x00FF) << 8) | (((PXE_UINT16) (n) & 0xFF00) >> 8)) @@ -62,31 +56,30 @@ FILE_LICENCE ( BSD3 ); (((PXE_UINT64)(n) & 0x00FF000000000000ULL) >> 40) | \ (((PXE_UINT64)(n) & 0xFF00000000000000ULL) >> 56)) - #define PXE_CPBSIZE_NOT_USED 0 ///< zero #define PXE_DBSIZE_NOT_USED 0 ///< zero #define PXE_CPBADDR_NOT_USED (PXE_UINT64) 0 ///< zero #define PXE_DBADDR_NOT_USED (PXE_UINT64) 0 ///< zero #define PXE_CONST CONST -#define PXE_VOLATILE volatile +#define PXE_VOLATILE volatile -typedef VOID PXE_VOID; -typedef UINT8 PXE_UINT8; -typedef UINT16 PXE_UINT16; -typedef UINT32 PXE_UINT32; -typedef UINTN PXE_UINTN; +typedef VOID PXE_VOID; +typedef UINT8 PXE_UINT8; +typedef UINT16 PXE_UINT16; +typedef UINT32 PXE_UINT32; +typedef UINTN PXE_UINTN; /// /// Typedef unsigned long PXE_UINT64. /// -typedef UINT64 PXE_UINT64; +typedef UINT64 PXE_UINT64; typedef PXE_UINT8 PXE_BOOL; -#define PXE_FALSE 0 ///< zero -#define PXE_TRUE (!PXE_FALSE) +#define PXE_FALSE 0 ///< zero +#define PXE_TRUE (!PXE_FALSE) -typedef PXE_UINT16 PXE_OPCODE; +typedef PXE_UINT16 PXE_OPCODE; /// /// Return UNDI operational state. @@ -101,7 +94,7 @@ typedef PXE_UINT16 PXE_OPCODE; /// /// Change UNDI operational state from Started to Stopped. /// -#define PXE_OPCODE_STOP 0x0002 +#define PXE_OPCODE_STOP 0x0002 /// /// Get UNDI initialization information. @@ -116,7 +109,7 @@ typedef PXE_UINT16 PXE_OPCODE; /// /// Changed UNDI operational state from Started to Initialized. /// -#define PXE_OPCODE_INITIALIZE 0x0005 +#define PXE_OPCODE_INITIALIZE 0x0005 /// /// Re-initialize the NIC H/W. @@ -126,7 +119,7 @@ typedef PXE_UINT16 PXE_OPCODE; /// /// Change the UNDI operational state from Initialized to Started. /// -#define PXE_OPCODE_SHUTDOWN 0x0007 +#define PXE_OPCODE_SHUTDOWN 0x0007 /// /// Read & change state of external interrupt enables. @@ -146,7 +139,7 @@ typedef PXE_UINT16 PXE_OPCODE; /// /// Read traffic statistics. /// -#define PXE_OPCODE_STATISTICS 0x000B +#define PXE_OPCODE_STATISTICS 0x000B /// /// Convert multicast IP address to multicast MAC address. @@ -156,12 +149,12 @@ typedef PXE_UINT16 PXE_OPCODE; /// /// Read or change non-volatile storage on the NIC. /// -#define PXE_OPCODE_NVDATA 0x000D +#define PXE_OPCODE_NVDATA 0x000D /// /// Get & clear interrupt status. /// -#define PXE_OPCODE_GET_STATUS 0x000E +#define PXE_OPCODE_GET_STATUS 0x000E /// /// Fill media header in packet for transmit. @@ -171,7 +164,7 @@ typedef PXE_UINT16 PXE_OPCODE; /// /// Transmit packet(s). /// -#define PXE_OPCODE_TRANSMIT 0x0010 +#define PXE_OPCODE_TRANSMIT 0x0010 /// /// Receive packet. @@ -181,9 +174,9 @@ typedef PXE_UINT16 PXE_OPCODE; /// /// Last valid PXE UNDI OpCode number. /// -#define PXE_OPCODE_LAST_VALID 0x0011 +#define PXE_OPCODE_LAST_VALID 0x0011 -typedef PXE_UINT16 PXE_OPFLAGS; +typedef PXE_UINT16 PXE_OPFLAGS; #define PXE_OPFLAGS_NOT_USED 0x0000 @@ -239,16 +232,16 @@ typedef PXE_UINT16 PXE_OPFLAGS; /// Select whether to enable or disable external interrupt signals. /// Setting both enable and disable will return PXE_STATCODE_INVALID_OPFLAGS. /// -#define PXE_OPFLAGS_INTERRUPT_OPMASK 0xC000 -#define PXE_OPFLAGS_INTERRUPT_ENABLE 0x8000 -#define PXE_OPFLAGS_INTERRUPT_DISABLE 0x4000 -#define PXE_OPFLAGS_INTERRUPT_READ 0x0000 +#define PXE_OPFLAGS_INTERRUPT_OPMASK 0xC000 +#define PXE_OPFLAGS_INTERRUPT_ENABLE 0x8000 +#define PXE_OPFLAGS_INTERRUPT_DISABLE 0x4000 +#define PXE_OPFLAGS_INTERRUPT_READ 0x0000 /// /// Enable receive interrupts. An external interrupt will be generated /// after a complete non-error packet has been received. /// -#define PXE_OPFLAGS_INTERRUPT_RECEIVE 0x0001 +#define PXE_OPFLAGS_INTERRUPT_RECEIVE 0x0001 /// /// Enable transmit interrupts. An external interrupt will be generated @@ -260,7 +253,7 @@ typedef PXE_UINT16 PXE_OPFLAGS; /// Enable command interrupts. An external interrupt will be generated /// when command execution stops. /// -#define PXE_OPFLAGS_INTERRUPT_COMMAND 0x0004 +#define PXE_OPFLAGS_INTERRUPT_COMMAND 0x0004 /// /// Generate software interrupt. Setting this bit generates an external @@ -284,7 +277,7 @@ typedef PXE_UINT16 PXE_OPFLAGS; /// To reset the contents of the multicast MAC address filter list, /// set this OpFlag: /// -#define PXE_OPFLAGS_RECEIVE_FILTER_RESET_MCAST_LIST 0x2000 +#define PXE_OPFLAGS_RECEIVE_FILTER_RESET_MCAST_LIST 0x2000 /// /// Enable unicast packet receiving. Packets sent to the current station @@ -303,7 +296,7 @@ typedef PXE_UINT16 PXE_OPFLAGS; /// of the multicast MAC addresses in the multicast MAC address filter /// list will be received. If the filter list is empty, no multicast /// -#define PXE_OPFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004 +#define PXE_OPFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004 /// /// Enable promiscuous packet receiving. All packets will be received. @@ -345,9 +338,9 @@ typedef PXE_UINT16 PXE_OPFLAGS; /// /// Select the type of non-volatile data operation. /// -#define PXE_OPFLAGS_NVDATA_OPMASK 0x0001 -#define PXE_OPFLAGS_NVDATA_READ 0x0000 -#define PXE_OPFLAGS_NVDATA_WRITE 0x0001 +#define PXE_OPFLAGS_NVDATA_OPMASK 0x0001 +#define PXE_OPFLAGS_NVDATA_READ 0x0000 +#define PXE_OPFLAGS_NVDATA_WRITE 0x0001 /// /// UNDI Get Status. @@ -368,12 +361,12 @@ typedef PXE_UINT16 PXE_OPFLAGS; /// buffers. Do not plan on getting one buffer per interrupt. Some /// NICs and UNDIs may transmit multiple buffers per interrupt. /// -#define PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS 0x0002 +#define PXE_OPFLAGS_GET_TRANSMITTED_BUFFERS 0x0002 /// /// Return current media status. /// -#define PXE_OPFLAGS_GET_MEDIA_STATUS 0x0004 +#define PXE_OPFLAGS_GET_MEDIA_STATUS 0x0004 /// /// UNDI Fill Header. @@ -394,9 +387,9 @@ typedef PXE_UINT16 PXE_OPFLAGS; #define PXE_OPFLAGS_TRANSMIT_BLOCK 0x0001 #define PXE_OPFLAGS_TRANSMIT_DONT_BLOCK 0x0000 -#define PXE_OPFLAGS_TRANSMIT_OPMASK 0x0002 -#define PXE_OPFLAGS_TRANSMIT_FRAGMENTED 0x0002 -#define PXE_OPFLAGS_TRANSMIT_WHOLE 0x0000 +#define PXE_OPFLAGS_TRANSMIT_OPMASK 0x0002 +#define PXE_OPFLAGS_TRANSMIT_FRAGMENTED 0x0002 +#define PXE_OPFLAGS_TRANSMIT_WHOLE 0x0000 /// /// UNDI Receive. @@ -407,7 +400,7 @@ typedef PXE_UINT16 PXE_OPFLAGS; /// /// PXE STATFLAGS. /// -typedef PXE_UINT16 PXE_STATFLAGS; +typedef PXE_UINT16 PXE_STATFLAGS; #define PXE_STATFLAGS_INITIALIZE 0x0000 @@ -427,10 +420,10 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// /// UNDI Get State. /// -#define PXE_STATFLAGS_GET_STATE_MASK 0x0003 -#define PXE_STATFLAGS_GET_STATE_INITIALIZED 0x0002 -#define PXE_STATFLAGS_GET_STATE_STARTED 0x0001 -#define PXE_STATFLAGS_GET_STATE_STOPPED 0x0000 +#define PXE_STATFLAGS_GET_STATE_MASK 0x0003 +#define PXE_STATFLAGS_GET_STATE_INITIALIZED 0x0002 +#define PXE_STATFLAGS_GET_STATE_STARTED 0x0001 +#define PXE_STATFLAGS_GET_STATE_STOPPED 0x0000 /// /// UNDI Start. @@ -470,7 +463,7 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// /// If set, receive interrupts are enabled. /// -#define PXE_STATFLAGS_INTERRUPT_RECEIVE 0x0001 +#define PXE_STATFLAGS_INTERRUPT_RECEIVE 0x0001 /// /// If set, transmit interrupts are enabled. @@ -480,7 +473,7 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// /// If set, command interrupts are enabled. /// -#define PXE_STATFLAGS_INTERRUPT_COMMAND 0x0004 +#define PXE_STATFLAGS_INTERRUPT_COMMAND 0x0004 /// /// UNDI Receive Filters. @@ -500,7 +493,7 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// If set, multicast packets that match up with the multicast address /// filter list will be received. /// -#define PXE_STATFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004 +#define PXE_STATFLAGS_RECEIVE_FILTER_FILTERED_MULTICAST 0x0004 /// /// If set, all packets will be received. @@ -542,8 +535,8 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// /// Use to determine if an interrupt has occurred. /// -#define PXE_STATFLAGS_GET_STATUS_INTERRUPT_MASK 0x000F -#define PXE_STATFLAGS_GET_STATUS_NO_INTERRUPTS 0x0000 +#define PXE_STATFLAGS_GET_STATUS_INTERRUPT_MASK 0x000F +#define PXE_STATFLAGS_GET_STATUS_NO_INTERRUPTS 0x0000 /// /// If set, at least one receive interrupt occurred. @@ -553,7 +546,7 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// /// If set, at least one transmit interrupt occurred. /// -#define PXE_STATFLAGS_GET_STATUS_TRANSMIT 0x0002 +#define PXE_STATFLAGS_GET_STATUS_TRANSMIT 0x0002 /// /// If set, at least one command interrupt occurred. @@ -563,7 +556,7 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// /// If set, at least one software interrupt occurred. /// -#define PXE_STATFLAGS_GET_STATUS_SOFTWARE 0x0008 +#define PXE_STATFLAGS_GET_STATUS_SOFTWARE 0x0008 /// /// This flag is set if the transmitted buffer queue is empty. This flag @@ -595,20 +588,20 @@ typedef PXE_UINT16 PXE_STATFLAGS; /// /// UNDI Receive -///. +/// . /// /// No additional StatFlags. /// -typedef PXE_UINT16 PXE_STATCODE; +typedef PXE_UINT16 PXE_STATCODE; -#define PXE_STATCODE_INITIALIZE 0x0000 +#define PXE_STATCODE_INITIALIZE 0x0000 /// /// Common StatCodes returned by all UNDI commands, UNDI protocol functions /// and BC protocol functions. /// -#define PXE_STATCODE_SUCCESS 0x0000 +#define PXE_STATCODE_SUCCESS 0x0000 #define PXE_STATCODE_INVALID_CDB 0x0001 #define PXE_STATCODE_INVALID_CPB 0x0002 @@ -630,20 +623,20 @@ typedef PXE_UINT16 PXE_STATCODE; #define PXE_STATCODE_NOT_ENOUGH_MEMORY 0x0012 #define PXE_STATCODE_NO_DATA 0x0013 -typedef PXE_UINT16 PXE_IFNUM; +typedef PXE_UINT16 PXE_IFNUM; /// /// This interface number must be passed to the S/W UNDI Start command. /// -#define PXE_IFNUM_START 0x0000 +#define PXE_IFNUM_START 0x0000 /// /// This interface number is returned by the S/W UNDI Get State and /// Start commands if information in the CDB, CPB or DB is invalid. /// -#define PXE_IFNUM_INVALID 0x0000 +#define PXE_IFNUM_INVALID 0x0000 -typedef PXE_UINT16 PXE_CONTROL; +typedef PXE_UINT16 PXE_CONTROL; /// /// Setting this flag directs the UNDI to queue this command for later @@ -652,7 +645,7 @@ typedef PXE_UINT16 PXE_CONTROL; /// is returned. If the queue is full, a PXE_STATCODE_CDB_QUEUE_FULL /// error is returned. /// -#define PXE_CONTROL_QUEUE_IF_BUSY 0x0002 +#define PXE_CONTROL_QUEUE_IF_BUSY 0x0002 /// /// These two bit values are used to determine if there are more UNDI @@ -664,26 +657,26 @@ typedef PXE_UINT16 PXE_CONTROL; #define PXE_CONTROL_LINK 0x0001 #define PXE_CONTROL_LAST_CDB_IN_LIST 0x0000 -typedef PXE_UINT8 PXE_FRAME_TYPE; +typedef PXE_UINT8 PXE_FRAME_TYPE; -#define PXE_FRAME_TYPE_NONE 0x00 -#define PXE_FRAME_TYPE_UNICAST 0x01 -#define PXE_FRAME_TYPE_BROADCAST 0x02 -#define PXE_FRAME_TYPE_FILTERED_MULTICAST 0x03 -#define PXE_FRAME_TYPE_PROMISCUOUS 0x04 -#define PXE_FRAME_TYPE_PROMISCUOUS_MULTICAST 0x05 +#define PXE_FRAME_TYPE_NONE 0x00 +#define PXE_FRAME_TYPE_UNICAST 0x01 +#define PXE_FRAME_TYPE_BROADCAST 0x02 +#define PXE_FRAME_TYPE_FILTERED_MULTICAST 0x03 +#define PXE_FRAME_TYPE_PROMISCUOUS 0x04 +#define PXE_FRAME_TYPE_PROMISCUOUS_MULTICAST 0x05 -#define PXE_FRAME_TYPE_MULTICAST PXE_FRAME_TYPE_FILTERED_MULTICAST +#define PXE_FRAME_TYPE_MULTICAST PXE_FRAME_TYPE_FILTERED_MULTICAST -typedef PXE_UINT32 PXE_IPV4; +typedef PXE_UINT32 PXE_IPV4; -typedef PXE_UINT32 PXE_IPV6[4]; +typedef PXE_UINT32 PXE_IPV6[4]; #define PXE_MAC_LENGTH 32 -typedef PXE_UINT8 PXE_MAC_ADDR[PXE_MAC_LENGTH]; +typedef PXE_UINT8 PXE_MAC_ADDR[PXE_MAC_LENGTH]; -typedef PXE_UINT8 PXE_IFTYPE; -typedef UINT16 PXE_MEDIA_PROTOCOL; +typedef PXE_UINT8 PXE_IFTYPE; +typedef UINT16 PXE_MEDIA_PROTOCOL; /// /// This information is from the ARP section of RFC 1700. @@ -717,16 +710,16 @@ typedef UINT16 PXE_MEDIA_PROTOCOL; #define PXE_IFTYPE_FIBRE_CHANNEL 0x12 typedef struct s_pxe_hw_undi { - PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE. - PXE_UINT8 Len; ///< sizeof(PXE_HW_UNDI). - PXE_UINT8 Fudge; ///< makes 8-bit cksum equal zero. - PXE_UINT8 Rev; ///< PXE_ROMID_REV. - PXE_UINT8 IFcnt; ///< physical connector count lower byte. - PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER. - PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER. - PXE_UINT8 IFcntExt; ///< physical connector count upper byte. - PXE_UINT8 reserved; ///< zero, not used. - PXE_UINT32 Implementation; ///< implementation flags. + PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE. + PXE_UINT8 Len; ///< sizeof(PXE_HW_UNDI). + PXE_UINT8 Fudge; ///< makes 8-bit cksum equal zero. + PXE_UINT8 Rev; ///< PXE_ROMID_REV. + PXE_UINT8 IFcnt; ///< physical connector count lower byte. + PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER. + PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER. + PXE_UINT8 IFcntExt; ///< physical connector count upper byte. + PXE_UINT8 reserved; ///< zero, not used. + PXE_UINT32 Implementation; ///< implementation flags. ///< reserved ///< vendor use. ///< UINT32 Status; ///< status port. ///< UINT32 Command; ///< command port. @@ -750,32 +743,32 @@ typedef struct s_pxe_hw_undi { /// /// If set, last command failed. /// -#define PXE_HWSTAT_COMMAND_FAILED 0x20000000 +#define PXE_HWSTAT_COMMAND_FAILED 0x20000000 /// /// If set, identifies enabled receive filters. /// -#define PXE_HWSTAT_PROMISCUOUS_MULTICAST_RX_ENABLED 0x00001000 -#define PXE_HWSTAT_PROMISCUOUS_RX_ENABLED 0x00000800 -#define PXE_HWSTAT_BROADCAST_RX_ENABLED 0x00000400 -#define PXE_HWSTAT_MULTICAST_RX_ENABLED 0x00000200 -#define PXE_HWSTAT_UNICAST_RX_ENABLED 0x00000100 +#define PXE_HWSTAT_PROMISCUOUS_MULTICAST_RX_ENABLED 0x00001000 +#define PXE_HWSTAT_PROMISCUOUS_RX_ENABLED 0x00000800 +#define PXE_HWSTAT_BROADCAST_RX_ENABLED 0x00000400 +#define PXE_HWSTAT_MULTICAST_RX_ENABLED 0x00000200 +#define PXE_HWSTAT_UNICAST_RX_ENABLED 0x00000100 /// /// If set, identifies enabled external interrupts. /// -#define PXE_HWSTAT_SOFTWARE_INT_ENABLED 0x00000080 -#define PXE_HWSTAT_TX_COMPLETE_INT_ENABLED 0x00000040 -#define PXE_HWSTAT_PACKET_RX_INT_ENABLED 0x00000020 -#define PXE_HWSTAT_CMD_COMPLETE_INT_ENABLED 0x00000010 +#define PXE_HWSTAT_SOFTWARE_INT_ENABLED 0x00000080 +#define PXE_HWSTAT_TX_COMPLETE_INT_ENABLED 0x00000040 +#define PXE_HWSTAT_PACKET_RX_INT_ENABLED 0x00000020 +#define PXE_HWSTAT_CMD_COMPLETE_INT_ENABLED 0x00000010 /// /// If set, identifies pending interrupts. /// -#define PXE_HWSTAT_SOFTWARE_INT_PENDING 0x00000008 -#define PXE_HWSTAT_TX_COMPLETE_INT_PENDING 0x00000004 -#define PXE_HWSTAT_PACKET_RX_INT_PENDING 0x00000002 -#define PXE_HWSTAT_CMD_COMPLETE_INT_PENDING 0x00000001 +#define PXE_HWSTAT_SOFTWARE_INT_PENDING 0x00000008 +#define PXE_HWSTAT_TX_COMPLETE_INT_PENDING 0x00000004 +#define PXE_HWSTAT_PACKET_RX_INT_PENDING 0x00000002 +#define PXE_HWSTAT_CMD_COMPLETE_INT_PENDING 0x00000001 /// /// Command port definitions. @@ -791,19 +784,19 @@ typedef struct s_pxe_hw_undi { /// /// Use these to enable/disable receive filters. /// -#define PXE_HWCMD_PROMISCUOUS_MULTICAST_RX_ENABLE 0x00001000 -#define PXE_HWCMD_PROMISCUOUS_RX_ENABLE 0x00000800 -#define PXE_HWCMD_BROADCAST_RX_ENABLE 0x00000400 -#define PXE_HWCMD_MULTICAST_RX_ENABLE 0x00000200 -#define PXE_HWCMD_UNICAST_RX_ENABLE 0x00000100 +#define PXE_HWCMD_PROMISCUOUS_MULTICAST_RX_ENABLE 0x00001000 +#define PXE_HWCMD_PROMISCUOUS_RX_ENABLE 0x00000800 +#define PXE_HWCMD_BROADCAST_RX_ENABLE 0x00000400 +#define PXE_HWCMD_MULTICAST_RX_ENABLE 0x00000200 +#define PXE_HWCMD_UNICAST_RX_ENABLE 0x00000100 /// /// Use these to enable/disable external interrupts. /// -#define PXE_HWCMD_SOFTWARE_INT_ENABLE 0x00000080 -#define PXE_HWCMD_TX_COMPLETE_INT_ENABLE 0x00000040 -#define PXE_HWCMD_PACKET_RX_INT_ENABLE 0x00000020 -#define PXE_HWCMD_CMD_COMPLETE_INT_ENABLE 0x00000010 +#define PXE_HWCMD_SOFTWARE_INT_ENABLE 0x00000080 +#define PXE_HWCMD_TX_COMPLETE_INT_ENABLE 0x00000040 +#define PXE_HWCMD_PACKET_RX_INT_ENABLE 0x00000020 +#define PXE_HWCMD_CMD_COMPLETE_INT_ENABLE 0x00000010 /// /// Use these to clear pending external interrupts. @@ -814,44 +807,44 @@ typedef struct s_pxe_hw_undi { #define PXE_HWCMD_CLEAR_CMD_COMPLETE_INT 0x00000001 typedef struct s_pxe_sw_undi { - PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE. - PXE_UINT8 Len; ///< sizeof(PXE_SW_UNDI). - PXE_UINT8 Fudge; ///< makes 8-bit cksum zero. - PXE_UINT8 Rev; ///< PXE_ROMID_REV. - PXE_UINT8 IFcnt; ///< physical connector count lower byte. - PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER. - PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER. - PXE_UINT8 IFcntExt; ///< physical connector count upper byte. - PXE_UINT8 reserved1; ///< zero, not used. - PXE_UINT32 Implementation; ///< Implementation flags. - PXE_UINT64 EntryPoint; ///< API entry point. - PXE_UINT8 reserved2[3]; ///< zero, not used. - PXE_UINT8 BusCnt; ///< number of bustypes supported. - PXE_UINT32 BusType[1]; ///< list of supported bustypes. + PXE_UINT32 Signature; ///< PXE_ROMID_SIGNATURE. + PXE_UINT8 Len; ///< sizeof(PXE_SW_UNDI). + PXE_UINT8 Fudge; ///< makes 8-bit cksum zero. + PXE_UINT8 Rev; ///< PXE_ROMID_REV. + PXE_UINT8 IFcnt; ///< physical connector count lower byte. + PXE_UINT8 MajorVer; ///< PXE_ROMID_MAJORVER. + PXE_UINT8 MinorVer; ///< PXE_ROMID_MINORVER. + PXE_UINT8 IFcntExt; ///< physical connector count upper byte. + PXE_UINT8 reserved1; ///< zero, not used. + PXE_UINT32 Implementation; ///< Implementation flags. + PXE_UINT64 EntryPoint; ///< API entry point. + PXE_UINT8 reserved2[3]; ///< zero, not used. + PXE_UINT8 BusCnt; ///< number of bustypes supported. + PXE_UINT32 BusType[1]; ///< list of supported bustypes. } PXE_SW_UNDI; typedef union u_pxe_undi { - PXE_HW_UNDI hw; - PXE_SW_UNDI sw; + PXE_HW_UNDI hw; + PXE_SW_UNDI sw; } PXE_UNDI; /// /// Signature of !PXE structure. /// -#define PXE_ROMID_SIGNATURE PXE_BUSTYPE ('!', 'P', 'X', 'E') +#define PXE_ROMID_SIGNATURE PXE_BUSTYPE ('!', 'P', 'X', 'E') /// /// !PXE structure format revision -///. -#define PXE_ROMID_REV 0x02 +/// . +#define PXE_ROMID_REV 0x02 /// /// UNDI command interface revision. These are the values that get sent /// in option 94 (Client Network Interface Identifier) in the DHCP Discover /// and PXE Boot Server Request packets. /// -#define PXE_ROMID_MAJORVER 0x03 -#define PXE_ROMID_MINORVER 0x01 +#define PXE_ROMID_MAJORVER 0x03 +#define PXE_ROMID_MINORVER 0x01 /// /// Implementation flags. @@ -880,21 +873,21 @@ typedef union u_pxe_undi { #define PXE_ROMID_IMP_CMD_COMPLETE_INT_SUPPORTED 0x00000001 typedef struct s_pxe_cdb { - PXE_OPCODE OpCode; - PXE_OPFLAGS OpFlags; - PXE_UINT16 CPBsize; - PXE_UINT16 DBsize; - PXE_UINT64 CPBaddr; - PXE_UINT64 DBaddr; - PXE_STATCODE StatCode; - PXE_STATFLAGS StatFlags; - PXE_UINT16 IFnum; - PXE_CONTROL Control; + PXE_OPCODE OpCode; + PXE_OPFLAGS OpFlags; + PXE_UINT16 CPBsize; + PXE_UINT16 DBsize; + PXE_UINT64 CPBaddr; + PXE_UINT64 DBaddr; + PXE_STATCODE StatCode; + PXE_STATFLAGS StatFlags; + PXE_UINT16 IFnum; + PXE_CONTROL Control; } PXE_CDB; typedef union u_pxe_ip_addr { - PXE_IPV6 IPv6; - PXE_IPV4 IPv4; + PXE_IPV6 IPv6; + PXE_IPV4 IPv4; } PXE_IP_ADDR; typedef union pxe_device { @@ -909,26 +902,24 @@ typedef union pxe_device { /// See S/W UNDI ROMID structure definition for PCI and /// PCC BusType definitions. /// - PXE_UINT32 BusType; + PXE_UINT32 BusType; /// /// Bus, device & function numbers that locate this device. /// - PXE_UINT16 Bus; - PXE_UINT8 Device; - PXE_UINT8 Function; - } - PCI, PCC; - + PXE_UINT16 Bus; + PXE_UINT8 Device; + PXE_UINT8 Function; + } PCI, PCC; } PXE_DEVICE; /// /// cpb and db definitions /// -#define MAX_PCI_CONFIG_LEN 64 ///< # of dwords. -#define MAX_EEPROM_LEN 128 ///< # of dwords. -#define MAX_XMIT_BUFFERS 32 ///< recycling Q length for xmit_done. -#define MAX_MCAST_ADDRESS_CNT 8 +#define MAX_PCI_CONFIG_LEN 64 ///< # of dwords. +#define MAX_EEPROM_LEN 128 ///< # of dwords. +#define MAX_XMIT_BUFFERS 32 ///< recycling Q length for xmit_done. +#define MAX_MCAST_ADDRESS_CNT 8 typedef struct s_pxe_cpb_start_30 { /// @@ -941,7 +932,7 @@ typedef struct s_pxe_cpb_start_30 { /// /// This field cannot be set to zero. /// - UINT64 Delay; + UINT64 Delay; /// /// PXE_VOID Block(UINT32 enable); @@ -957,7 +948,7 @@ typedef struct s_pxe_cpb_start_30 { /// /// This field cannot be set to zero. /// - UINT64 Block; + UINT64 Block; /// /// PXE_VOID Virt2Phys(UINT64 virtual, UINT64 physical_ptr); @@ -971,7 +962,7 @@ typedef struct s_pxe_cpb_start_30 { /// This field can be set to zero if virtual and physical addresses /// are equal. /// - UINT64 Virt2Phys; + UINT64 Virt2Phys; /// /// PXE_VOID Mem_IO(UINT8 read_write, UINT8 len, UINT64 port, /// UINT64 buf_addr); @@ -982,7 +973,7 @@ typedef struct s_pxe_cpb_start_30 { /// /// This field can not be set to zero. /// - UINT64 Mem_IO; + UINT64 Mem_IO; } PXE_CPB_START_30; typedef struct s_pxe_cpb_start_31 { @@ -996,7 +987,7 @@ typedef struct s_pxe_cpb_start_31 { /// /// This field cannot be set to zero. /// - UINT64 Delay; + UINT64 Delay; /// /// PXE_VOID Block(UINT64 unq_id, UINT32 enable); @@ -1012,7 +1003,7 @@ typedef struct s_pxe_cpb_start_31 { /// /// This field cannot be set to zero. /// - UINT64 Block; + UINT64 Block; /// /// PXE_VOID Virt2Phys(UINT64 UnqId, UINT64 virtual, UINT64 physical_ptr); @@ -1026,7 +1017,7 @@ typedef struct s_pxe_cpb_start_31 { /// This field can be set to zero if virtual and physical addresses /// are equal. /// - UINT64 Virt2Phys; + UINT64 Virt2Phys; /// /// PXE_VOID Mem_IO(UINT64 UnqId, UINT8 read_write, UINT8 len, UINT64 port, /// UINT64 buf_addr); @@ -1037,7 +1028,7 @@ typedef struct s_pxe_cpb_start_31 { /// /// This field can not be set to zero. /// - UINT64 Mem_IO; + UINT64 Mem_IO; /// /// PXE_VOID Map_Mem(UINT64 unq_id, UINT64 virtual_addr, UINT32 size, /// UINT32 Direction, UINT64 mapped_addr); @@ -1054,7 +1045,7 @@ typedef struct s_pxe_cpb_start_31 { /// /// This field can be set to zero if there is no mapping service available. /// - UINT64 Map_Mem; + UINT64 Map_Mem; /// /// PXE_VOID UnMap_Mem(UINT64 unq_id, UINT64 virtual_addr, UINT32 size, @@ -1065,7 +1056,7 @@ typedef struct s_pxe_cpb_start_31 { /// /// This field can be set to zero if there is no unmapping service available. /// - UINT64 UnMap_Mem; + UINT64 UnMap_Mem; /// /// PXE_VOID Sync_Mem(UINT64 unq_id, UINT64 virtual, @@ -1077,7 +1068,7 @@ typedef struct s_pxe_cpb_start_31 { /// /// This field can be set to zero if there is no service available. /// - UINT64 Sync_Mem; + UINT64 Sync_Mem; /// /// protocol driver can provide anything for this Unique_ID, UNDI remembers @@ -1085,19 +1076,19 @@ typedef struct s_pxe_cpb_start_31 { /// the ifnum and gives it back as a parameter to all the call-back routines /// when calling for that interface! /// - UINT64 Unique_ID; + UINT64 Unique_ID; } PXE_CPB_START_31; -#define TO_AND_FROM_DEVICE 0 -#define FROM_DEVICE 1 -#define TO_DEVICE 2 +#define TO_AND_FROM_DEVICE 0 +#define FROM_DEVICE 1 +#define TO_DEVICE 2 -#define PXE_DELAY_MILLISECOND 1000 -#define PXE_DELAY_SECOND 1000000 -#define PXE_IO_READ 0 -#define PXE_IO_WRITE 1 -#define PXE_MEM_READ 2 -#define PXE_MEM_WRITE 4 +#define PXE_DELAY_MILLISECOND 1000 +#define PXE_DELAY_SECOND 1000000 +#define PXE_IO_READ 0 +#define PXE_IO_WRITE 1 +#define PXE_MEM_READ 2 +#define PXE_MEM_WRITE 4 typedef struct s_pxe_db_get_init_info { /// @@ -1108,47 +1099,47 @@ typedef struct s_pxe_db_get_init_info { /// If MemoryRequired is zero, the UNDI does not need and will not /// use system memory to receive and transmit packets. /// - PXE_UINT32 MemoryRequired; + PXE_UINT32 MemoryRequired; /// /// Maximum frame data length for Tx/Rx excluding the media header. /// - PXE_UINT32 FrameDataLen; + PXE_UINT32 FrameDataLen; /// /// Supported link speeds are in units of mega bits. Common ethernet /// values are 10, 100 and 1000. Unused LinkSpeeds[] entries are zero /// filled. /// - PXE_UINT32 LinkSpeeds[4]; + PXE_UINT32 LinkSpeeds[4]; /// /// Number of non-volatile storage items. /// - PXE_UINT32 NvCount; + PXE_UINT32 NvCount; /// /// Width of non-volatile storage item in bytes. 0, 1, 2 or 4 /// - PXE_UINT16 NvWidth; + PXE_UINT16 NvWidth; /// /// Media header length. This is the typical media header length for /// this UNDI. This information is needed when allocating receive /// and transmit buffers. /// - PXE_UINT16 MediaHeaderLen; + PXE_UINT16 MediaHeaderLen; /// /// Number of bytes in the NIC hardware (MAC) address. /// - PXE_UINT16 HWaddrLen; + PXE_UINT16 HWaddrLen; /// /// Maximum number of multicast MAC addresses in the multicast /// MAC address filter list. /// - PXE_UINT16 MCastFilterCnt; + PXE_UINT16 MCastFilterCnt; /// /// Default number and size of transmit and receive buffers that will @@ -1157,63 +1148,63 @@ typedef struct s_pxe_db_get_init_info { /// command. If MemoryRequired is zero, this allocation will come out of /// memory on the NIC. /// - PXE_UINT16 TxBufCnt; - PXE_UINT16 TxBufSize; - PXE_UINT16 RxBufCnt; - PXE_UINT16 RxBufSize; + PXE_UINT16 TxBufCnt; + PXE_UINT16 TxBufSize; + PXE_UINT16 RxBufCnt; + PXE_UINT16 RxBufSize; /// /// Hardware interface types defined in the Assigned Numbers RFC /// and used in DHCP and ARP packets. /// See the PXE_IFTYPE typedef and PXE_IFTYPE_xxx macros. /// - PXE_UINT8 IFtype; + PXE_UINT8 IFtype; /// /// Supported duplex. See PXE_DUPLEX_xxxxx #defines below. /// - PXE_UINT8 SupportedDuplexModes; + PXE_UINT8 SupportedDuplexModes; /// /// Supported loopback options. See PXE_LOOPBACK_xxxxx #defines below. /// - PXE_UINT8 SupportedLoopBackModes; + PXE_UINT8 SupportedLoopBackModes; } PXE_DB_GET_INIT_INFO; -#define PXE_MAX_TXRX_UNIT_ETHER 1500 +#define PXE_MAX_TXRX_UNIT_ETHER 1500 -#define PXE_HWADDR_LEN_ETHER 0x0006 -#define PXE_MAC_HEADER_LEN_ETHER 0x000E +#define PXE_HWADDR_LEN_ETHER 0x0006 +#define PXE_MAC_HEADER_LEN_ETHER 0x000E #define PXE_DUPLEX_ENABLE_FULL_SUPPORTED 1 #define PXE_DUPLEX_FORCE_FULL_SUPPORTED 2 -#define PXE_LOOPBACK_INTERNAL_SUPPORTED 1 -#define PXE_LOOPBACK_EXTERNAL_SUPPORTED 2 +#define PXE_LOOPBACK_INTERNAL_SUPPORTED 1 +#define PXE_LOOPBACK_EXTERNAL_SUPPORTED 2 typedef struct s_pxe_pci_config_info { /// /// This is the flag field for the PXE_DB_GET_CONFIG_INFO union. /// For PCI bus devices, this field is set to PXE_BUSTYPE_PCI. /// - UINT32 BusType; + UINT32 BusType; /// /// This identifies the PCI network device that this UNDI interface. /// is bound to. /// - UINT16 Bus; - UINT8 Device; - UINT8 Function; + UINT16 Bus; + UINT8 Device; + UINT8 Function; /// /// This is a copy of the PCI configuration space for this /// network device. /// union { - UINT8 Byte[256]; - UINT16 Word[128]; - UINT32 Dword[64]; + UINT8 Byte[256]; + UINT16 Word[128]; + UINT32 Dword[64]; } Config; } PXE_PCI_CONFIG_INFO; @@ -1222,30 +1213,30 @@ typedef struct s_pxe_pcc_config_info { /// This is the flag field for the PXE_DB_GET_CONFIG_INFO union. /// For PCC bus devices, this field is set to PXE_BUSTYPE_PCC. /// - PXE_UINT32 BusType; + PXE_UINT32 BusType; /// /// This identifies the PCC network device that this UNDI interface /// is bound to. /// - PXE_UINT16 Bus; - PXE_UINT8 Device; - PXE_UINT8 Function; + PXE_UINT16 Bus; + PXE_UINT8 Device; + PXE_UINT8 Function; /// /// This is a copy of the PCC configuration space for this /// network device. /// union { - PXE_UINT8 Byte[256]; - PXE_UINT16 Word[128]; - PXE_UINT32 Dword[64]; + PXE_UINT8 Byte[256]; + PXE_UINT16 Word[128]; + PXE_UINT32 Dword[64]; } Config; } PXE_PCC_CONFIG_INFO; typedef union u_pxe_db_get_config_info { - PXE_PCI_CONFIG_INFO pci; - PXE_PCC_CONFIG_INFO pcc; + PXE_PCI_CONFIG_INFO pci; + PXE_PCC_CONFIG_INFO pcc; } PXE_DB_GET_CONFIG_INFO; typedef struct s_pxe_cpb_initialize { @@ -1254,20 +1245,20 @@ typedef struct s_pxe_cpb_initialize { /// be in contiguous physical memory and cannot be swapped out. The UNDI /// will be using this for transmit and receive buffering. /// - PXE_UINT64 MemoryAddr; + PXE_UINT64 MemoryAddr; /// /// MemoryLength must be greater than or equal to MemoryRequired /// returned by the Get Init Info command. /// - PXE_UINT32 MemoryLength; + PXE_UINT32 MemoryLength; /// /// Desired link speed in Mbit/sec. Common ethernet values are 10, 100 /// and 1000. Setting a value of zero will auto-detect and/or use the /// default link speed (operation depends on UNDI/NIC functionality). /// - PXE_UINT32 LinkSpeed; + PXE_UINT32 LinkSpeed; /// /// Suggested number and size of receive and transmit buffers to @@ -1279,29 +1270,29 @@ typedef struct s_pxe_cpb_initialize { /// If these fields are set to zero, the UNDI will allocate buffer /// counts and sizes as it sees fit. /// - PXE_UINT16 TxBufCnt; - PXE_UINT16 TxBufSize; - PXE_UINT16 RxBufCnt; - PXE_UINT16 RxBufSize; + PXE_UINT16 TxBufCnt; + PXE_UINT16 TxBufSize; + PXE_UINT16 RxBufCnt; + PXE_UINT16 RxBufSize; /// /// The following configuration parameters are optional and must be zero /// to use the default values. /// - PXE_UINT8 DuplexMode; + PXE_UINT8 DuplexMode; - PXE_UINT8 LoopBackMode; + PXE_UINT8 LoopBackMode; } PXE_CPB_INITIALIZE; -#define PXE_DUPLEX_DEFAULT 0x00 -#define PXE_FORCE_FULL_DUPLEX 0x01 -#define PXE_ENABLE_FULL_DUPLEX 0x02 -#define PXE_FORCE_HALF_DUPLEX 0x04 -#define PXE_DISABLE_FULL_DUPLEX 0x08 +#define PXE_DUPLEX_DEFAULT 0x00 +#define PXE_FORCE_FULL_DUPLEX 0x01 +#define PXE_ENABLE_FULL_DUPLEX 0x02 +#define PXE_FORCE_HALF_DUPLEX 0x04 +#define PXE_DISABLE_FULL_DUPLEX 0x08 -#define LOOPBACK_NORMAL 0 -#define LOOPBACK_INTERNAL 1 -#define LOOPBACK_EXTERNAL 2 +#define LOOPBACK_NORMAL 0 +#define LOOPBACK_INTERNAL 1 +#define LOOPBACK_EXTERNAL 2 typedef struct s_pxe_db_initialize { /// @@ -1312,16 +1303,16 @@ typedef struct s_pxe_db_initialize { /// Memory used by the UNDI and network device is allocated from the /// lowest memory buffer address. /// - PXE_UINT32 MemoryUsed; + PXE_UINT32 MemoryUsed; /// /// Actual number and size of receive and transmit buffers that were /// allocated. /// - PXE_UINT16 TxBufCnt; - PXE_UINT16 TxBufSize; - PXE_UINT16 RxBufCnt; - PXE_UINT16 RxBufSize; + PXE_UINT16 TxBufCnt; + PXE_UINT16 TxBufSize; + PXE_UINT16 RxBufCnt; + PXE_UINT16 RxBufSize; } PXE_DB_INITIALIZE; typedef struct s_pxe_cpb_receive_filters { @@ -1329,14 +1320,14 @@ typedef struct s_pxe_cpb_receive_filters { /// List of multicast MAC addresses. This list, if present, will /// replace the existing multicast MAC address filter list. /// - PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT]; + PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT]; } PXE_CPB_RECEIVE_FILTERS; typedef struct s_pxe_db_receive_filters { /// /// Filtered multicast MAC address list. /// - PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT]; + PXE_MAC_ADDR MCastList[MAX_MCAST_ADDRESS_CNT]; } PXE_DB_RECEIVE_FILTERS; typedef struct s_pxe_cpb_station_address { @@ -1344,24 +1335,24 @@ typedef struct s_pxe_cpb_station_address { /// If supplied and supported, the current station MAC address /// will be changed. /// - PXE_MAC_ADDR StationAddr; + PXE_MAC_ADDR StationAddr; } PXE_CPB_STATION_ADDRESS; typedef struct s_pxe_dpb_station_address { /// /// Current station MAC address. /// - PXE_MAC_ADDR StationAddr; + PXE_MAC_ADDR StationAddr; /// /// Station broadcast MAC address. /// - PXE_MAC_ADDR BroadcastAddr; + PXE_MAC_ADDR BroadcastAddr; /// /// Permanent station MAC address. /// - PXE_MAC_ADDR PermanentAddr; + PXE_MAC_ADDR PermanentAddr; } PXE_DB_STATION_ADDRESS; typedef struct s_pxe_db_statistics { @@ -1374,12 +1365,12 @@ typedef struct s_pxe_db_statistics { /// If bit 0x21 is set, Data[0x21] is collected. /// Etc. /// - PXE_UINT64 Supported; + PXE_UINT64 Supported; /// /// Statistic data. /// - PXE_UINT64 Data[64]; + PXE_UINT64 Data[64]; } PXE_DB_STATISTICS; /// @@ -1391,7 +1382,7 @@ typedef struct s_pxe_db_statistics { /// /// Number of valid frames received and copied into receive buffers. /// -#define PXE_STATISTICS_RX_GOOD_FRAMES 0x01 +#define PXE_STATISTICS_RX_GOOD_FRAMES 0x01 /// /// Number of frames below the minimum length for the media. @@ -1403,7 +1394,7 @@ typedef struct s_pxe_db_statistics { /// Number of frames longer than the maxminum length for the /// media. This would be >1500 for ethernet. /// -#define PXE_STATISTICS_RX_OVERSIZE_FRAMES 0x03 +#define PXE_STATISTICS_RX_OVERSIZE_FRAMES 0x03 /// /// Valid frames that were dropped because receive buffers were full. @@ -1434,7 +1425,7 @@ typedef struct s_pxe_db_statistics { /// Total number of bytes received. Includes frames with errors /// and dropped frames. /// -#define PXE_STATISTICS_RX_TOTAL_BYTES 0x09 +#define PXE_STATISTICS_RX_TOTAL_BYTES 0x09 /// /// Transmit statistics. @@ -1453,45 +1444,45 @@ typedef struct s_pxe_db_statistics { /// /// Number of collisions detection on this subnet. /// -#define PXE_STATISTICS_COLLISIONS 0x14 +#define PXE_STATISTICS_COLLISIONS 0x14 /// /// Number of frames destined for unsupported protocol. /// -#define PXE_STATISTICS_UNSUPPORTED_PROTOCOL 0x15 +#define PXE_STATISTICS_UNSUPPORTED_PROTOCOL 0x15 /// /// Number of valid frames received that were duplicated. /// -#define PXE_STATISTICS_RX_DUPLICATED_FRAMES 0x16 +#define PXE_STATISTICS_RX_DUPLICATED_FRAMES 0x16 /// /// Number of encrypted frames received that failed to decrypt. /// -#define PXE_STATISTICS_RX_DECRYPT_ERROR_FRAMES 0x17 +#define PXE_STATISTICS_RX_DECRYPT_ERROR_FRAMES 0x17 /// /// Number of frames that failed to transmit after exceeding the retry limit. /// -#define PXE_STATISTICS_TX_ERROR_FRAMES 0x18 +#define PXE_STATISTICS_TX_ERROR_FRAMES 0x18 /// /// Number of frames transmitted successfully after more than one attempt. /// -#define PXE_STATISTICS_TX_RETRY_FRAMES 0x19 +#define PXE_STATISTICS_TX_RETRY_FRAMES 0x19 typedef struct s_pxe_cpb_mcast_ip_to_mac { /// /// Multicast IP address to be converted to multicast MAC address. /// - PXE_IP_ADDR IP; + PXE_IP_ADDR IP; } PXE_CPB_MCAST_IP_TO_MAC; typedef struct s_pxe_db_mcast_ip_to_mac { /// /// Multicast MAC address. /// - PXE_MAC_ADDR MAC; + PXE_MAC_ADDR MAC; } PXE_DB_MCAST_IP_TO_MAC; typedef struct s_pxe_cpb_nvdata_sparse { @@ -1502,15 +1493,15 @@ typedef struct s_pxe_cpb_nvdata_sparse { /// /// Non-volatile storage address to be changed. /// - PXE_UINT32 Addr; + PXE_UINT32 Addr; /// /// Data item to write into above storage address. /// union { - PXE_UINT8 Byte; - PXE_UINT16 Word; - PXE_UINT32 Dword; + PXE_UINT8 Byte; + PXE_UINT16 Word; + PXE_UINT32 Dword; } Data; } Item[MAX_EEPROM_LEN]; } PXE_CPB_NVDATA_SPARSE; @@ -1523,17 +1514,17 @@ typedef union u_pxe_cpb_nvdata_bulk { /// /// Array of byte-wide data items. /// - PXE_UINT8 Byte[MAX_EEPROM_LEN << 2]; + PXE_UINT8 Byte[MAX_EEPROM_LEN << 2]; /// /// Array of word-wide data items. /// - PXE_UINT16 Word[MAX_EEPROM_LEN << 1]; + PXE_UINT16 Word[MAX_EEPROM_LEN << 1]; /// /// Array of dword-wide data items. /// - PXE_UINT32 Dword[MAX_EEPROM_LEN]; + PXE_UINT32 Dword[MAX_EEPROM_LEN]; } PXE_CPB_NVDATA_BULK; typedef struct s_pxe_db_nvdata { @@ -1544,17 +1535,17 @@ typedef struct s_pxe_db_nvdata { /// /// Array of byte-wide data items. /// - PXE_UINT8 Byte[MAX_EEPROM_LEN << 2]; + PXE_UINT8 Byte[MAX_EEPROM_LEN << 2]; /// /// Array of word-wide data items. /// - PXE_UINT16 Word[MAX_EEPROM_LEN << 1]; + PXE_UINT16 Word[MAX_EEPROM_LEN << 1]; /// /// Array of dword-wide data items. /// - PXE_UINT32 Dword[MAX_EEPROM_LEN]; + PXE_UINT32 Dword[MAX_EEPROM_LEN]; } Data; } PXE_DB_NVDATA; @@ -1563,17 +1554,17 @@ typedef struct s_pxe_db_get_status { /// Length of next receive frame (header + data). If this is zero, /// there is no next receive frame available. /// - PXE_UINT32 RxFrameLen; + PXE_UINT32 RxFrameLen; /// /// Reserved, set to zero. /// - PXE_UINT32 reserved; + PXE_UINT32 reserved; /// /// Addresses of transmitted buffers that need to be recycled. /// - PXE_UINT64 TxBuffer[MAX_XMIT_BUFFERS]; + PXE_UINT64 TxBuffer[MAX_XMIT_BUFFERS]; } PXE_DB_GET_STATUS; typedef struct s_pxe_cpb_fill_header { @@ -1581,71 +1572,71 @@ typedef struct s_pxe_cpb_fill_header { /// Source and destination MAC addresses. These will be copied into /// the media header without doing byte swapping. /// - PXE_MAC_ADDR SrcAddr; - PXE_MAC_ADDR DestAddr; + PXE_MAC_ADDR SrcAddr; + PXE_MAC_ADDR DestAddr; /// /// Address of first byte of media header. The first byte of packet data /// follows the last byte of the media header. /// - PXE_UINT64 MediaHeader; + PXE_UINT64 MediaHeader; /// /// Length of packet data in bytes (not including the media header). /// - PXE_UINT32 PacketLen; + PXE_UINT32 PacketLen; /// /// Protocol type. This will be copied into the media header without /// doing byte swapping. Protocol type numbers can be obtained from /// the Assigned Numbers RFC 1700. /// - PXE_UINT16 Protocol; + PXE_UINT16 Protocol; /// /// Length of the media header in bytes. /// - PXE_UINT16 MediaHeaderLen; + PXE_UINT16 MediaHeaderLen; } PXE_CPB_FILL_HEADER; -#define PXE_PROTOCOL_ETHERNET_IP 0x0800 -#define PXE_PROTOCOL_ETHERNET_ARP 0x0806 -#define MAX_XMIT_FRAGMENTS 16 +#define PXE_PROTOCOL_ETHERNET_IP 0x0800 +#define PXE_PROTOCOL_ETHERNET_ARP 0x0806 +#define MAX_XMIT_FRAGMENTS 16 typedef struct s_pxe_cpb_fill_header_fragmented { /// /// Source and destination MAC addresses. These will be copied into /// the media header without doing byte swapping. /// - PXE_MAC_ADDR SrcAddr; - PXE_MAC_ADDR DestAddr; + PXE_MAC_ADDR SrcAddr; + PXE_MAC_ADDR DestAddr; /// /// Length of packet data in bytes (not including the media header). /// - PXE_UINT32 PacketLen; + PXE_UINT32 PacketLen; /// /// Protocol type. This will be copied into the media header without /// doing byte swapping. Protocol type numbers can be obtained from /// the Assigned Numbers RFC 1700. /// - PXE_MEDIA_PROTOCOL Protocol; + PXE_MEDIA_PROTOCOL Protocol; /// /// Length of the media header in bytes. /// - PXE_UINT16 MediaHeaderLen; + PXE_UINT16 MediaHeaderLen; /// /// Number of packet fragment descriptors. /// - PXE_UINT16 FragCnt; + PXE_UINT16 FragCnt; /// /// Reserved, must be set to zero. /// - PXE_UINT16 reserved; + PXE_UINT16 reserved; /// /// Array of packet fragment descriptors. The first byte of the media @@ -1655,60 +1646,59 @@ typedef struct s_pxe_cpb_fill_header_fragmented { /// /// Address of this packet fragment. /// - PXE_UINT64 FragAddr; + PXE_UINT64 FragAddr; /// /// Length of this packet fragment. /// - PXE_UINT32 FragLen; + PXE_UINT32 FragLen; /// /// Reserved, must be set to zero. /// - PXE_UINT32 reserved; + PXE_UINT32 reserved; } FragDesc[MAX_XMIT_FRAGMENTS]; -} -PXE_CPB_FILL_HEADER_FRAGMENTED; +} PXE_CPB_FILL_HEADER_FRAGMENTED; typedef struct s_pxe_cpb_transmit { /// /// Address of first byte of frame buffer. This is also the first byte /// of the media header. /// - PXE_UINT64 FrameAddr; + PXE_UINT64 FrameAddr; /// /// Length of the data portion of the frame buffer in bytes. Do not /// include the length of the media header. /// - PXE_UINT32 DataLen; + PXE_UINT32 DataLen; /// /// Length of the media header in bytes. /// - PXE_UINT16 MediaheaderLen; + PXE_UINT16 MediaheaderLen; /// /// Reserved, must be zero. /// - PXE_UINT16 reserved; + PXE_UINT16 reserved; } PXE_CPB_TRANSMIT; typedef struct s_pxe_cpb_transmit_fragments { /// /// Length of packet data in bytes (not including the media header). /// - PXE_UINT32 FrameLen; + PXE_UINT32 FrameLen; /// /// Length of the media header in bytes. /// - PXE_UINT16 MediaheaderLen; + PXE_UINT16 MediaheaderLen; /// /// Number of packet fragment descriptors. /// - PXE_UINT16 FragCnt; + PXE_UINT16 FragCnt; /// /// Array of frame fragment descriptors. The first byte of the first @@ -1718,75 +1708,73 @@ typedef struct s_pxe_cpb_transmit_fragments { /// /// Address of this frame fragment. /// - PXE_UINT64 FragAddr; + PXE_UINT64 FragAddr; /// /// Length of this frame fragment. /// - PXE_UINT32 FragLen; + PXE_UINT32 FragLen; /// /// Reserved, must be set to zero. /// - PXE_UINT32 reserved; + PXE_UINT32 reserved; } FragDesc[MAX_XMIT_FRAGMENTS]; -} -PXE_CPB_TRANSMIT_FRAGMENTS; +} PXE_CPB_TRANSMIT_FRAGMENTS; typedef struct s_pxe_cpb_receive { /// /// Address of first byte of receive buffer. This is also the first byte /// of the frame header. /// - PXE_UINT64 BufferAddr; + PXE_UINT64 BufferAddr; /// /// Length of receive buffer. This must be large enough to hold the /// received frame (media header + data). If the length of smaller than /// the received frame, data will be lost. /// - PXE_UINT32 BufferLen; + PXE_UINT32 BufferLen; /// /// Reserved, must be set to zero. /// - PXE_UINT32 reserved; + PXE_UINT32 reserved; } PXE_CPB_RECEIVE; typedef struct s_pxe_db_receive { /// /// Source and destination MAC addresses from media header. /// - PXE_MAC_ADDR SrcAddr; - PXE_MAC_ADDR DestAddr; + PXE_MAC_ADDR SrcAddr; + PXE_MAC_ADDR DestAddr; /// /// Length of received frame. May be larger than receive buffer size. /// The receive buffer will not be overwritten. This is how to tell /// if data was lost because the receive buffer was too small. /// - PXE_UINT32 FrameLen; + PXE_UINT32 FrameLen; /// /// Protocol type from media header. /// - PXE_MEDIA_PROTOCOL Protocol; + PXE_MEDIA_PROTOCOL Protocol; /// /// Length of media header in received frame. /// - PXE_UINT16 MediaHeaderLen; + PXE_UINT16 MediaHeaderLen; /// /// Type of receive frame. /// - PXE_FRAME_TYPE Type; + PXE_FRAME_TYPE Type; /// /// Reserved, must be zero. /// - PXE_UINT8 reserved[7]; - + PXE_UINT8 reserved[7]; } PXE_DB_RECEIVE; #pragma pack() diff --git a/src/include/ipxe/efi/Uefi/UefiSpec.h b/src/include/ipxe/efi/Uefi/UefiSpec.h index 27edf43ac..3ef66dafb 100644 --- a/src/include/ipxe/efi/Uefi/UefiSpec.h +++ b/src/include/ipxe/efi/Uefi/UefiSpec.h @@ -1,25 +1,22 @@ /** @file Include file that supports UEFI. - This include file must contain things defined in the UEFI 2.6 specification. - If a code construct is defined in the UEFI 2.6 specification it must be included + This include file must contain things defined in the UEFI 2.7 specification. + If a code construct is defined in the UEFI 2.7 specification it must be included by this include file. -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR> -This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. -The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +Copyright (c) 2006 - 2021, Intel Corporation. All rights reserved.<BR> +Portions Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR> +Copyright (c) 2022, Loongson Technology Corporation Limited. All rights reserved.<BR> -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __UEFI_SPEC_H__ #define __UEFI_SPEC_H__ -FILE_LICENCE ( BSD3 ); +FILE_LICENCE ( BSD2_PATENT ); #include <ipxe/efi/Uefi/UefiMultiPhase.h> @@ -65,69 +62,103 @@ typedef enum { // // Memory cacheability attributes // -#define EFI_MEMORY_UC 0x0000000000000001ULL -#define EFI_MEMORY_WC 0x0000000000000002ULL -#define EFI_MEMORY_WT 0x0000000000000004ULL -#define EFI_MEMORY_WB 0x0000000000000008ULL -#define EFI_MEMORY_UCE 0x0000000000000010ULL +#define EFI_MEMORY_UC 0x0000000000000001ULL +#define EFI_MEMORY_WC 0x0000000000000002ULL +#define EFI_MEMORY_WT 0x0000000000000004ULL +#define EFI_MEMORY_WB 0x0000000000000008ULL +#define EFI_MEMORY_UCE 0x0000000000000010ULL // // Physical memory protection attributes // // Note: UEFI spec 2.5 and following: use EFI_MEMORY_RO as write-protected physical memory // protection attribute. Also, EFI_MEMORY_WP means cacheability attribute. // -#define EFI_MEMORY_WP 0x0000000000001000ULL -#define EFI_MEMORY_RP 0x0000000000002000ULL -#define EFI_MEMORY_XP 0x0000000000004000ULL -#define EFI_MEMORY_RO 0x0000000000020000ULL +#define EFI_MEMORY_WP 0x0000000000001000ULL +#define EFI_MEMORY_RP 0x0000000000002000ULL +#define EFI_MEMORY_XP 0x0000000000004000ULL +#define EFI_MEMORY_RO 0x0000000000020000ULL // // Physical memory persistence attribute. // The memory region supports byte-addressable non-volatility. // -#define EFI_MEMORY_NV 0x0000000000008000ULL +#define EFI_MEMORY_NV 0x0000000000008000ULL // // The memory region provides higher reliability relative to other memory in the system. // If all memory has the same reliability, then this bit is not used. // -#define EFI_MEMORY_MORE_RELIABLE 0x0000000000010000ULL +#define EFI_MEMORY_MORE_RELIABLE 0x0000000000010000ULL + +// +// Note: UEFI spec 2.8 and following: +// +// Specific-purpose memory (SPM). The memory is earmarked for +// specific purposes such as for specific device drivers or applications. +// The SPM attribute serves as a hint to the OS to avoid allocating this +// memory for core OS data or code that can not be relocated. +// +#define EFI_MEMORY_SP 0x0000000000040000ULL +// +// If this flag is set, the memory region is capable of being +// protected with the CPU's memory cryptographic +// capabilities. If this flag is clear, the memory region is not +// capable of being protected with the CPU's memory +// cryptographic capabilities or the CPU does not support CPU +// memory cryptographic capabilities. +// +#define EFI_MEMORY_CPU_CRYPTO 0x0000000000080000ULL + // // Runtime memory attribute // -#define EFI_MEMORY_RUNTIME 0x8000000000000000ULL +#define EFI_MEMORY_RUNTIME 0x8000000000000000ULL + +// +// Attributes bitmasks, grouped by type +// +#define EFI_CACHE_ATTRIBUTE_MASK (EFI_MEMORY_UC | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB | EFI_MEMORY_UCE | EFI_MEMORY_WP) +#define EFI_MEMORY_ACCESS_MASK (EFI_MEMORY_RP | EFI_MEMORY_XP | EFI_MEMORY_RO) +#define EFI_MEMORY_ATTRIBUTE_MASK (EFI_MEMORY_ACCESS_MASK | EFI_MEMORY_SP | EFI_MEMORY_CPU_CRYPTO) /// /// Memory descriptor version number. /// -#define EFI_MEMORY_DESCRIPTOR_VERSION 1 +#define EFI_MEMORY_DESCRIPTOR_VERSION 1 /// /// Definition of an EFI memory descriptor. /// typedef struct { /// - /// Type of the memory region. See EFI_MEMORY_TYPE. + /// Type of the memory region. + /// Type EFI_MEMORY_TYPE is defined in the + /// AllocatePages() function description. /// - UINT32 Type; + UINT32 Type; /// - /// Physical address of the first byte of the memory region. Must aligned - /// on a 4 KB boundary. + /// Physical address of the first byte in the memory region. PhysicalStart must be + /// aligned on a 4 KiB boundary, and must not be above 0xfffffffffffff000. Type + /// EFI_PHYSICAL_ADDRESS is defined in the AllocatePages() function description /// - EFI_PHYSICAL_ADDRESS PhysicalStart; + EFI_PHYSICAL_ADDRESS PhysicalStart; /// - /// Virtual address of the first byte of the memory region. Must aligned - /// on a 4 KB boundary. + /// Virtual address of the first byte in the memory region. + /// VirtualStart must be aligned on a 4 KiB boundary, + /// and must not be above 0xfffffffffffff000. /// - EFI_VIRTUAL_ADDRESS VirtualStart; + EFI_VIRTUAL_ADDRESS VirtualStart; /// - /// Number of 4KB pages in the memory region. + /// NumberOfPagesNumber of 4 KiB pages in the memory region. + /// NumberOfPages must not be 0, and must not be any value + /// that would represent a memory page with a start address, + /// either physical or virtual, above 0xfffffffffffff000. /// - UINT64 NumberOfPages; + UINT64 NumberOfPages; /// /// Attributes of the memory region that describe the bit mask of capabilities /// for that memory region, and not necessarily the current settings for that /// memory region. /// - UINT64 Attribute; + UINT64 Attribute; } EFI_MEMORY_DESCRIPTOR; /** @@ -190,7 +221,7 @@ EFI_STATUS On output, it is the size of the buffer returned by the firmware if the buffer was large enough, or the size of the buffer needed to contain the map if the buffer was too small. - @param[in, out] MemoryMap A pointer to the buffer in which firmware places the current memory + @param[out] MemoryMap A pointer to the buffer in which firmware places the current memory map. @param[out] MapKey A pointer to the location in which firmware returns the key for the current memory map. @@ -211,7 +242,7 @@ typedef EFI_STATUS (EFIAPI *EFI_GET_MEMORY_MAP)( IN OUT UINTN *MemoryMapSize, - IN OUT EFI_MEMORY_DESCRIPTOR *MemoryMap, + OUT EFI_MEMORY_DESCRIPTOR *MemoryMap, OUT UINTN *MapKey, OUT UINTN *DescriptorSize, OUT UINT32 *DescriptorVersion @@ -316,8 +347,8 @@ typedef EFI_STATUS (EFIAPI *EFI_CONNECT_CONTROLLER)( IN EFI_HANDLE ControllerHandle, - IN EFI_HANDLE *DriverImageHandle, OPTIONAL - IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath, OPTIONAL + IN EFI_HANDLE *DriverImageHandle OPTIONAL, + IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL, IN BOOLEAN Recursive ); @@ -349,16 +380,14 @@ typedef EFI_STATUS (EFIAPI *EFI_DISCONNECT_CONTROLLER)( IN EFI_HANDLE ControllerHandle, - IN EFI_HANDLE DriverImageHandle, OPTIONAL + IN EFI_HANDLE DriverImageHandle OPTIONAL, IN EFI_HANDLE ChildHandle OPTIONAL ); - - // // ConvertPointer DebugDisposition type. // -#define EFI_OPTIONAL_PTR 0x00000001 +#define EFI_OPTIONAL_PTR 0x00000001 /** Determines the new virtual address that is to be used on subsequent memory accesses. @@ -382,27 +411,25 @@ EFI_STATUS IN OUT VOID **Address ); - // // These types can be ORed together as needed - for example, // EVT_TIMER might be Ored with EVT_NOTIFY_WAIT or // EVT_NOTIFY_SIGNAL. // -#define EVT_TIMER 0x80000000 -#define EVT_RUNTIME 0x40000000 -#define EVT_NOTIFY_WAIT 0x00000100 -#define EVT_NOTIFY_SIGNAL 0x00000200 +#define EVT_TIMER 0x80000000 +#define EVT_RUNTIME 0x40000000 +#define EVT_NOTIFY_WAIT 0x00000100 +#define EVT_NOTIFY_SIGNAL 0x00000200 -#define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201 -#define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202 +#define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201 +#define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202 // // The event's NotifyContext pointer points to a runtime memory // address. // The event is deprecated in UEFI2.0 and later specifications. // -#define EVT_RUNTIME_CONTEXT 0x20000000 - +#define EVT_RUNTIME_CONTEXT 0x20000000 /** Invoke a notification event @@ -583,15 +610,13 @@ EFI_STATUS IN EFI_EVENT Event ); - // // Task priority level // -#define TPL_APPLICATION 4 -#define TPL_CALLBACK 8 -#define TPL_NOTIFY 16 -#define TPL_HIGH_LEVEL 31 - +#define TPL_APPLICATION 4 +#define TPL_CALLBACK 8 +#define TPL_NOTIFY 16 +#define TPL_HIGH_LEVEL 31 /** Raises a task's priority level and returns its previous level. @@ -648,7 +673,7 @@ EFI_STATUS (EFIAPI *EFI_GET_VARIABLE)( IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, - OUT UINT32 *Attributes, OPTIONAL + OUT UINT32 *Attributes OPTIONAL, IN OUT UINTN *DataSize, OUT VOID *Data OPTIONAL ); @@ -656,7 +681,8 @@ EFI_STATUS /** Enumerates the current variable names. - @param[in, out] VariableNameSize The size of the VariableName buffer. + @param[in, out] VariableNameSize The size of the VariableName buffer. The size must be large + enough to fit input string supplied in VariableName buffer. @param[in, out] VariableName On input, supplies the last VariableName that was returned by GetNextVariableName(). On output, returns the Nullterminated string of the current variable. @@ -667,9 +693,14 @@ EFI_STATUS @retval EFI_SUCCESS The function completed successfully. @retval EFI_NOT_FOUND The next variable was not found. @retval EFI_BUFFER_TOO_SMALL The VariableNameSize is too small for the result. + VariableNameSize has been updated with the size needed to complete the request. @retval EFI_INVALID_PARAMETER VariableNameSize is NULL. @retval EFI_INVALID_PARAMETER VariableName is NULL. @retval EFI_INVALID_PARAMETER VendorGuid is NULL. + @retval EFI_INVALID_PARAMETER The input values of VariableName and VendorGuid are not a name and + GUID of an existing variable. + @retval EFI_INVALID_PARAMETER Null-terminator is not found in the first VariableNameSize bytes of + the input VariableName buffer. @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error. **/ @@ -690,8 +721,7 @@ EFI_STATUS then EFI_INVALID_PARAMETER is returned. @param[in] VendorGuid A unique identifier for the vendor. @param[in] Attributes Attributes bitmask to set for the variable. - @param[in] DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, - EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS, or + @param[in] DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is set, then a SetVariable() call with a DataSize of zero will not cause any change to @@ -710,9 +740,8 @@ EFI_STATUS @retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error. @retval EFI_WRITE_PROTECTED The variable in question is read-only. @retval EFI_WRITE_PROTECTED The variable in question cannot be deleted. - @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS - or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, but the AuthInfo - does NOT pass the validation check carried out by the firmware. + @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACESS being set, + but the AuthInfo does NOT pass the validation check carried out by the firmware. @retval EFI_NOT_FOUND The variable trying to be updated or deleted was not found. @@ -727,7 +756,6 @@ EFI_STATUS IN VOID *Data ); - /// /// This provides the capabilities of the /// real time clock device as exposed through the EFI interfaces. @@ -739,14 +767,14 @@ typedef struct { /// value would be 1 Hz, or 1, to indicate that the device only reports /// the time to the resolution of 1 second. /// - UINT32 Resolution; + UINT32 Resolution; /// /// Provides the timekeeping accuracy of the real-time clock in an /// error rate of 1E-6 parts per million. For a clock with an accuracy /// of 50 parts per million, the value in this field would be /// 50,000,000. /// - UINT32 Accuracy; + UINT32 Accuracy; /// /// A TRUE indicates that a time set operation clears the device's /// time below the Resolution reporting level. A FALSE @@ -754,7 +782,7 @@ typedef struct { /// device is not cleared when the time is set. Normal PC-AT CMOS /// RTC devices set this value to FALSE. /// - BOOLEAN SetsToZero; + BOOLEAN SetsToZero; } EFI_TIME_CAPABILITIES; /** @@ -1011,10 +1039,10 @@ EFI_STATUS EfiResetShutdown the data buffer starts with a Null-terminated string, optionally followed by additional binary data. The string is a description that the caller may use to further - indicate the reason for the system reset. ResetData is only - valid if ResetStatus is something other than EFI_SUCCESS - unless the ResetType is EfiResetPlatformSpecific - where a minimum amount of ResetData is always required. + indicate the reason for the system reset. + For a ResetType of EfiResetPlatformSpecific the data buffer + also starts with a Null-terminated string that is followed + by an EFI_GUID that describes the specific type of reset to perform. **/ typedef VOID @@ -1267,12 +1295,12 @@ EFI_STATUS OUT VOID **Interface ); -#define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001 -#define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002 -#define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004 -#define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008 -#define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010 -#define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020 +#define EFI_OPEN_PROTOCOL_BY_HANDLE_PROTOCOL 0x00000001 +#define EFI_OPEN_PROTOCOL_GET_PROTOCOL 0x00000002 +#define EFI_OPEN_PROTOCOL_TEST_PROTOCOL 0x00000004 +#define EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER 0x00000008 +#define EFI_OPEN_PROTOCOL_BY_DRIVER 0x00000010 +#define EFI_OPEN_PROTOCOL_EXCLUSIVE 0x00000020 /** Queries a handle to determine if it supports a specified protocol. If the protocol is supported by the @@ -1306,13 +1334,12 @@ EFI_STATUS (EFIAPI *EFI_OPEN_PROTOCOL)( IN EFI_HANDLE Handle, IN EFI_GUID *Protocol, - OUT VOID **Interface, OPTIONAL + OUT VOID **Interface OPTIONAL, IN EFI_HANDLE AgentHandle, IN EFI_HANDLE ControllerHandle, IN UINT32 Attributes ); - /** Closes a protocol on a handle that was opened using OpenProtocol(). @@ -1347,10 +1374,10 @@ EFI_STATUS /// EFI Oprn Protocol Information Entry /// typedef struct { - EFI_HANDLE AgentHandle; - EFI_HANDLE ControllerHandle; - UINT32 Attributes; - UINT32 OpenCount; + EFI_HANDLE AgentHandle; + EFI_HANDLE ControllerHandle; + UINT32 Attributes; + UINT32 OpenCount; } EFI_OPEN_PROTOCOL_INFORMATION_ENTRY; /** @@ -1474,8 +1501,8 @@ typedef EFI_STATUS (EFIAPI *EFI_LOCATE_HANDLE)( IN EFI_LOCATE_SEARCH_TYPE SearchType, - IN EFI_GUID *Protocol, OPTIONAL - IN VOID *SearchKey, OPTIONAL + IN EFI_GUID *Protocol OPTIONAL, + IN VOID *SearchKey OPTIONAL, IN OUT UINTN *BufferSize, OUT EFI_HANDLE *Buffer ); @@ -1531,7 +1558,7 @@ EFI_STATUS @param[in] Protocol Provides the protocol to search by. This parameter is only valid for a SearchType of ByProtocol. @param[in] SearchKey Supplies the search key depending on the SearchType. - @param[in, out] NoHandles The number of handles returned in Buffer. + @param[out] NoHandles The number of handles returned in Buffer. @param[out] Buffer A pointer to the buffer to return the requested array of handles that support Protocol. @@ -1547,9 +1574,9 @@ typedef EFI_STATUS (EFIAPI *EFI_LOCATE_HANDLE_BUFFER)( IN EFI_LOCATE_SEARCH_TYPE SearchType, - IN EFI_GUID *Protocol, OPTIONAL - IN VOID *SearchKey, OPTIONAL - IN OUT UINTN *NoHandles, + IN EFI_GUID *Protocol OPTIONAL, + IN VOID *SearchKey OPTIONAL, + OUT UINTN *NoHandles, OUT EFI_HANDLE **Buffer ); @@ -1567,13 +1594,14 @@ EFI_STATUS @retval EFI_NOT_FOUND No protocol instances were found that match Protocol and Registration. @retval EFI_INVALID_PARAMETER Interface is NULL. + Protocol is NULL. **/ typedef EFI_STATUS (EFIAPI *EFI_LOCATE_PROTOCOL)( IN EFI_GUID *Protocol, - IN VOID *Registration, OPTIONAL + IN VOID *Registration OPTIONAL, OUT VOID **Interface ); @@ -1584,20 +1612,20 @@ typedef struct { /// /// Length in bytes of the data pointed to by DataBlock/ContinuationPointer. /// - UINT64 Length; + UINT64 Length; union { /// /// Physical address of the data block. This member of the union is /// used if Length is not equal to zero. /// - EFI_PHYSICAL_ADDRESS DataBlock; + EFI_PHYSICAL_ADDRESS DataBlock; /// /// Physical address of another block of /// EFI_CAPSULE_BLOCK_DESCRIPTOR structures. This /// member of the union is used if Length is equal to zero. If /// ContinuationPointer is zero this entry represents the end of the list. /// - EFI_PHYSICAL_ADDRESS ContinuationPointer; + EFI_PHYSICAL_ADDRESS ContinuationPointer; } Union; } EFI_CAPSULE_BLOCK_DESCRIPTOR; @@ -1608,23 +1636,23 @@ typedef struct { /// /// A GUID that defines the contents of a capsule. /// - EFI_GUID CapsuleGuid; + EFI_GUID CapsuleGuid; /// /// The size of the capsule header. This may be larger than the size of /// the EFI_CAPSULE_HEADER since CapsuleGuid may imply /// extended header entries /// - UINT32 HeaderSize; + UINT32 HeaderSize; /// /// Bit-mapped list describing the capsule attributes. The Flag values /// of 0x0000 - 0xFFFF are defined by CapsuleGuid. Flag values /// of 0x10000 - 0xFFFFFFFF are defined by this specification /// - UINT32 Flags; + UINT32 Flags; /// /// Size in bytes of the capsule. /// - UINT32 CapsuleImageSize; + UINT32 CapsuleImageSize; } EFI_CAPSULE_HEADER; /// @@ -1636,16 +1664,16 @@ typedef struct { /// /// the size of the array of capsules. /// - UINT32 CapsuleArrayNumber; + UINT32 CapsuleArrayNumber; /// /// Point to an array of capsules that contain the same CapsuleGuid value. /// - VOID* CapsulePtr[1]; + VOID *CapsulePtr[1]; } EFI_CAPSULE_TABLE; -#define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x00010000 -#define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE 0x00020000 -#define CAPSULE_FLAGS_INITIATE_RESET 0x00040000 +#define CAPSULE_FLAGS_PERSIST_ACROSS_RESET 0x00010000 +#define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE 0x00020000 +#define CAPSULE_FLAGS_INITIATE_RESET 0x00040000 /** Passes capsules to the firmware with both virtual and physical mapping. Depending on the intended @@ -1757,11 +1785,14 @@ EFI_STATUS #define EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED 0x0000000000000008 #define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED 0x0000000000000010 #define EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY 0x0000000000000040 +#define EFI_OS_INDICATIONS_JSON_CONFIG_DATA_REFRESH 0x0000000000000080 // // EFI Runtime Services Table // #define EFI_SYSTEM_TABLE_SIGNATURE SIGNATURE_64 ('I','B','I',' ','S','Y','S','T') +#define EFI_2_80_SYSTEM_TABLE_REVISION ((2 << 16) | (80)) +#define EFI_2_70_SYSTEM_TABLE_REVISION ((2 << 16) | (70)) #define EFI_2_60_SYSTEM_TABLE_REVISION ((2 << 16) | (60)) #define EFI_2_50_SYSTEM_TABLE_REVISION ((2 << 16) | (50)) #define EFI_2_40_SYSTEM_TABLE_REVISION ((2 << 16) | (40)) @@ -1772,7 +1803,7 @@ EFI_STATUS #define EFI_2_00_SYSTEM_TABLE_REVISION ((2 << 16) | (00)) #define EFI_1_10_SYSTEM_TABLE_REVISION ((1 << 16) | (10)) #define EFI_1_02_SYSTEM_TABLE_REVISION ((1 << 16) | (02)) -#define EFI_SYSTEM_TABLE_REVISION EFI_2_60_SYSTEM_TABLE_REVISION +#define EFI_SYSTEM_TABLE_REVISION EFI_2_70_SYSTEM_TABLE_REVISION #define EFI_SPECIFICATION_VERSION EFI_SYSTEM_TABLE_REVISION #define EFI_RUNTIME_SERVICES_SIGNATURE SIGNATURE_64 ('R','U','N','T','S','E','R','V') @@ -1785,50 +1816,49 @@ typedef struct { /// /// The table header for the EFI Runtime Services Table. /// - EFI_TABLE_HEADER Hdr; + EFI_TABLE_HEADER Hdr; // // Time Services // - EFI_GET_TIME GetTime; - EFI_SET_TIME SetTime; - EFI_GET_WAKEUP_TIME GetWakeupTime; - EFI_SET_WAKEUP_TIME SetWakeupTime; + EFI_GET_TIME GetTime; + EFI_SET_TIME SetTime; + EFI_GET_WAKEUP_TIME GetWakeupTime; + EFI_SET_WAKEUP_TIME SetWakeupTime; // // Virtual Memory Services // - EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap; - EFI_CONVERT_POINTER ConvertPointer; + EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap; + EFI_CONVERT_POINTER ConvertPointer; // // Variable Services // - EFI_GET_VARIABLE GetVariable; - EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName; - EFI_SET_VARIABLE SetVariable; + EFI_GET_VARIABLE GetVariable; + EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName; + EFI_SET_VARIABLE SetVariable; // // Miscellaneous Services // - EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount; - EFI_RESET_SYSTEM ResetSystem; + EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount; + EFI_RESET_SYSTEM ResetSystem; // // UEFI 2.0 Capsule Services // - EFI_UPDATE_CAPSULE UpdateCapsule; - EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities; + EFI_UPDATE_CAPSULE UpdateCapsule; + EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities; // // Miscellaneous UEFI 2.0 Service // - EFI_QUERY_VARIABLE_INFO QueryVariableInfo; + EFI_QUERY_VARIABLE_INFO QueryVariableInfo; } EFI_RUNTIME_SERVICES; - -#define EFI_BOOT_SERVICES_SIGNATURE SIGNATURE_64 ('B','O','O','T','S','E','R','V') -#define EFI_BOOT_SERVICES_REVISION EFI_SPECIFICATION_VERSION +#define EFI_BOOT_SERVICES_SIGNATURE SIGNATURE_64 ('B','O','O','T','S','E','R','V') +#define EFI_BOOT_SERVICES_REVISION EFI_SPECIFICATION_VERSION /// /// EFI Boot Services Table. @@ -1837,95 +1867,95 @@ typedef struct { /// /// The table header for the EFI Boot Services Table. /// - EFI_TABLE_HEADER Hdr; + EFI_TABLE_HEADER Hdr; // // Task Priority Services // - EFI_RAISE_TPL RaiseTPL; - EFI_RESTORE_TPL RestoreTPL; + EFI_RAISE_TPL RaiseTPL; + EFI_RESTORE_TPL RestoreTPL; // // Memory Services // - EFI_ALLOCATE_PAGES AllocatePages; - EFI_FREE_PAGES FreePages; - EFI_GET_MEMORY_MAP GetMemoryMap; - EFI_ALLOCATE_POOL AllocatePool; - EFI_FREE_POOL FreePool; + EFI_ALLOCATE_PAGES AllocatePages; + EFI_FREE_PAGES FreePages; + EFI_GET_MEMORY_MAP GetMemoryMap; + EFI_ALLOCATE_POOL AllocatePool; + EFI_FREE_POOL FreePool; // // Event & Timer Services // - EFI_CREATE_EVENT CreateEvent; - EFI_SET_TIMER SetTimer; - EFI_WAIT_FOR_EVENT WaitForEvent; - EFI_SIGNAL_EVENT SignalEvent; - EFI_CLOSE_EVENT CloseEvent; - EFI_CHECK_EVENT CheckEvent; + EFI_CREATE_EVENT CreateEvent; + EFI_SET_TIMER SetTimer; + EFI_WAIT_FOR_EVENT WaitForEvent; + EFI_SIGNAL_EVENT SignalEvent; + EFI_CLOSE_EVENT CloseEvent; + EFI_CHECK_EVENT CheckEvent; // // Protocol Handler Services // - EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface; - EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface; - EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface; - EFI_HANDLE_PROTOCOL HandleProtocol; - VOID *Reserved; - EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify; - EFI_LOCATE_HANDLE LocateHandle; - EFI_LOCATE_DEVICE_PATH LocateDevicePath; - EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable; + EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface; + EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface; + EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface; + EFI_HANDLE_PROTOCOL HandleProtocol; + VOID *Reserved; + EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify; + EFI_LOCATE_HANDLE LocateHandle; + EFI_LOCATE_DEVICE_PATH LocateDevicePath; + EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable; // // Image Services // - EFI_IMAGE_LOAD LoadImage; - EFI_IMAGE_START StartImage; - EFI_EXIT Exit; - EFI_IMAGE_UNLOAD UnloadImage; - EFI_EXIT_BOOT_SERVICES ExitBootServices; + EFI_IMAGE_LOAD LoadImage; + EFI_IMAGE_START StartImage; + EFI_EXIT Exit; + EFI_IMAGE_UNLOAD UnloadImage; + EFI_EXIT_BOOT_SERVICES ExitBootServices; // // Miscellaneous Services // - EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount; - EFI_STALL Stall; - EFI_SET_WATCHDOG_TIMER SetWatchdogTimer; + EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount; + EFI_STALL Stall; + EFI_SET_WATCHDOG_TIMER SetWatchdogTimer; // // DriverSupport Services // - EFI_CONNECT_CONTROLLER ConnectController; - EFI_DISCONNECT_CONTROLLER DisconnectController; + EFI_CONNECT_CONTROLLER ConnectController; + EFI_DISCONNECT_CONTROLLER DisconnectController; // // Open and Close Protocol Services // - EFI_OPEN_PROTOCOL OpenProtocol; - EFI_CLOSE_PROTOCOL CloseProtocol; - EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation; + EFI_OPEN_PROTOCOL OpenProtocol; + EFI_CLOSE_PROTOCOL CloseProtocol; + EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation; // // Library Services // - EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle; - EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer; - EFI_LOCATE_PROTOCOL LocateProtocol; - EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces; - EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces; + EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle; + EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer; + EFI_LOCATE_PROTOCOL LocateProtocol; + EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces; + EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces; // // 32-bit CRC Services // - EFI_CALCULATE_CRC32 CalculateCrc32; + EFI_CALCULATE_CRC32 CalculateCrc32; // // Miscellaneous Services // - EFI_COPY_MEM CopyMem; - EFI_SET_MEM SetMem; - EFI_CREATE_EVENT_EX CreateEventEx; + EFI_COPY_MEM CopyMem; + EFI_SET_MEM SetMem; + EFI_CREATE_EVENT_EX CreateEventEx; } EFI_BOOT_SERVICES; /// @@ -1936,11 +1966,11 @@ typedef struct { /// /// The 128-bit GUID value that uniquely identifies the system configuration table. /// - EFI_GUID VendorGuid; + EFI_GUID VendorGuid; /// /// A pointer to the table associated with VendorGuid. /// - VOID *VendorTable; + VOID *VendorTable; } EFI_CONFIGURATION_TABLE; /// @@ -1950,63 +1980,63 @@ typedef struct { /// /// The table header for the EFI System Table. /// - EFI_TABLE_HEADER Hdr; + EFI_TABLE_HEADER Hdr; /// /// A pointer to a null terminated string that identifies the vendor /// that produces the system firmware for the platform. /// - CHAR16 *FirmwareVendor; + CHAR16 *FirmwareVendor; /// /// A firmware vendor specific value that identifies the revision /// of the system firmware for the platform. /// - UINT32 FirmwareRevision; + UINT32 FirmwareRevision; /// /// The handle for the active console input device. This handle must support /// EFI_SIMPLE_TEXT_INPUT_PROTOCOL and EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL. /// - EFI_HANDLE ConsoleInHandle; + EFI_HANDLE ConsoleInHandle; /// /// A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL interface that is /// associated with ConsoleInHandle. /// - EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn; + EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn; /// /// The handle for the active console output device. /// - EFI_HANDLE ConsoleOutHandle; + EFI_HANDLE ConsoleOutHandle; /// /// A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface /// that is associated with ConsoleOutHandle. /// - EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut; + EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut; /// /// The handle for the active standard error console device. /// This handle must support the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL. /// - EFI_HANDLE StandardErrorHandle; + EFI_HANDLE StandardErrorHandle; /// /// A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface /// that is associated with StandardErrorHandle. /// - EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *StdErr; + EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *StdErr; /// /// A pointer to the EFI Runtime Services Table. /// - EFI_RUNTIME_SERVICES *RuntimeServices; + EFI_RUNTIME_SERVICES *RuntimeServices; /// /// A pointer to the EFI Boot Services Table. /// - EFI_BOOT_SERVICES *BootServices; + EFI_BOOT_SERVICES *BootServices; /// /// The number of system configuration tables in the buffer ConfigurationTable. /// - UINTN NumberOfTableEntries; + UINTN NumberOfTableEntries; /// /// A pointer to the system configuration tables. /// The number of entries in the table is NumberOfTableEntries. /// - EFI_CONFIGURATION_TABLE *ConfigurationTable; + EFI_CONFIGURATION_TABLE *ConfigurationTable; } EFI_SYSTEM_TABLE; /** @@ -2041,13 +2071,13 @@ typedef struct _EFI_LOAD_OPTION { /// The attributes for this load option entry. All unused bits must be zero /// and are reserved by the UEFI specification for future growth. /// - UINT32 Attributes; + UINT32 Attributes; /// /// Length in bytes of the FilePathList. OptionalData starts at offset /// sizeof(UINT32) + sizeof(UINT16) + StrSize(Description) + FilePathListLength /// of the EFI_LOAD_OPTION descriptor. /// - UINT16 FilePathListLength; + UINT16 FilePathListLength; /// /// The user readable description for the load option. /// This field ends with a Null character. @@ -2079,18 +2109,18 @@ typedef struct _EFI_LOAD_OPTION { // // EFI Load Options Attributes // -#define LOAD_OPTION_ACTIVE 0x00000001 -#define LOAD_OPTION_FORCE_RECONNECT 0x00000002 -#define LOAD_OPTION_HIDDEN 0x00000008 -#define LOAD_OPTION_CATEGORY 0x00001F00 +#define LOAD_OPTION_ACTIVE 0x00000001 +#define LOAD_OPTION_FORCE_RECONNECT 0x00000002 +#define LOAD_OPTION_HIDDEN 0x00000008 +#define LOAD_OPTION_CATEGORY 0x00001F00 -#define LOAD_OPTION_CATEGORY_BOOT 0x00000000 -#define LOAD_OPTION_CATEGORY_APP 0x00000100 +#define LOAD_OPTION_CATEGORY_BOOT 0x00000000 +#define LOAD_OPTION_CATEGORY_APP 0x00000100 -#define EFI_BOOT_OPTION_SUPPORT_KEY 0x00000001 -#define EFI_BOOT_OPTION_SUPPORT_APP 0x00000002 -#define EFI_BOOT_OPTION_SUPPORT_SYSPREP 0x00000010 -#define EFI_BOOT_OPTION_SUPPORT_COUNT 0x00000300 +#define EFI_BOOT_OPTION_SUPPORT_KEY 0x00000001 +#define EFI_BOOT_OPTION_SUPPORT_APP 0x00000002 +#define EFI_BOOT_OPTION_SUPPORT_SYSPREP 0x00000010 +#define EFI_BOOT_OPTION_SUPPORT_COUNT 0x00000300 /// /// EFI Boot Key Data @@ -2100,40 +2130,40 @@ typedef union { /// /// Indicates the revision of the EFI_KEY_OPTION structure. This revision level should be 0. /// - UINT32 Revision : 8; + UINT32 Revision : 8; /// /// Either the left or right Shift keys must be pressed (1) or must not be pressed (0). /// - UINT32 ShiftPressed : 1; + UINT32 ShiftPressed : 1; /// /// Either the left or right Control keys must be pressed (1) or must not be pressed (0). /// - UINT32 ControlPressed : 1; + UINT32 ControlPressed : 1; /// /// Either the left or right Alt keys must be pressed (1) or must not be pressed (0). /// - UINT32 AltPressed : 1; + UINT32 AltPressed : 1; /// /// Either the left or right Logo keys must be pressed (1) or must not be pressed (0). /// - UINT32 LogoPressed : 1; + UINT32 LogoPressed : 1; /// /// The Menu key must be pressed (1) or must not be pressed (0). /// - UINT32 MenuPressed : 1; + UINT32 MenuPressed : 1; /// /// The SysReq key must be pressed (1) or must not be pressed (0). /// - UINT32 SysReqPressed : 1; - UINT32 Reserved : 16; + UINT32 SysReqPressed : 1; + UINT32 Reserved : 16; /// /// Specifies the actual number of entries in EFI_KEY_OPTION.Keys, from 0-3. If /// zero, then only the shift state is considered. If more than one, then the boot option will /// only be launched if all of the specified keys are pressed with the same shift state. /// - UINT32 InputKeyCount : 2; + UINT32 InputKeyCount : 2; } Options; - UINT32 PackedValue; + UINT32 PackedValue; } EFI_BOOT_KEY_DATA; /// @@ -2144,51 +2174,62 @@ typedef struct { /// /// Specifies options about how the key will be processed. /// - EFI_BOOT_KEY_DATA KeyData; + EFI_BOOT_KEY_DATA KeyData; /// /// The CRC-32 which should match the CRC-32 of the entire EFI_LOAD_OPTION to /// which BootOption refers. If the CRC-32s do not match this value, then this key /// option is ignored. /// - UINT32 BootOptionCrc; + UINT32 BootOptionCrc; /// /// The Boot#### option which will be invoked if this key is pressed and the boot option /// is active (LOAD_OPTION_ACTIVE is set). /// - UINT16 BootOption; + UINT16 BootOption; /// /// The key codes to compare against those returned by the /// EFI_SIMPLE_TEXT_INPUT and EFI_SIMPLE_TEXT_INPUT_EX protocols. /// The number of key codes (0-3) is specified by the EFI_KEY_CODE_COUNT field in KeyOptions. /// - //EFI_INPUT_KEY Keys[]; + // EFI_INPUT_KEY Keys[]; } EFI_KEY_OPTION; #pragma pack() // // EFI File location to boot from on removable media devices // -#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 L"\\EFI\\BOOT\\BOOTIA32.EFI" -#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64 L"\\EFI\\BOOT\\BOOTIA64.EFI" -#define EFI_REMOVABLE_MEDIA_FILE_NAME_X64 L"\\EFI\\BOOT\\BOOTX64.EFI" -#define EFI_REMOVABLE_MEDIA_FILE_NAME_ARM L"\\EFI\\BOOT\\BOOTARM.EFI" -#define EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 L"\\EFI\\BOOT\\BOOTAA64.EFI" - -#if defined (MDE_CPU_IA32) - #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 -#elif defined (MDE_CPU_IPF) - #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA64 -#elif defined (MDE_CPU_X64) - #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_X64 -#elif defined (MDE_CPU_EBC) -#elif defined (MDE_CPU_ARM) - #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_ARM -#elif defined (MDE_CPU_AARCH64) - #define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 -#else - #error Unknown Processor Type +#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 L"\\EFI\\BOOT\\BOOTIA32.EFI" +#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64 L"\\EFI\\BOOT\\BOOTIA64.EFI" +#define EFI_REMOVABLE_MEDIA_FILE_NAME_X64 L"\\EFI\\BOOT\\BOOTX64.EFI" +#define EFI_REMOVABLE_MEDIA_FILE_NAME_ARM L"\\EFI\\BOOT\\BOOTARM.EFI" +#define EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 L"\\EFI\\BOOT\\BOOTAA64.EFI" +#define EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64 L"\\EFI\\BOOT\\BOOTRISCV64.EFI" +#define EFI_REMOVABLE_MEDIA_FILE_NAME_LOONGARCH64 L"\\EFI\\BOOT\\BOOTLOONGARCH64.EFI" + +#if !defined (EFI_REMOVABLE_MEDIA_FILE_NAME) + #if defined (MDE_CPU_IA32) +#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 + #elif defined (MDE_CPU_X64) +#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_X64 + #elif defined (MDE_CPU_EBC) + #elif defined (MDE_CPU_ARM) +#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_ARM + #elif defined (MDE_CPU_AARCH64) +#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_AARCH64 + #elif defined (MDE_CPU_RISCV64) +#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_RISCV64 + #elif defined (MDE_CPU_LOONGARCH64) +#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_LOONGARCH64 + #else + #error Unknown Processor Type + #endif #endif +// +// The directory within the active EFI System Partition defined for delivery of capsule to firmware +// +#define EFI_CAPSULE_FILE_DIRECTORY L"\\EFI\\UpdateCapsule\\" + #include <ipxe/efi/Uefi/UefiPxe.h> #include <ipxe/efi/Uefi/UefiGpt.h> #include <ipxe/efi/Uefi/UefiInternalFormRepresentation.h> |