]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Synchronise EFI header files
authorMichael Brown <mcb30@ipxe.org>
Wed, 30 Mar 2011 23:39:40 +0000 (00:39 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 31 Mar 2011 02:31:11 +0000 (03:31 +0100)
Synchronised to EDK2 SVN revision 11462.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
12 files changed:
src/include/ipxe/efi/Base.h
src/include/ipxe/efi/IndustryStandard/PeImage.h
src/include/ipxe/efi/Pi/PiDependency.h
src/include/ipxe/efi/Pi/PiFirmwareVolume.h
src/include/ipxe/efi/Pi/PiStatusCode.h
src/include/ipxe/efi/Protocol/LoadedImage.h
src/include/ipxe/efi/Protocol/PciIo.h
src/include/ipxe/efi/Protocol/PciRootBridgeIo.h
src/include/ipxe/efi/Protocol/SimpleTextIn.h
src/include/ipxe/efi/Uefi/UefiBaseType.h
src/include/ipxe/efi/Uefi/UefiGpt.h
src/include/ipxe/efi/Uefi/UefiSpec.h

index d95f24bd4256249901a1551e42be24817d074326..999b414716961d73345740904fe5aa1f56890cea 100644 (file)
@@ -496,7 +496,7 @@ typedef CHAR8 *VA_LIST;
   @return  A pointer to the beginning of a variable argument list.
 
 **/
-#define VA_START(Marker, Parameter) (Marker = (VA_LIST) & (Parameter) + _INT_SIZE_OF (Parameter))
+#define VA_START(Marker, Parameter) (Marker = (VA_LIST) ((UINTN) & (Parameter) + _INT_SIZE_OF (Parameter)))
 
 /**
   Returns an argument of a specified type from a variable argument list and updates
@@ -575,7 +575,15 @@ typedef UINTN  *BASE_LIST;
   @return  Offset, in bytes, of field.
 
 **/
+#ifdef __GNUC__
+#if __GNUC__ >= 4
+#define OFFSET_OF(TYPE, Field) ((UINTN) __builtin_offsetof(TYPE, Field))
+#endif
+#endif
+
+#ifndef OFFSET_OF
 #define OFFSET_OF(TYPE, Field) ((UINTN) &(((TYPE *)0)->Field))
+#endif
 
 /**
   Macro that returns a pointer to the data structure that contains a specified field of
index 281d486bfb108b3bf0276096b89812fac5c47d8a..fb4c2aaa281620c1521a47c0c40ebec9a6cdf2a2 100644 (file)
@@ -494,6 +494,8 @@ typedef struct {
 #define EFI_IMAGE_REL_BASED_HIGHLOW         3
 #define EFI_IMAGE_REL_BASED_HIGHADJ         4
 #define EFI_IMAGE_REL_BASED_MIPS_JMPADDR    5
+#define EFI_IMAGE_REL_BASED_ARM_MOV32A      5
+#define EFI_IMAGE_REL_BASED_ARM_MOV32T      7
 #define EFI_IMAGE_REL_BASED_IA64_IMM64      9
 #define EFI_IMAGE_REL_BASED_MIPS_JMPADDR16  9
 #define EFI_IMAGE_REL_BASED_DIR64           10
index 7ad81a730dadc6837d99f62bcc27111ad9b82dff..b1fa399b483b69580c8c7f86129354b02304a75d 100644 (file)
@@ -21,13 +21,13 @@ FILE_LICENCE ( BSD3 );
 
 ///
 /// If present, this must be the first and only opcode,
-/// EFI_DEP_BEFORE is only used by DXE driver.
+/// EFI_DEP_BEFORE may be used by DXE and SMM drivers.
 ///
 #define EFI_DEP_BEFORE        0x00
 
 ///
 /// If present, this must be the first and only opcode,
-/// EFI_DEP_AFTER is only used by DXE driver.
+/// EFI_DEP_AFTER may be used by DXE and SMM drivers.
 ///
 #define EFI_DEP_AFTER         0x01
 
index 605c46810983c57e44ae8a9f5d0bca0b59ba3373..813fab228e1c0ba370c1771b8610e0af77c1c87d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file
   The firmware volume related definitions in PI.
 
-  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
+  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
   which accompanies this distribution.  The full text of the license may be found at
@@ -11,7 +11,7 @@
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
   @par Revision Reference:
-  PI Version 1.0
+  PI Version 1.2B
 
 **/
 
@@ -210,5 +210,24 @@ typedef struct {
   EFI_GUID  Types[1];
 } EFI_FIRMWARE_VOLUME_EXT_ENTRY_OEM_TYPE;
 
+#define EFI_FV_EXT_TYPE_GUID_TYPE 0x0002
+
+///
+/// This extension header provides a mapping between a GUID and an OEM file type.
+///
+typedef struct {
+  ///
+  /// Standard extension entry, with the type EFI_FV_EXT_TYPE_OEM_TYPE.
+  ///
+  EFI_FIRMWARE_VOLUME_EXT_ENTRY     Hdr;
+  ///
+  /// Vendor-specific GUID.
+  ///
+  EFI_GUID                          FormatType;
+  ///
+  /// An arry of bytes of length Length.
+  ///
+  UINT8                             Data[1];
+} EFI_FIRMWARE_VOLUME_EXT_ENTRY_GUID_TYPE;
 
 #endif
index 71fd22add179b1a1bf06b06787fd5c7e90030c03..6133f00c4107a69c7210a5ee4139f194b63b3b3b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file
   StatusCode related definitions in PI.
 
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2009 - 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
@@ -566,9 +566,9 @@ typedef struct {
 /// IO Bus Class PCI Subclass Progress Code definitions.
 ///
 ///@{
-#define EFI_IOB_PCI_PC_BUS_ENUM   (EFI_SUBCLASS_SPECIFIC | 0x00000000)
-#define EFI_IOB_PCI_PC_RES_ALLOC  (EFI_SUBCLASS_SPECIFIC | 0x00000001)
-#define EFI_IOB_PCI_PC_HPC_INIT   (EFI_SUBCLASS_SPECIFIC | 0x00000002)
+#define EFI_IOB_PCI_BUS_ENUM   (EFI_SUBCLASS_SPECIFIC | 0x00000000)
+#define EFI_IOB_PCI_RES_ALLOC  (EFI_SUBCLASS_SPECIFIC | 0x00000001)
+#define EFI_IOB_PCI_HPC_INIT   (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 ///@}
 
 //
@@ -753,13 +753,14 @@ typedef struct {
 
 ///
 /// Software Class PEI Module Subclass Progress Code definitions.
+/// Note: EFI_SW_PEI_PC_RECOVERY_BEGIN is different from PI 1.2 Specification.
 ///
 ///@{
-#define EFI_SW_PEIM_PC_RECOVERY_BEGIN (EFI_SUBCLASS_SPECIFIC | 0x00000000)
-#define EFI_SW_PEIM_PC_CAPSULE_LOAD   (EFI_SUBCLASS_SPECIFIC | 0x00000001)
-#define EFI_SW_PEIM_PC_CAPSULE_START  (EFI_SUBCLASS_SPECIFIC | 0x00000002)
-#define EFI_SW_PEIM_PC_RECOVERY_USER  (EFI_SUBCLASS_SPECIFIC | 0x00000003)
-#define EFI_SW_PEIM_PC_RECOVERY_AUTO  (EFI_SUBCLASS_SPECIFIC | 0x00000004)
+#define EFI_SW_PEI_PC_RECOVERY_BEGIN  (EFI_SUBCLASS_SPECIFIC | 0x00000000)
+#define EFI_SW_PEI_PC_CAPSULE_LOAD    (EFI_SUBCLASS_SPECIFIC | 0x00000001)
+#define EFI_SW_PEI_PC_CAPSULE_START   (EFI_SUBCLASS_SPECIFIC | 0x00000002)
+#define EFI_SW_PEI_PC_RECOVERY_USER   (EFI_SUBCLASS_SPECIFIC | 0x00000003)
+#define EFI_SW_PEI_PC_RECOVERY_AUTO   (EFI_SUBCLASS_SPECIFIC | 0x00000004)
 #define EFI_SW_PEI_PC_S3_BOOT_SCRIPT  (EFI_SUBCLASS_SPECIFIC | 0x00000005)
 #define EFI_SW_PEI_PC_OS_WAKE         (EFI_SUBCLASS_SPECIFIC | 0x00000006)
 ///@}
@@ -986,10 +987,11 @@ typedef struct {
 
 ///
 /// Software Class PEI Module Subclass Error Code definitions.
+/// Note: EFI_SW_PEI_EC_INVALID_CAPSULE_DESCRIPTOR is different from PI 1.2 Specification.
 ///
 ///@{
-#define EFI_SW_PEIM_EC_NO_RECOVERY_CAPSULE         (EFI_SUBCLASS_SPECIFIC | 0x00000000)
-#define EFI_SW_PEIM_EC_INVALID_CAPSULE_DESCRIPTOR  (EFI_SUBCLASS_SPECIFIC | 0x00000001)
+#define EFI_SW_PEI_EC_NO_RECOVERY_CAPSULE          (EFI_SUBCLASS_SPECIFIC | 0x00000000)
+#define EFI_SW_PEI_EC_INVALID_CAPSULE_DESCRIPTOR   (EFI_SUBCLASS_SPECIFIC | 0x00000001)
 #define EFI_SW_PEI_EC_S3_RESUME_PPI_NOT_FOUND      (EFI_SUBCLASS_SPECIFIC | 0x00000002)
 #define EFI_SW_PEI_EC_S3_BOOT_SCRIPT_ERROR         (EFI_SUBCLASS_SPECIFIC | 0x00000003)
 #define EFI_SW_PEI_EC_S3_OS_WAKE_ERROR             (EFI_SUBCLASS_SPECIFIC | 0x00000004)
index 12e5e2d756883616271fbae099283c788e4706f8..cbe4103c4ffbc5e55aa60cbf8dc0090049c6b130 100755 (executable)
@@ -18,6 +18,8 @@
 #ifndef __LOADED_IMAGE_PROTOCOL_H__
 #define __LOADED_IMAGE_PROTOCOL_H__
 
+FILE_LICENCE ( BSD3 );
+
 #define EFI_LOADED_IMAGE_PROTOCOL_GUID \
   { \
     0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \
index d99820841f61e92447af28c6b39f369c50bed657..97f65e1f8b72a7d60e9b97f076e95696dca7e3e5 100644 (file)
@@ -2,7 +2,7 @@
   EFI PCI I/O Protocol provides the basic Memory, I/O, PCI configuration,
   and DMA interfaces that a driver uses to access its PCI controller.
 
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2010, 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
   which accompanies this distribution.  The full text of the license may be found at
@@ -72,7 +72,7 @@ typedef enum {
 #define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE   0x8000  ///< Clear for PCI controllers that can not genrate a DAC
 #define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16            0x10000 ///< I/O cycles 0x0100-0x03FF or greater (16 bit decode)
 #define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16    0x20000 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (16 bit decode)
-#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16            0x30000 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (16 bit decode)
+#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16            0x40000 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (16 bit decode)
 
 #define EFI_PCI_DEVICE_ENABLE                     (EFI_PCI_IO_ATTRIBUTE_IO | EFI_PCI_IO_ATTRIBUTE_MEMORY | EFI_PCI_IO_ATTRIBUTE_BUS_MASTER)
 #define EFI_VGA_DEVICE_ENABLE                     (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY | EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_IO)
index 5d8724198d8e2d8945fda7bbe77d8b3390685c5b..e8feea0c44b6b76c922c51047760e4268af06e0c 100644 (file)
@@ -5,7 +5,7 @@
   and PCI Configuration cycles on a PCI Root Bridge. It also provides services to perform
   defferent types of bus mastering DMA.
 
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2006 - 2010, 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
   which accompanies this distribution.  The full text of the license may be found at
@@ -99,6 +99,9 @@ typedef enum {
 #define EFI_PCI_ATTRIBUTE_MEMORY_CACHED               0x0800
 #define EFI_PCI_ATTRIBUTE_MEMORY_DISABLE              0x1000
 #define EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE          0x8000
+#define EFI_PCI_ATTRIBUTE_ISA_IO_16                   0x10000
+#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16           0x20000
+#define EFI_PCI_ATTRIBUTE_VGA_IO_16                   0x40000
 
 #define EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER   (EFI_PCI_ATTRIBUTE_MEMORY_WRITE_COMBINE | EFI_PCI_ATTRIBUTE_MEMORY_CACHED | EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE)
 
index 31cab3dfc65d766bcb91a2941d63d7f8192fc409..a89a9b4fa5394ed74adab553036c31c7bc4c7ee8 100644 (file)
@@ -103,8 +103,9 @@ EFI_STATUS
   Reads the next keystroke from the input device. The WaitForKey Event can
   be used to test for existence of a keystroke via WaitForEvent () call.
 
-  @param  This Protocol instance pointer.
-  @param  Key  Driver may perform diagnostics on reset.
+  @param  This  Protocol instance pointer.
+  @param  Key   A pointer to a buffer that is filled in with the keystroke
+                information for the key that was pressed.
 
   @retval EFI_SUCCESS      The keystroke information was returned.
   @retval EFI_NOT_READY    There was no keystroke data available.
index 05170390219660a4cff2eb23ff9a7f4bf7aae85c..2c63aa6ff2af1e76a769806063ebab11c8c58316 100644 (file)
@@ -183,16 +183,38 @@ typedef union {
 
 //
 // The EFI memory allocation functions work in units of EFI_PAGEs that are
-// 4K. This should in no way be confused with the page size of the processor.
+// 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             0x1000
+#define EFI_PAGE_SIZE             SIZE_4KB
 #define EFI_PAGE_MASK             0xFFF
 #define EFI_PAGE_SHIFT            12
 
-#define EFI_SIZE_TO_PAGES(a)  (((a) >> EFI_PAGE_SHIFT) + (((a) & EFI_PAGE_MASK) ? 1 : 0))
+/**
+  Macro that converts a size, in bytes, to a number of EFI_PAGESs.
 
-#define EFI_PAGES_TO_SIZE(a)   ( (a) << EFI_PAGE_SHIFT)
+  @param  Size      A size in bytes.  This parameter is assumed to be type UINTN.
+                    Passing in a parameter that is larger than UINTN may produce
+                    unexpected results.
+
+  @return  The number of EFI_PAGESs associated with the number of bytes specified
+           by Size.
+
+**/
+#define EFI_SIZE_TO_PAGES(Size)  (((Size) >> EFI_PAGE_SHIFT) + (((Size) & EFI_PAGE_MASK) ? 1 : 0))
+
+/**
+  Macro that converts a number of EFI_PAGEs to a size in bytes.
+
+  @param  Pages     The number of EFI_PAGES.  This parameter is assumed to be
+                    type UINTN.  Passing in a parameter that is larger than
+                    UINTN may produce unexpected results.
+
+  @return  The number of bytes associated with the number of EFI_PAGEs specified
+           by Pages.
+
+**/
+#define EFI_PAGES_TO_SIZE(Pages)  ((Pages) << EFI_PAGE_SHIFT)
 
 ///
 /// PE32+ Machine type for IA32 UEFI images.
index 0ea2d70a0a77689b077b4f6f8a9e56baacc9fcfb..26af39f5d46446cb1715efb77ec0345c4fe2d421 100644 (file)
@@ -1,7 +1,7 @@
 /** @file
   EFI Guid Partition Table Format Definition.
 
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+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
@@ -116,10 +116,14 @@ typedef struct {
   ///             potentially stop working if this partition is removed. Unless OS software or firmware
   ///             recognizes this partition, it should never be removed or modified as the UEFI firmware or
   ///             platform hardware may become non-functional.
-  /// Bit 1:      If this bit is set firmware must not produce an EFI_BLOCK_IO_PROTOCOL device for
-  ///             this partition. By not producing EFI_BLOCK_IO_PROTOCOL partition, file system
+  /// Bit 1:      If this bit is set, then firmware must not produce an EFI_BLOCK_IO_PROTOCOL device for
+  ///             this partition. By not producing an EFI_BLOCK_IO_PROTOCOL partition, file system
   ///             mappings will not be created for this partition in UEFI.
-  /// Bits 2-47:  Undefined and must be zero. Reserved for expansion by future versions of the UEFI
+  /// Bit 2:      This bit is set aside to let systems with traditional PC-AT BIOS firmware implementations
+  ///             inform certain limited, special-purpose software running on these systems that a GPT
+  ///             partition may be bootable. The UEFI boot manager must ignore this bit when selecting
+  ///             a UEFI-compliant application, e.g., an OS loader.
+  /// Bits 3-47:  Undefined and must be zero. Reserved for expansion by future versions of the UEFI
   ///             specification.
   /// Bits 48-63: Reserved for GUID specific use. The use of these bits will vary depending on the
   ///             PartitionTypeGUID. Only the owner of the PartitionTypeGUID is allowed
index 6fe5752002d85b1cf795b1aba0257c880143b447..1f125d4f31219321699f6df6690e77dd44c7f8fe 100644 (file)
@@ -1,11 +1,11 @@
 /** @file
   Include file that supports UEFI.
 
-  This include file must only contain things defined in the UEFI 2.1 specification.
-  If a code construct is defined in the UEFI 2.1 specification it must be included
+  This include file must contain things defined in the UEFI 2.3 specification.
+  If a code construct is defined in the UEFI 2.3 specification it must be included
   by this include file.
 
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+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
@@ -823,7 +823,11 @@ EFI_STATUS
   @retval EFI_LOAD_ERROR        Image was not loaded because the image format was corrupt or not
                                 understood.
   @retval EFI_DEVICE_ERROR      Image was not loaded because the device returned a read error.
-
+  @retval EFI_ACCESS_DENIED     Image was not loaded because the platform policy prohibits the
+                                image from being loaded. NULL is returned in *ImageHandle.
+  @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a
+                                valid EFI_LOADED_IMAGE_PROTOCOL. However, the current
+                                platform policy specifies that the image should not be started.
 **/
 typedef
 EFI_STATUS