Browse Source

[efi] Synchronise EFI header files

Synchronised to EDK2 SVN revision 11462.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
748d5ed9da

+ 9
- 1
src/include/ipxe/efi/Base.h View File

@@ -496,7 +496,7 @@ typedef CHAR8 *VA_LIST;
496 496
   @return  A pointer to the beginning of a variable argument list.
497 497
 
498 498
 **/
499
-#define VA_START(Marker, Parameter) (Marker = (VA_LIST) & (Parameter) + _INT_SIZE_OF (Parameter))
499
+#define VA_START(Marker, Parameter) (Marker = (VA_LIST) ((UINTN) & (Parameter) + _INT_SIZE_OF (Parameter)))
500 500
 
501 501
 /**
502 502
   Returns an argument of a specified type from a variable argument list and updates
@@ -575,7 +575,15 @@ typedef UINTN  *BASE_LIST;
575 575
   @return  Offset, in bytes, of field.
576 576
 
577 577
 **/
578
+#ifdef __GNUC__
579
+#if __GNUC__ >= 4
580
+#define OFFSET_OF(TYPE, Field) ((UINTN) __builtin_offsetof(TYPE, Field))
581
+#endif
582
+#endif
583
+
584
+#ifndef OFFSET_OF
578 585
 #define OFFSET_OF(TYPE, Field) ((UINTN) &(((TYPE *)0)->Field))
586
+#endif
579 587
 
580 588
 /**
581 589
   Macro that returns a pointer to the data structure that contains a specified field of

+ 2
- 0
src/include/ipxe/efi/IndustryStandard/PeImage.h View File

@@ -494,6 +494,8 @@ typedef struct {
494 494
 #define EFI_IMAGE_REL_BASED_HIGHLOW         3
495 495
 #define EFI_IMAGE_REL_BASED_HIGHADJ         4
496 496
 #define EFI_IMAGE_REL_BASED_MIPS_JMPADDR    5
497
+#define EFI_IMAGE_REL_BASED_ARM_MOV32A      5
498
+#define EFI_IMAGE_REL_BASED_ARM_MOV32T      7
497 499
 #define EFI_IMAGE_REL_BASED_IA64_IMM64      9
498 500
 #define EFI_IMAGE_REL_BASED_MIPS_JMPADDR16  9
499 501
 #define EFI_IMAGE_REL_BASED_DIR64           10

+ 2
- 2
src/include/ipxe/efi/Pi/PiDependency.h View File

@@ -21,13 +21,13 @@ FILE_LICENCE ( BSD3 );
21 21
 
22 22
 ///
23 23
 /// If present, this must be the first and only opcode,
24
-/// EFI_DEP_BEFORE is only used by DXE driver.
24
+/// EFI_DEP_BEFORE may be used by DXE and SMM drivers.
25 25
 ///
26 26
 #define EFI_DEP_BEFORE        0x00
27 27
 
28 28
 ///
29 29
 /// If present, this must be the first and only opcode,
30
-/// EFI_DEP_AFTER is only used by DXE driver.
30
+/// EFI_DEP_AFTER may be used by DXE and SMM drivers.
31 31
 ///
32 32
 #define EFI_DEP_AFTER         0x01
33 33
 

+ 21
- 2
src/include/ipxe/efi/Pi/PiFirmwareVolume.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   The firmware volume related definitions in PI.
3 3
 
4
-  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
4
+  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
5 5
   This program and the accompanying materials
6 6
   are licensed and made available under the terms and conditions of the BSD License
7 7
   which accompanies this distribution.  The full text of the license may be found at
@@ -11,7 +11,7 @@
11 11
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12 12
 
13 13
   @par Revision Reference:
14
-  PI Version 1.0
14
+  PI Version 1.2B
15 15
 
16 16
 **/
17 17
 
@@ -210,5 +210,24 @@ typedef struct {
210 210
   EFI_GUID  Types[1];
211 211
 } EFI_FIRMWARE_VOLUME_EXT_ENTRY_OEM_TYPE;
212 212
 
213
+#define EFI_FV_EXT_TYPE_GUID_TYPE 0x0002
214
+
215
+///
216
+/// This extension header provides a mapping between a GUID and an OEM file type.
217
+///
218
+typedef struct {
219
+  ///
220
+  /// Standard extension entry, with the type EFI_FV_EXT_TYPE_OEM_TYPE.
221
+  ///
222
+  EFI_FIRMWARE_VOLUME_EXT_ENTRY     Hdr;
223
+  ///
224
+  /// Vendor-specific GUID.
225
+  ///
226
+  EFI_GUID                          FormatType;
227
+  ///
228
+  /// An arry of bytes of length Length.
229
+  ///
230
+  UINT8                             Data[1];
231
+} EFI_FIRMWARE_VOLUME_EXT_ENTRY_GUID_TYPE;
213 232
 
214 233
 #endif

+ 13
- 11
src/include/ipxe/efi/Pi/PiStatusCode.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   StatusCode related definitions in PI.
3 3
 
4
-Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.<BR>
4
+Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
5 5
 This program and the accompanying materials are licensed and made available under
6 6
 the terms and conditions of the BSD License that accompanies this distribution.
7 7
 The full text of the license may be found at
@@ -566,9 +566,9 @@ typedef struct {
566 566
 /// IO Bus Class PCI Subclass Progress Code definitions.
567 567
 ///
568 568
 ///@{
569
-#define EFI_IOB_PCI_PC_BUS_ENUM   (EFI_SUBCLASS_SPECIFIC | 0x00000000)
570
-#define EFI_IOB_PCI_PC_RES_ALLOC  (EFI_SUBCLASS_SPECIFIC | 0x00000001)
571
-#define EFI_IOB_PCI_PC_HPC_INIT   (EFI_SUBCLASS_SPECIFIC | 0x00000002)
569
+#define EFI_IOB_PCI_BUS_ENUM   (EFI_SUBCLASS_SPECIFIC | 0x00000000)
570
+#define EFI_IOB_PCI_RES_ALLOC  (EFI_SUBCLASS_SPECIFIC | 0x00000001)
571
+#define EFI_IOB_PCI_HPC_INIT   (EFI_SUBCLASS_SPECIFIC | 0x00000002)
572 572
 ///@}
573 573
 
574 574
 //
@@ -753,13 +753,14 @@ typedef struct {
753 753
 
754 754
 ///
755 755
 /// Software Class PEI Module Subclass Progress Code definitions.
756
+/// Note: EFI_SW_PEI_PC_RECOVERY_BEGIN is different from PI 1.2 Specification.
756 757
 ///
757 758
 ///@{
758
-#define EFI_SW_PEIM_PC_RECOVERY_BEGIN (EFI_SUBCLASS_SPECIFIC | 0x00000000)
759
-#define EFI_SW_PEIM_PC_CAPSULE_LOAD   (EFI_SUBCLASS_SPECIFIC | 0x00000001)
760
-#define EFI_SW_PEIM_PC_CAPSULE_START  (EFI_SUBCLASS_SPECIFIC | 0x00000002)
761
-#define EFI_SW_PEIM_PC_RECOVERY_USER  (EFI_SUBCLASS_SPECIFIC | 0x00000003)
762
-#define EFI_SW_PEIM_PC_RECOVERY_AUTO  (EFI_SUBCLASS_SPECIFIC | 0x00000004)
759
+#define EFI_SW_PEI_PC_RECOVERY_BEGIN  (EFI_SUBCLASS_SPECIFIC | 0x00000000)
760
+#define EFI_SW_PEI_PC_CAPSULE_LOAD    (EFI_SUBCLASS_SPECIFIC | 0x00000001)
761
+#define EFI_SW_PEI_PC_CAPSULE_START   (EFI_SUBCLASS_SPECIFIC | 0x00000002)
762
+#define EFI_SW_PEI_PC_RECOVERY_USER   (EFI_SUBCLASS_SPECIFIC | 0x00000003)
763
+#define EFI_SW_PEI_PC_RECOVERY_AUTO   (EFI_SUBCLASS_SPECIFIC | 0x00000004)
763 764
 #define EFI_SW_PEI_PC_S3_BOOT_SCRIPT  (EFI_SUBCLASS_SPECIFIC | 0x00000005)
764 765
 #define EFI_SW_PEI_PC_OS_WAKE         (EFI_SUBCLASS_SPECIFIC | 0x00000006)
765 766
 ///@}
@@ -986,10 +987,11 @@ typedef struct {
986 987
 
987 988
 ///
988 989
 /// Software Class PEI Module Subclass Error Code definitions.
990
+/// Note: EFI_SW_PEI_EC_INVALID_CAPSULE_DESCRIPTOR is different from PI 1.2 Specification.
989 991
 ///
990 992
 ///@{
991
-#define EFI_SW_PEIM_EC_NO_RECOVERY_CAPSULE         (EFI_SUBCLASS_SPECIFIC | 0x00000000)
992
-#define EFI_SW_PEIM_EC_INVALID_CAPSULE_DESCRIPTOR  (EFI_SUBCLASS_SPECIFIC | 0x00000001)
993
+#define EFI_SW_PEI_EC_NO_RECOVERY_CAPSULE          (EFI_SUBCLASS_SPECIFIC | 0x00000000)
994
+#define EFI_SW_PEI_EC_INVALID_CAPSULE_DESCRIPTOR   (EFI_SUBCLASS_SPECIFIC | 0x00000001)
993 995
 #define EFI_SW_PEI_EC_S3_RESUME_PPI_NOT_FOUND      (EFI_SUBCLASS_SPECIFIC | 0x00000002)
994 996
 #define EFI_SW_PEI_EC_S3_BOOT_SCRIPT_ERROR         (EFI_SUBCLASS_SPECIFIC | 0x00000003)
995 997
 #define EFI_SW_PEI_EC_S3_OS_WAKE_ERROR             (EFI_SUBCLASS_SPECIFIC | 0x00000004)

+ 2
- 0
src/include/ipxe/efi/Protocol/LoadedImage.h View File

@@ -18,6 +18,8 @@
18 18
 #ifndef __LOADED_IMAGE_PROTOCOL_H__
19 19
 #define __LOADED_IMAGE_PROTOCOL_H__
20 20
 
21
+FILE_LICENCE ( BSD3 );
22
+
21 23
 #define EFI_LOADED_IMAGE_PROTOCOL_GUID \
22 24
   { \
23 25
     0x5B1B31A1, 0x9562, 0x11d2, {0x8E, 0x3F, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x3B } \

+ 2
- 2
src/include/ipxe/efi/Protocol/PciIo.h View File

@@ -2,7 +2,7 @@
2 2
   EFI PCI I/O Protocol provides the basic Memory, I/O, PCI configuration,
3 3
   and DMA interfaces that a driver uses to access its PCI controller.
4 4
 
5
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
5
+  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
6 6
   This program and the accompanying materials
7 7
   are licensed and made available under the terms and conditions of the BSD License
8 8
   which accompanies this distribution.  The full text of the license may be found at
@@ -72,7 +72,7 @@ typedef enum {
72 72
 #define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE   0x8000  ///< Clear for PCI controllers that can not genrate a DAC
73 73
 #define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16            0x10000 ///< I/O cycles 0x0100-0x03FF or greater (16 bit decode)
74 74
 #define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16    0x20000 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (16 bit decode)
75
-#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16            0x30000 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (16 bit decode)
75
+#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16            0x40000 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (16 bit decode)
76 76
 
77 77
 #define EFI_PCI_DEVICE_ENABLE                     (EFI_PCI_IO_ATTRIBUTE_IO | EFI_PCI_IO_ATTRIBUTE_MEMORY | EFI_PCI_IO_ATTRIBUTE_BUS_MASTER)
78 78
 #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)

+ 4
- 1
src/include/ipxe/efi/Protocol/PciRootBridgeIo.h View File

@@ -5,7 +5,7 @@
5 5
   and PCI Configuration cycles on a PCI Root Bridge. It also provides services to perform
6 6
   defferent types of bus mastering DMA.
7 7
 
8
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
8
+  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
9 9
   This program and the accompanying materials
10 10
   are licensed and made available under the terms and conditions of the BSD License
11 11
   which accompanies this distribution.  The full text of the license may be found at
@@ -99,6 +99,9 @@ typedef enum {
99 99
 #define EFI_PCI_ATTRIBUTE_MEMORY_CACHED               0x0800
100 100
 #define EFI_PCI_ATTRIBUTE_MEMORY_DISABLE              0x1000
101 101
 #define EFI_PCI_ATTRIBUTE_DUAL_ADDRESS_CYCLE          0x8000
102
+#define EFI_PCI_ATTRIBUTE_ISA_IO_16                   0x10000
103
+#define EFI_PCI_ATTRIBUTE_VGA_PALETTE_IO_16           0x20000
104
+#define EFI_PCI_ATTRIBUTE_VGA_IO_16                   0x40000
102 105
 
103 106
 #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)
104 107
 

+ 3
- 2
src/include/ipxe/efi/Protocol/SimpleTextIn.h View File

@@ -103,8 +103,9 @@ EFI_STATUS
103 103
   Reads the next keystroke from the input device. The WaitForKey Event can
104 104
   be used to test for existence of a keystroke via WaitForEvent () call.
105 105
 
106
-  @param  This Protocol instance pointer.
107
-  @param  Key  Driver may perform diagnostics on reset.
106
+  @param  This  Protocol instance pointer.
107
+  @param  Key   A pointer to a buffer that is filled in with the keystroke
108
+                information for the key that was pressed.
108 109
 
109 110
   @retval EFI_SUCCESS      The keystroke information was returned.
110 111
   @retval EFI_NOT_READY    There was no keystroke data available.

+ 26
- 4
src/include/ipxe/efi/Uefi/UefiBaseType.h View File

@@ -183,16 +183,38 @@ typedef union {
183 183
 
184 184
 //
185 185
 // The EFI memory allocation functions work in units of EFI_PAGEs that are
186
-// 4K. This should in no way be confused with the page size of the processor.
186
+// 4KB. This should in no way be confused with the page size of the processor.
187 187
 // An EFI_PAGE is just the quanta of memory in EFI.
188 188
 //
189
-#define EFI_PAGE_SIZE             0x1000
189
+#define EFI_PAGE_SIZE             SIZE_4KB
190 190
 #define EFI_PAGE_MASK             0xFFF
191 191
 #define EFI_PAGE_SHIFT            12
192 192
 
193
-#define EFI_SIZE_TO_PAGES(a)  (((a) >> EFI_PAGE_SHIFT) + (((a) & EFI_PAGE_MASK) ? 1 : 0))
193
+/**
194
+  Macro that converts a size, in bytes, to a number of EFI_PAGESs.
194 195
 
195
-#define EFI_PAGES_TO_SIZE(a)   ( (a) << EFI_PAGE_SHIFT)
196
+  @param  Size      A size in bytes.  This parameter is assumed to be type UINTN.
197
+                    Passing in a parameter that is larger than UINTN may produce
198
+                    unexpected results.
199
+
200
+  @return  The number of EFI_PAGESs associated with the number of bytes specified
201
+           by Size.
202
+
203
+**/
204
+#define EFI_SIZE_TO_PAGES(Size)  (((Size) >> EFI_PAGE_SHIFT) + (((Size) & EFI_PAGE_MASK) ? 1 : 0))
205
+
206
+/**
207
+  Macro that converts a number of EFI_PAGEs to a size in bytes.
208
+
209
+  @param  Pages     The number of EFI_PAGES.  This parameter is assumed to be
210
+                    type UINTN.  Passing in a parameter that is larger than
211
+                    UINTN may produce unexpected results.
212
+
213
+  @return  The number of bytes associated with the number of EFI_PAGEs specified
214
+           by Pages.
215
+
216
+**/
217
+#define EFI_PAGES_TO_SIZE(Pages)  ((Pages) << EFI_PAGE_SHIFT)
196 218
 
197 219
 ///
198 220
 /// PE32+ Machine type for IA32 UEFI images.

+ 8
- 4
src/include/ipxe/efi/Uefi/UefiGpt.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   EFI Guid Partition Table Format Definition.
3 3
 
4
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
4
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
5 5
 This program and the accompanying materials are licensed and made available under
6 6
 the terms and conditions of the BSD License that accompanies this distribution.
7 7
 The full text of the license may be found at
@@ -116,10 +116,14 @@ typedef struct {
116 116
   ///             potentially stop working if this partition is removed. Unless OS software or firmware
117 117
   ///             recognizes this partition, it should never be removed or modified as the UEFI firmware or
118 118
   ///             platform hardware may become non-functional.
119
-  /// Bit 1:      If this bit is set firmware must not produce an EFI_BLOCK_IO_PROTOCOL device for
120
-  ///             this partition. By not producing EFI_BLOCK_IO_PROTOCOL partition, file system
119
+  /// Bit 1:      If this bit is set, then firmware must not produce an EFI_BLOCK_IO_PROTOCOL device for
120
+  ///             this partition. By not producing an EFI_BLOCK_IO_PROTOCOL partition, file system
121 121
   ///             mappings will not be created for this partition in UEFI.
122
-  /// Bits 2-47:  Undefined and must be zero. Reserved for expansion by future versions of the UEFI
122
+  /// Bit 2:      This bit is set aside to let systems with traditional PC-AT BIOS firmware implementations
123
+  ///             inform certain limited, special-purpose software running on these systems that a GPT
124
+  ///             partition may be bootable. The UEFI boot manager must ignore this bit when selecting
125
+  ///             a UEFI-compliant application, e.g., an OS loader.
126
+  /// Bits 3-47:  Undefined and must be zero. Reserved for expansion by future versions of the UEFI
123 127
   ///             specification.
124 128
   /// Bits 48-63: Reserved for GUID specific use. The use of these bits will vary depending on the
125 129
   ///             PartitionTypeGUID. Only the owner of the PartitionTypeGUID is allowed

+ 8
- 4
src/include/ipxe/efi/Uefi/UefiSpec.h View File

@@ -1,11 +1,11 @@
1 1
 /** @file
2 2
   Include file that supports UEFI.
3 3
 
4
-  This include file must only contain things defined in the UEFI 2.1 specification.
5
-  If a code construct is defined in the UEFI 2.1 specification it must be included
4
+  This include file must contain things defined in the UEFI 2.3 specification.
5
+  If a code construct is defined in the UEFI 2.3 specification it must be included
6 6
   by this include file.
7 7
 
8
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
8
+Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
9 9
 This program and the accompanying materials are licensed and made available under
10 10
 the terms and conditions of the BSD License that accompanies this distribution.
11 11
 The full text of the license may be found at
@@ -823,7 +823,11 @@ EFI_STATUS
823 823
   @retval EFI_LOAD_ERROR        Image was not loaded because the image format was corrupt or not
824 824
                                 understood.
825 825
   @retval EFI_DEVICE_ERROR      Image was not loaded because the device returned a read error.
826
-
826
+  @retval EFI_ACCESS_DENIED     Image was not loaded because the platform policy prohibits the
827
+                                image from being loaded. NULL is returned in *ImageHandle.
828
+  @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a
829
+                                valid EFI_LOADED_IMAGE_PROTOCOL. However, the current
830
+                                platform policy specifies that the image should not be started.
827 831
 **/
828 832
 typedef
829 833
 EFI_STATUS

Loading…
Cancel
Save