Browse Source

[efi] Update to current EDK2 headers

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

+ 49
- 2
src/include/ipxe/efi/Base.h View File

@@ -6,7 +6,7 @@
6 6
   environment. There are a set of base libraries in the Mde Package that can
7 7
   be used to implement base modules.
8 8
 
9
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
9
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
10 10
 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
11 11
 This program and the accompanying materials
12 12
 are licensed and made available under the terms and conditions of the BSD License
@@ -395,6 +395,7 @@ struct _LIST_ENTRY {
395 395
 //  VA_END (VA_LIST Marker) - Clear Marker
396 396
 //  VA_ARG (VA_LIST Marker, var arg size) - Use Marker to get an argument from
397 397
 //    the ... list. You must know the size and pass it in this macro.
398
+//  VA_COPY (VA_LIST Dest, VA_LIST Start) - Initialize Dest as a copy of Start.
398 399
 //
399 400
 //  example:
400 401
 //
@@ -456,6 +457,13 @@ struct _LIST_ENTRY {
456 457
 
457 458
 #define VA_END(Marker)                ((void)0)
458 459
 
460
+// For some ARM RVCT compilers, __va_copy is not defined
461
+#ifndef __va_copy
462
+  #define __va_copy(dest, src) ((void)((dest) = (src)))
463
+#endif
464
+
465
+#define VA_COPY(Dest, Start)          __va_copy (Dest, Start)
466
+
459 467
 #elif defined(__GNUC__) && !defined(NO_BUILTIN_VA_FUNCS)
460 468
 //
461 469
 // Use GCC built-in macros for variable argument lists.
@@ -473,6 +481,8 @@ typedef __builtin_va_list VA_LIST;
473 481
 
474 482
 #define VA_END(Marker)               __builtin_va_end (Marker)
475 483
 
484
+#define VA_COPY(Dest, Start)         __builtin_va_copy (Dest, Start)
485
+
476 486
 #else
477 487
 ///
478 488
 /// Variable used to traverse the list of arguments. This type can vary by
@@ -528,6 +538,19 @@ typedef CHAR8 *VA_LIST;
528 538
 **/
529 539
 #define VA_END(Marker)      (Marker = (VA_LIST) 0)
530 540
 
541
+/**
542
+  Initializes a VA_LIST as a copy of an existing VA_LIST.
543
+
544
+  This macro initializes Dest as a copy of Start, as if the VA_START macro had been applied to Dest
545
+  followed by the same sequence of uses of the VA_ARG macro as had previously been used to reach
546
+  the present state of Start.
547
+
548
+  @param   Dest   VA_LIST used to traverse the list of arguments.
549
+  @param   Start  VA_LIST used to traverse the list of arguments.
550
+
551
+**/
552
+#define VA_COPY(Dest, Start)  ((void)((Dest) = (Start)))
553
+
531 554
 #endif
532 555
 
533 556
 ///
@@ -678,10 +701,22 @@ typedef UINTN  *BASE_LIST;
678 701
   @return  Minimum of two operands.
679 702
 
680 703
 **/
681
-
682 704
 #define MIN(a, b)                       \
683 705
   (((a) < (b)) ? (a) : (b))
684 706
 
707
+/**
708
+  Return the absolute value of a signed operand.
709
+
710
+  This macro returns the absolute value of the signed operand specified by a.
711
+
712
+  @param   a        The signed operand.
713
+
714
+  @return  The absolute value of the signed operand.
715
+
716
+**/
717
+#define ABS(a)                          \
718
+  (((a) < 0) ? (-(a)) : (a))
719
+
685 720
 //
686 721
 // Status codes common to all execution phases
687 722
 //
@@ -884,6 +919,12 @@ typedef UINTN RETURN_STATUS;
884 919
 ///
885 920
 #define RETURN_INVALID_LANGUAGE      ENCODE_ERROR (32)
886 921
 
922
+///
923
+/// The security status of the data is unknown or compromised
924
+/// and the data must be updated or replaced to restore a valid
925
+/// security status.
926
+///
927
+#define RETURN_COMPROMISED_DATA      ENCODE_ERROR (33)
887 928
 
888 929
 ///
889 930
 /// The string contained one or more characters that
@@ -908,6 +949,12 @@ typedef UINTN RETURN_STATUS;
908 949
 ///
909 950
 #define RETURN_WARN_BUFFER_TOO_SMALL ENCODE_WARNING (4)
910 951
 
952
+///
953
+/// The data has not been updated within the timeframe set by
954
+/// local policy for this type of data.
955
+///
956
+#define RETURN_WARN_STALE_DATA       ENCODE_WARNING (5)
957
+
911 958
 /**
912 959
   Returns a 16-bit signature built from 2 ASCII characters.
913 960
 

+ 13
- 9
src/include/ipxe/efi/Ia32/ProcessorBind.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   Processor or Compiler specific defines and types for IA-32 architecture.
3 3
 
4
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
4
+Copyright (c) 2006 - 2012, 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
@@ -149,7 +149,7 @@ FILE_LICENCE ( BSD3 );
149 149
   ///
150 150
   /// 1-byte signed value.
151 151
   ///
152
-  typedef char                INT8;
152
+  typedef signed char         INT8;
153 153
 #else
154 154
   ///
155 155
   /// 8-byte unsigned value.
@@ -196,7 +196,7 @@ FILE_LICENCE ( BSD3 );
196 196
   ///
197 197
   /// 1-byte signed value
198 198
   ///
199
-  typedef char                INT8;
199
+  typedef signed char         INT8;
200 200
 #endif
201 201
 
202 202
 ///
@@ -247,13 +247,17 @@ typedef INT32   INTN;
247 247
   /// Microsoft* compiler specific method for EFIAPI calling convention.
248 248
   ///
249 249
   #define EFIAPI __cdecl
250
+#elif defined(__GNUC__)
251
+  ///
252
+  /// GCC specific method for EFIAPI calling convention.
253
+  ///
254
+  #define EFIAPI __attribute__((cdecl))
250 255
 #else
251
-  #if defined(__GNUC__)
252
-    ///
253
-    /// GCC specific method for EFIAPI calling convention.
254
-    ///
255
-    #define EFIAPI __attribute__((cdecl))
256
-  #endif
256
+  ///
257
+  /// The default for a non Microsoft* or GCC compiler is to assume the EFI ABI
258
+  /// is the standard.
259
+  ///
260
+  #define EFIAPI
257 261
 #endif
258 262
 
259 263
 #if defined(__GNUC__)

+ 7218
- 0
src/include/ipxe/efi/Library/BaseLib.h
File diff suppressed because it is too large
View File


+ 8
- 5
src/include/ipxe/efi/Pi/PiDxeCis.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   Include file matches things in PI.
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
@@ -11,7 +11,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
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.2
15 15
 
16 16
 **/
17 17
 
@@ -371,7 +371,8 @@ EFI_STATUS
371 371
                                 BaseAddress and Length cannot be modified.
372 372
   @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to modify the attributes of
373 373
                                 the memory resource range.
374
-
374
+  @retval EFI_NOT_AVAILABLE_YET The attributes cannot be set because CPU architectural protocol is
375
+                                not available yet.
375 376
 **/
376 377
 typedef
377 378
 EFI_STATUS
@@ -656,8 +657,10 @@ EFI_STATUS
656 657
 //
657 658
 // DXE Services Table
658 659
 //
659
-#define DXE_SERVICES_SIGNATURE  0x565245535f455844ULL
660
-#define DXE_SERVICES_REVISION   ((1<<16) | (00))
660
+#define DXE_SERVICES_SIGNATURE            0x565245535f455844ULL
661
+#define DXE_SPECIFICATION_MAJOR_REVISION  1
662
+#define DXE_SPECIFICATION_MINOR_REVISION  20
663
+#define DXE_SERVICES_REVISION             ((DXE_SPECIFICATION_MAJOR_REVISION<<16) | (DXE_SPECIFICATION_MINOR_REVISION))
661 664
 
662 665
 typedef struct {
663 666
   ///

+ 19
- 5
src/include/ipxe/efi/Pi/PiFirmwareFile.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   The firmware file related definitions in PI.
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
@@ -36,8 +36,7 @@ typedef union {
36 36
     ///
37 37
     /// If the FFS_ATTRIB_CHECKSUM (see definition below) bit of the Attributes
38 38
     /// field is set to one, the IntegrityCheck.Checksum.File field is an 8-bit
39
-    /// checksum of the entire file The State field and the file tail are assumed to be zero
40
-    /// and the checksum is calculated such that the entire file sums to zero.
39
+    /// checksum of the file data.
41 40
     /// If the FFS_ATTRIB_CHECKSUM bit of the Attributes field is cleared to zero,
42 41
     /// the IntegrityCheck.Checksum.File field must be initialized with a value of
43 42
     /// 0xAA. The IntegrityCheck.Checksum.File field is valid any time the
@@ -176,9 +175,18 @@ typedef struct {
176 175
   /// If FFS_ATTRIB_LARGE_FILE is set in Attributes, then ExtendedSize exists and Size must be set to zero.
177 176
   /// If FFS_ATTRIB_LARGE_FILE is not set then EFI_FFS_FILE_HEADER is used.
178 177
   ///
179
-  EFI_FFS_FILE_STATE        ExtendedSize;
178
+  UINT32                    ExtendedSize;
180 179
 } EFI_FFS_FILE_HEADER2;
181 180
 
181
+#define IS_FFS_FILE2(FfsFileHeaderPtr) \
182
+    (((((EFI_FFS_FILE_HEADER *) (UINTN) FfsFileHeaderPtr)->Attributes) & FFS_ATTRIB_LARGE_FILE) == FFS_ATTRIB_LARGE_FILE)
183
+
184
+#define FFS_FILE_SIZE(FfsFileHeaderPtr) \
185
+    ((UINT32) (*((UINT32 *) ((EFI_FFS_FILE_HEADER *) (UINTN) FfsFileHeaderPtr)->Size) & 0x00ffffff))
186
+
187
+#define FFS_FILE2_SIZE(FfsFileHeaderPtr) \
188
+    (((EFI_FFS_FILE_HEADER2 *) (UINTN) FfsFileHeaderPtr)->ExtendedSize)
189
+
182 190
 typedef UINT8 EFI_SECTION_TYPE;
183 191
 
184 192
 ///
@@ -473,8 +481,14 @@ typedef struct {
473 481
   CHAR16                        VersionString[1];
474 482
 } EFI_VERSION_SECTION2;
475 483
 
484
+#define IS_SECTION2(SectionHeaderPtr) \
485
+    ((UINT32) (*((UINT32 *) ((EFI_COMMON_SECTION_HEADER *) (UINTN) SectionHeaderPtr)->Size) & 0x00ffffff) == 0x00ffffff)
486
+
476 487
 #define SECTION_SIZE(SectionHeaderPtr) \
477
-    ((UINT32) (*((UINT32 *) ((EFI_COMMON_SECTION_HEADER *) SectionHeaderPtr)->Size) & 0x00ffffff))
488
+    ((UINT32) (*((UINT32 *) ((EFI_COMMON_SECTION_HEADER *) (UINTN) SectionHeaderPtr)->Size) & 0x00ffffff))
489
+
490
+#define SECTION2_SIZE(SectionHeaderPtr) \
491
+    (((EFI_COMMON_SECTION_HEADER2 *) (UINTN) SectionHeaderPtr)->ExtendedSize)
478 492
 
479 493
 #pragma pack()
480 494
 

+ 8
- 5
src/include/ipxe/efi/Pi/PiFirmwareVolume.h View File

@@ -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.2B
14
+  PI Version 1.2C
15 15
 
16 16
 **/
17 17
 
@@ -75,7 +75,7 @@ typedef UINT32  EFI_FVB_ATTRIBUTES_2;
75 75
 #define EFI_FVB2_ALIGNMENT_64K      0x00100000
76 76
 #define EFI_FVB2_ALIGNMENT_128K     0x00110000
77 77
 #define EFI_FVB2_ALIGNMENT_256K     0x00120000
78
-#define EFI_FVB2_ALIGNMNET_512K     0x00130000
78
+#define EFI_FVB2_ALIGNMENT_512K     0x00130000
79 79
 #define EFI_FVB2_ALIGNMENT_1M       0x00140000
80 80
 #define EFI_FVB2_ALIGNMENT_2M       0x00150000
81 81
 #define EFI_FVB2_ALIGNMENT_4M       0x00160000
@@ -207,13 +207,15 @@ typedef struct {
207 207
   ///
208 208
   /// An array of GUIDs, each GUID representing an OEM file type.
209 209
   ///
210
-  EFI_GUID  Types[1];
210
+  /// EFI_GUID  Types[1];
211
+  ///
211 212
 } EFI_FIRMWARE_VOLUME_EXT_ENTRY_OEM_TYPE;
212 213
 
213 214
 #define EFI_FV_EXT_TYPE_GUID_TYPE 0x0002
214 215
 
215 216
 ///
216
-/// This extension header provides a mapping between a GUID and an OEM file type.
217
+/// This extension header EFI_FIRMWARE_VOLUME_EXT_ENTRY_GUID_TYPE provides a vendor specific
218
+/// GUID FormatType type which includes a length and a successive series of data bytes.
217 219
 ///
218 220
 typedef struct {
219 221
   ///
@@ -227,7 +229,8 @@ typedef struct {
227 229
   ///
228 230
   /// An arry of bytes of length Length.
229 231
   ///
230
-  UINT8                             Data[1];
232
+  /// UINT8                             Data[1];
233
+  ///
231 234
 } EFI_FIRMWARE_VOLUME_EXT_ENTRY_GUID_TYPE;
232 235
 
233 236
 #endif

+ 12
- 9
src/include/ipxe/efi/Pi/PiHob.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   HOB related definitions in PI.
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
@@ -251,21 +251,21 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
251 251
 //
252 252
 // These types can be ORed together as needed.
253 253
 //
254
-// The first three enumerations describe settings
254
+// The following attributes are used to describe settings
255 255
 //
256
-#define EFI_RESOURCE_ATTRIBUTE_PRESENT              0x00000001
257
-#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED          0x00000002
258
-#define EFI_RESOURCE_ATTRIBUTE_TESTED               0x00000004
256
+#define EFI_RESOURCE_ATTRIBUTE_PRESENT                  0x00000001
257
+#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED              0x00000002
258
+#define EFI_RESOURCE_ATTRIBUTE_TESTED                   0x00000004
259
+#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED           0x00000080
260
+#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED          0x00000100
261
+#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED      0x00000200
259 262
 //
260
-// The rest of the settings describe capabilities
263
+// The rest of the attributes are used to describe capabilities
261 264
 //
262 265
 #define EFI_RESOURCE_ATTRIBUTE_SINGLE_BIT_ECC           0x00000008
263 266
 #define EFI_RESOURCE_ATTRIBUTE_MULTIPLE_BIT_ECC         0x00000010
264 267
 #define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_1           0x00000020
265 268
 #define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_2           0x00000040
266
-#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED           0x00000080
267
-#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED          0x00000100
268
-#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED      0x00000200
269 269
 #define EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE              0x00000400
270 270
 #define EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE        0x00000800
271 271
 #define EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE  0x00001000
@@ -274,6 +274,9 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
274 274
 #define EFI_RESOURCE_ATTRIBUTE_32_BIT_IO                0x00008000
275 275
 #define EFI_RESOURCE_ATTRIBUTE_64_BIT_IO                0x00010000
276 276
 #define EFI_RESOURCE_ATTRIBUTE_UNCACHED_EXPORTED        0x00020000
277
+#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTABLE         0x00100000
278
+#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE        0x00200000
279
+#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE    0x00400000
277 280
 
278 281
 ///
279 282
 /// Describes the resource properties of all fixed,

+ 72
- 6
src/include/ipxe/efi/Pi/PiStatusCode.h View File

@@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22 22
 FILE_LICENCE ( BSD3 );
23 23
 
24 24
 //
25
-// Required for IA32 and IPF defines for CPU exception types
25
+// Required for IA32, X64, IPF, ARM and EBC defines for CPU exception types
26 26
 //
27 27
 #include <ipxe/efi/Protocol/DebugSupport.h>
28 28
 
@@ -713,6 +713,9 @@ typedef struct {
713 713
 #define EFI_SOFTWARE_EFI_BOOT_SERVICE     (EFI_SOFTWARE | 0x00100000)
714 714
 #define EFI_SOFTWARE_EFI_RUNTIME_SERVICE  (EFI_SOFTWARE | 0x00110000)
715 715
 #define EFI_SOFTWARE_EFI_DXE_SERVICE      (EFI_SOFTWARE | 0x00120000)
716
+#define EFI_SOFTWARE_X64_EXCEPTION        (EFI_SOFTWARE | 0x00130000)
717
+#define EFI_SOFTWARE_ARM_EXCEPTION        (EFI_SOFTWARE | 0x00140000)
718
+
716 719
 ///@}
717 720
 
718 721
 ///
@@ -753,7 +756,6 @@ typedef struct {
753 756
 
754 757
 ///
755 758
 /// Software Class PEI Module Subclass Progress Code definitions.
756
-/// Note: EFI_SW_PEI_PC_RECOVERY_BEGIN is different from PI 1.2 Specification.
757 759
 ///
758 760
 ///@{
759 761
 #define EFI_SW_PEI_PC_RECOVERY_BEGIN  (EFI_SUBCLASS_SPECIFIC | 0x00000000)
@@ -808,6 +810,14 @@ typedef struct {
808 810
 #define EFI_SW_RT_PC_RETURN_TO_LAST   (EFI_SUBCLASS_SPECIFIC | 0x00000002)
809 811
 ///@}
810 812
 
813
+//
814
+// Software Class X64 Exception Subclass Progress Code definitions.
815
+//
816
+
817
+//
818
+// Software Class ARM Exception Subclass Progress Code definitions.
819
+//
820
+
811 821
 //
812 822
 // Software Class EBC Exception Subclass Progress Code definitions.
813 823
 //
@@ -987,7 +997,6 @@ typedef struct {
987 997
 
988 998
 ///
989 999
 /// Software Class PEI Module Subclass Error Code definitions.
990
-/// Note: EFI_SW_PEI_EC_INVALID_CAPSULE_DESCRIPTOR is different from PI 1.2 Specification.
991 1000
 ///
992 1001
 ///@{
993 1002
 #define EFI_SW_PEI_EC_NO_RECOVERY_CAPSULE          (EFI_SUBCLASS_SPECIFIC | 0x00000000)
@@ -1123,8 +1132,65 @@ typedef struct {
1123 1132
 // Software Class EFI Runtime Service Subclass Error Code definitions.
1124 1133
 //
1125 1134
 
1126
-//
1127
-// Software Class EFI DXE Service Subclass Error Code definitions.
1128
-//
1135
+///
1136
+/// Software Class EFI DXE Service Subclass Error Code definitions.
1137
+///
1138
+///@{
1139
+#define EFI_SW_DXE_BS_PC_BEGIN_CONNECTING_DRIVERS   (EFI_SUBCLASS_SPECIFIC | 0x00000005)
1140
+#define EFI_SW_DXE_BS_PC_VERIFYING_PASSWORD         (EFI_SUBCLASS_SPECIFIC | 0x00000006)
1141
+///@}
1142
+
1143
+///
1144
+/// Software Class DXE RT Driver Subclass Progress Code definitions.
1145
+///
1146
+///@{
1147
+#define EFI_SW_DXE_RT_PC_S0                         (EFI_SUBCLASS_SPECIFIC | 0x00000000)
1148
+#define EFI_SW_DXE_RT_PC_S1                         (EFI_SUBCLASS_SPECIFIC | 0x00000001)
1149
+#define EFI_SW_DXE_RT_PC_S2                         (EFI_SUBCLASS_SPECIFIC | 0x00000002)
1150
+#define EFI_SW_DXE_RT_PC_S3                         (EFI_SUBCLASS_SPECIFIC | 0x00000003)
1151
+#define EFI_SW_DXE_RT_PC_S4                         (EFI_SUBCLASS_SPECIFIC | 0x00000004)
1152
+#define EFI_SW_DXE_RT_PC_S5                         (EFI_SUBCLASS_SPECIFIC | 0x00000005)
1153
+///@}
1154
+
1155
+///
1156
+/// Software Class X64 Exception Subclass Error Code definitions.
1157
+/// These exceptions are derived from the debug protocol
1158
+/// definitions in the EFI specification.
1159
+///
1160
+///@{
1161
+#define EFI_SW_EC_X64_DIVIDE_ERROR                   EXCEPT_X64_DIVIDE_ERROR
1162
+#define EFI_SW_EC_X64_DEBUG                          EXCEPT_X64_DEBUG
1163
+#define EFI_SW_EC_X64_NMI                            EXCEPT_X64_NMI
1164
+#define EFI_SW_EC_X64_BREAKPOINT                     EXCEPT_X64_BREAKPOINT
1165
+#define EFI_SW_EC_X64_OVERFLOW                       EXCEPT_X64_OVERFLOW
1166
+#define EFI_SW_EC_X64_BOUND                          EXCEPT_X64_BOUND
1167
+#define EFI_SW_EC_X64_INVALID_OPCODE                 EXCEPT_X64_INVALID_OPCODE
1168
+#define EFI_SW_EC_X64_DOUBLE_FAULT                   EXCEPT_X64_DOUBLE_FAULT
1169
+#define EFI_SW_EC_X64_INVALID_TSS                    EXCEPT_X64_INVALID_TSS
1170
+#define EFI_SW_EC_X64_SEG_NOT_PRESENT                EXCEPT_X64_SEG_NOT_PRESENT
1171
+#define EFI_SW_EC_X64_STACK_FAULT                    EXCEPT_X64_STACK_FAULT
1172
+#define EFI_SW_EC_X64_GP_FAULT                       EXCEPT_X64_GP_FAULT
1173
+#define EFI_SW_EC_X64_PAGE_FAULT                     EXCEPT_X64_PAGE_FAULT
1174
+#define EFI_SW_EC_X64_FP_ERROR                       EXCEPT_X64_FP_ERROR
1175
+#define EFI_SW_EC_X64_ALIGNMENT_CHECK                EXCEPT_X64_ALIGNMENT_CHECK
1176
+#define EFI_SW_EC_X64_MACHINE_CHECK                  EXCEPT_X64_MACHINE_CHECK
1177
+#define EFI_SW_EC_X64_SIMD                           EXCEPT_X64_SIMD
1178
+///@}
1179
+
1180
+///
1181
+/// Software Class ARM Exception Subclass Error Code definitions.
1182
+/// These exceptions are derived from the debug protocol
1183
+/// definitions in the EFI specification.
1184
+///
1185
+///@{
1186
+#define EFI_SW_EC_ARM_RESET                          EXCEPT_ARM_RESET
1187
+#define EFI_SW_EC_ARM_UNDEFINED_INSTRUCTION          EXCEPT_ARM_UNDEFINED_INSTRUCTION
1188
+#define EFI_SW_EC_ARM_SOFTWARE_INTERRUPT             EXCEPT_ARM_SOFTWARE_INTERRUPT
1189
+#define EFI_SW_EC_ARM_PREFETCH_ABORT                 EXCEPT_ARM_PREFETCH_ABORT
1190
+#define EFI_SW_EC_ARM_DATA_ABORT                     EXCEPT_ARM_DATA_ABORT
1191
+#define EFI_SW_EC_ARM_RESERVED                       EXCEPT_ARM_RESERVED
1192
+#define EFI_SW_EC_ARM_IRQ                            EXCEPT_ARM_IRQ
1193
+#define EFI_SW_EC_ARM_FIQ                            EXCEPT_ARM_FIQ
1194
+///@}
1129 1195
 
1130 1196
 #endif

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

@@ -3,7 +3,7 @@
3 3
   This protocol is used to retrieve user readable names of drivers
4 4
   and controllers managed by UEFI Drivers.
5 5
 
6
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
6
+  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
7 7
   This program and the accompanying materials
8 8
   are licensed and made available under the terms and conditions of the BSD License
9 9
   which accompanies this distribution.  The full text of the license may be found at
@@ -121,8 +121,7 @@ EFI_STATUS
121 121
                                 driver specified by This was
122 122
                                 returned in DriverName.
123 123
 
124
-  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid
125
-                                EFI_HANDLE.
124
+  @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
126 125
 
127 126
   @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it
128 127
                                 is not a valid EFI_HANDLE.

+ 3
- 1
src/include/ipxe/efi/Protocol/Cpu.h View File

@@ -3,7 +3,7 @@
3 3
 
4 4
   This code abstracts the DXE core from processor implementation details.
5 5
 
6
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
6
+  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
7 7
   This program and the accompanying materials
8 8
   are licensed and made available under the terms and conditions of the BSD License
9 9
   which accompanies this distribution.  The full text of the license may be found at
@@ -246,6 +246,8 @@ EFI_STATUS
246 246
   @retval EFI_ACCESS_DENIED     The attributes for the memory resource range specified by
247 247
                                 BaseAddress and Length cannot be modified.
248 248
   @retval EFI_INVALID_PARAMETER Length is zero.
249
+                                Attributes specified an illegal combination of attributes that
250
+                                cannot be set together.
249 251
   @retval EFI_OUT_OF_RESOURCES  There are not enough system resources to modify the attributes of
250 252
                                 the memory resource range.
251 253
   @retval EFI_UNSUPPORTED       The processor does not support one or more bytes of the memory

+ 160
- 75
src/include/ipxe/efi/Protocol/DevicePath.h View File

@@ -5,7 +5,7 @@
5 5
   from a software point of view. The path must persist from boot to boot, so
6 6
   it can not contain things like PCI bus numbers that change from boot to boot.
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
@@ -348,6 +348,26 @@ typedef struct {
348 348
   UINT64                          Lun;
349 349
 } FIBRECHANNEL_DEVICE_PATH;
350 350
 
351
+///
352
+/// Fibre Channel Ex SubType.
353
+///
354
+#define MSG_FIBRECHANNELEX_DP     0x15
355
+typedef struct {
356
+  EFI_DEVICE_PATH_PROTOCOL        Header;
357
+  ///
358
+  /// Reserved for the future.
359
+  ///
360
+  UINT32                          Reserved;
361
+  ///
362
+  /// 8 byte array containing Fibre Channel End Device Port Name.
363
+  ///
364
+  UINT8                           WWN[8];
365
+  ///
366
+  /// 8 byte array containing Fibre Channel Logical Unit Number.
367
+  ///
368
+  UINT8                           Lun[8];
369
+} FIBRECHANNELEX_DEVICE_PATH;
370
+
351 371
 ///
352 372
 /// 1394 Device Path SubType
353 373
 ///
@@ -543,6 +563,14 @@ typedef struct {
543 563
   /// 0x01 - The Source IP Address is statically bound.
544 564
   ///
545 565
   BOOLEAN                         StaticIpAddress;
566
+  ///
567
+  /// The gateway IP address
568
+  ///
569
+  EFI_IPv4_ADDRESS                GatewayIpAddress;
570
+  ///
571
+  /// The subnet mask
572
+  ///
573
+  EFI_IPv4_ADDRESS                SubnetMask;
546 574
 } IPv4_DEVICE_PATH;
547 575
 
548 576
 ///
@@ -572,10 +600,21 @@ typedef struct {
572 600
   ///
573 601
   UINT16                          Protocol;
574 602
   ///
575
-  /// 0x00 - The Source IP Address was assigned though DHCP.
576
-  /// 0x01 - The Source IP Address is statically bound.
603
+  /// 0x00 - The Local IP Address was manually configured.
604
+  /// 0x01 - The Local IP Address is assigned through IPv6
605
+  /// stateless auto-configuration.
606
+  /// 0x02 - The Local IP Address is assigned through IPv6
607
+  /// stateful configuration.
577 608
   ///
578
-  BOOLEAN                         StaticIpAddress;
609
+  UINT8                           IpAddressOrigin;
610
+  ///
611
+  /// The prefix length
612
+  ///
613
+  UINT8                           PrefixLength;
614
+  ///
615
+  /// The gateway IP address
616
+  ///
617
+  EFI_IPv6_ADDRESS                GatewayIpAddress;
579 618
 } IPv6_DEVICE_PATH;
580 619
 
581 620
 ///
@@ -692,9 +731,9 @@ typedef struct {
692 731
 #define UART_FLOW_CONTROL_HARDWARE         0x00000001
693 732
 #define UART_FLOW_CONTROL_XON_XOFF         0x00000010
694 733
 
695
-#define DEVICE_PATH_MESSAGING_SAS                 EFI_SAS_DEVICE_PATH_GUID
734
+#define DEVICE_PATH_MESSAGING_SAS          EFI_SAS_DEVICE_PATH_GUID
696 735
 ///
697
-/// Serial Attached SCSI (SAS) devices.
736
+/// Serial Attached SCSI (SAS) Device Path.
698 737
 ///
699 738
 typedef struct {
700 739
   EFI_DEVICE_PATH_PROTOCOL        Header;
@@ -724,6 +763,30 @@ typedef struct {
724 763
   UINT16                          RelativeTargetPort;
725 764
 } SAS_DEVICE_PATH;
726 765
 
766
+///
767
+/// Serial Attached SCSI (SAS) Ex Device Path SubType
768
+///
769
+#define MSG_SASEX_DP              0x16
770
+typedef struct {
771
+  EFI_DEVICE_PATH_PROTOCOL        Header;
772
+  ///
773
+  /// 8-byte array of the SAS Address for Serial Attached SCSI Target Port.
774
+  ///
775
+  UINT8                           SasAddress[8];
776
+  ///
777
+  /// 8-byte array of the SAS Logical Unit Number.
778
+  ///
779
+  UINT8                           Lun[8];
780
+  ///
781
+  /// More Information about the device and its interconnect.
782
+  ///
783
+  UINT16                          DeviceTopology;
784
+  ///
785
+  /// Relative Target Port (RTP).
786
+  ///
787
+  UINT16                          RelativeTargetPort;
788
+} SASEX_DEVICE_PATH;
789
+
727 790
 ///
728 791
 /// iSCSI Device Path SubType
729 792
 ///
@@ -897,7 +960,7 @@ typedef struct {
897 960
 } MEDIA_PROTOCOL_DEVICE_PATH;
898 961
 
899 962
 ///
900
-/// PIWG Firmware Volume Device Path SubType.
963
+/// PIWG Firmware File SubType.
901 964
 ///
902 965
 #define MEDIA_PIWG_FW_FILE_DP     0x06
903 966
 
@@ -967,7 +1030,7 @@ typedef struct {
967 1030
   ///
968 1031
   UINT16                          StatusFlag;
969 1032
   ///
970
-  /// ASCIIZ string that describes the boot device to a user.
1033
+  /// Null-terminated ASCII string that describes the boot device to a user.
971 1034
   ///
972 1035
   CHAR8                           String[1];
973 1036
 } BBS_BBS_DEVICE_PATH;
@@ -989,78 +1052,100 @@ typedef struct {
989 1052
 /// Union of all possible Device Paths and pointers to Device Paths.
990 1053
 ///
991 1054
 typedef union {
992
-  EFI_DEVICE_PATH_PROTOCOL             DevPath;
993
-  PCI_DEVICE_PATH                      Pci;
994
-  PCCARD_DEVICE_PATH                   PcCard;
995
-  MEMMAP_DEVICE_PATH                   MemMap;
996
-  VENDOR_DEVICE_PATH                   Vendor;
997
-
998
-  CONTROLLER_DEVICE_PATH               Controller;
999
-  ACPI_HID_DEVICE_PATH                 Acpi;
1000
-
1001
-  ATAPI_DEVICE_PATH                    Atapi;
1002
-  SCSI_DEVICE_PATH                     Scsi;
1003
-  ISCSI_DEVICE_PATH                    Iscsi;
1004
-  FIBRECHANNEL_DEVICE_PATH             FibreChannel;
1005
-
1006
-  F1394_DEVICE_PATH                    F1394;
1007
-  USB_DEVICE_PATH                      Usb;
1008
-  SATA_DEVICE_PATH                     Sata;
1009
-  USB_CLASS_DEVICE_PATH                UsbClass;
1010
-  I2O_DEVICE_PATH                      I2O;
1011
-  MAC_ADDR_DEVICE_PATH                 MacAddr;
1012
-  IPv4_DEVICE_PATH                     Ipv4;
1013
-  IPv6_DEVICE_PATH                     Ipv6;
1014
-  INFINIBAND_DEVICE_PATH               InfiniBand;
1015
-  UART_DEVICE_PATH                     Uart;
1016
-
1017
-  HARDDRIVE_DEVICE_PATH                HardDrive;
1018
-  CDROM_DEVICE_PATH                    CD;
1019
-
1020
-  FILEPATH_DEVICE_PATH                 FilePath;
1021
-  MEDIA_PROTOCOL_DEVICE_PATH           MediaProtocol;
1022
-  MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH Offset;
1023
-
1024
-  BBS_BBS_DEVICE_PATH                  Bbs;
1055
+  EFI_DEVICE_PATH_PROTOCOL                   DevPath;
1056
+  PCI_DEVICE_PATH                            Pci;
1057
+  PCCARD_DEVICE_PATH                         PcCard;
1058
+  MEMMAP_DEVICE_PATH                         MemMap;
1059
+  VENDOR_DEVICE_PATH                         Vendor;
1060
+
1061
+  CONTROLLER_DEVICE_PATH                     Controller;
1062
+  ACPI_HID_DEVICE_PATH                       Acpi;
1063
+  ACPI_EXTENDED_HID_DEVICE_PATH              ExtendedAcpi;
1064
+  ACPI_ADR_DEVICE_PATH                       AcpiAdr;
1065
+
1066
+  ATAPI_DEVICE_PATH                          Atapi;
1067
+  SCSI_DEVICE_PATH                           Scsi;
1068
+  ISCSI_DEVICE_PATH                          Iscsi;
1069
+  FIBRECHANNEL_DEVICE_PATH                   FibreChannel;
1070
+  FIBRECHANNELEX_DEVICE_PATH                 FibreChannelEx;
1071
+
1072
+  F1394_DEVICE_PATH                          F1394;
1073
+  USB_DEVICE_PATH                            Usb;
1074
+  SATA_DEVICE_PATH                           Sata;
1075
+  USB_CLASS_DEVICE_PATH                      UsbClass;
1076
+  USB_WWID_DEVICE_PATH                       UsbWwid;
1077
+  DEVICE_LOGICAL_UNIT_DEVICE_PATH            LogicUnit;
1078
+  I2O_DEVICE_PATH                            I2O;
1079
+  MAC_ADDR_DEVICE_PATH                       MacAddr;
1080
+  IPv4_DEVICE_PATH                           Ipv4;
1081
+  IPv6_DEVICE_PATH                           Ipv6;
1082
+  VLAN_DEVICE_PATH                           Vlan;
1083
+  INFINIBAND_DEVICE_PATH                     InfiniBand;
1084
+  UART_DEVICE_PATH                           Uart;
1085
+  UART_FLOW_CONTROL_DEVICE_PATH              UartFlowControl;
1086
+  SAS_DEVICE_PATH                            Sas;
1087
+  SASEX_DEVICE_PATH                          SasEx;
1088
+  HARDDRIVE_DEVICE_PATH                      HardDrive;
1089
+  CDROM_DEVICE_PATH                          CD;
1090
+
1091
+  FILEPATH_DEVICE_PATH                       FilePath;
1092
+  MEDIA_PROTOCOL_DEVICE_PATH                 MediaProtocol;
1093
+
1094
+  MEDIA_FW_VOL_DEVICE_PATH                   FirmwareVolume;
1095
+  MEDIA_FW_VOL_FILEPATH_DEVICE_PATH          FirmwareFile;
1096
+  MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH    Offset;
1097
+
1098
+  BBS_BBS_DEVICE_PATH                        Bbs;
1025 1099
 } EFI_DEV_PATH;
1026 1100
 
1027 1101
 
1028 1102
 
1029 1103
 typedef union {
1030
-  EFI_DEVICE_PATH_PROTOCOL             *DevPath;
1031
-  PCI_DEVICE_PATH                      *Pci;
1032
-  PCCARD_DEVICE_PATH                   *PcCard;
1033
-  MEMMAP_DEVICE_PATH                   *MemMap;
1034
-  VENDOR_DEVICE_PATH                   *Vendor;
1035
-
1036
-  CONTROLLER_DEVICE_PATH               *Controller;
1037
-  ACPI_HID_DEVICE_PATH                 *Acpi;
1038
-  ACPI_EXTENDED_HID_DEVICE_PATH        *ExtendedAcpi;
1039
-
1040
-  ATAPI_DEVICE_PATH                    *Atapi;
1041
-  SCSI_DEVICE_PATH                     *Scsi;
1042
-  FIBRECHANNEL_DEVICE_PATH             *FibreChannel;
1043
-
1044
-  F1394_DEVICE_PATH                    *F1394;
1045
-  USB_DEVICE_PATH                      *Usb;
1046
-  SATA_DEVICE_PATH                     *Sata;
1047
-  USB_CLASS_DEVICE_PATH                *UsbClass;
1048
-  I2O_DEVICE_PATH                      *I2O;
1049
-  MAC_ADDR_DEVICE_PATH                 *MacAddr;
1050
-  IPv4_DEVICE_PATH                     *Ipv4;
1051
-  IPv6_DEVICE_PATH                     *Ipv6;
1052
-  INFINIBAND_DEVICE_PATH               *InfiniBand;
1053
-  UART_DEVICE_PATH                     *Uart;
1054
-
1055
-  HARDDRIVE_DEVICE_PATH                *HardDrive;
1056
-  CDROM_DEVICE_PATH                    *CD;
1057
-
1058
-  FILEPATH_DEVICE_PATH                 *FilePath;
1059
-  MEDIA_PROTOCOL_DEVICE_PATH           *MediaProtocol;
1060
-  MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH *Offset;
1061
-
1062
-  BBS_BBS_DEVICE_PATH                  *Bbs;
1063
-  UINT8                                *Raw;
1104
+  EFI_DEVICE_PATH_PROTOCOL                   *DevPath;
1105
+  PCI_DEVICE_PATH                            *Pci;
1106
+  PCCARD_DEVICE_PATH                         *PcCard;
1107
+  MEMMAP_DEVICE_PATH                         *MemMap;
1108
+  VENDOR_DEVICE_PATH                         *Vendor;
1109
+
1110
+  CONTROLLER_DEVICE_PATH                     *Controller;
1111
+  ACPI_HID_DEVICE_PATH                       *Acpi;
1112
+  ACPI_EXTENDED_HID_DEVICE_PATH              *ExtendedAcpi;
1113
+  ACPI_ADR_DEVICE_PATH                       *AcpiAdr;
1114
+
1115
+  ATAPI_DEVICE_PATH                          *Atapi;
1116
+  SCSI_DEVICE_PATH                           *Scsi;
1117
+  ISCSI_DEVICE_PATH                          *Iscsi;
1118
+  FIBRECHANNEL_DEVICE_PATH                   *FibreChannel;
1119
+  FIBRECHANNELEX_DEVICE_PATH                 *FibreChannelEx;
1120
+
1121
+  F1394_DEVICE_PATH                          *F1394;
1122
+  USB_DEVICE_PATH                            *Usb;
1123
+  SATA_DEVICE_PATH                           *Sata;
1124
+  USB_CLASS_DEVICE_PATH                      *UsbClass;
1125
+  USB_WWID_DEVICE_PATH                       *UsbWwid;
1126
+  DEVICE_LOGICAL_UNIT_DEVICE_PATH            *LogicUnit;
1127
+  I2O_DEVICE_PATH                            *I2O;
1128
+  MAC_ADDR_DEVICE_PATH                       *MacAddr;
1129
+  IPv4_DEVICE_PATH                           *Ipv4;
1130
+  IPv6_DEVICE_PATH                           *Ipv6;
1131
+  VLAN_DEVICE_PATH                           *Vlan;
1132
+  INFINIBAND_DEVICE_PATH                     *InfiniBand;
1133
+  UART_DEVICE_PATH                           *Uart;
1134
+  UART_FLOW_CONTROL_DEVICE_PATH              *UartFlowControl;
1135
+  SAS_DEVICE_PATH                            *Sas;
1136
+  SASEX_DEVICE_PATH                          *SasEx;
1137
+  HARDDRIVE_DEVICE_PATH                      *HardDrive;
1138
+  CDROM_DEVICE_PATH                          *CD;
1139
+
1140
+  FILEPATH_DEVICE_PATH                       *FilePath;
1141
+  MEDIA_PROTOCOL_DEVICE_PATH                 *MediaProtocol;
1142
+
1143
+  MEDIA_FW_VOL_DEVICE_PATH                   *FirmwareVolume;
1144
+  MEDIA_FW_VOL_FILEPATH_DEVICE_PATH          *FirmwareFile;
1145
+  MEDIA_RELATIVE_OFFSET_RANGE_DEVICE_PATH    *Offset;
1146
+
1147
+  BBS_BBS_DEVICE_PATH                        *Bbs;
1148
+  UINT8                                      *Raw;
1064 1149
 } EFI_DEV_PATH_PTR;
1065 1150
 
1066 1151
 #pragma pack()

+ 4
- 0
src/include/ipxe/efi/Protocol/FormBrowser2.h View File

@@ -61,6 +61,10 @@ typedef UINTN EFI_BROWSER_ACTION_REQUEST;
61 61
 #define EFI_BROWSER_ACTION_REQUEST_RESET  1
62 62
 #define EFI_BROWSER_ACTION_REQUEST_SUBMIT 2
63 63
 #define EFI_BROWSER_ACTION_REQUEST_EXIT   3
64
+#define EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT  4
65
+#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD_EXIT 5
66
+#define EFI_BROWSER_ACTION_REQUEST_FORM_APPLY        6
67
+#define EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD      7
64 68
 
65 69
 
66 70
 /**

+ 6
- 0
src/include/ipxe/efi/Protocol/HiiConfigAccess.h View File

@@ -36,6 +36,12 @@ typedef UINTN EFI_BROWSER_ACTION;
36 36
 #define EFI_BROWSER_ACTION_RETRIEVE   2
37 37
 #define EFI_BROWSER_ACTION_FORM_OPEN  3
38 38
 #define EFI_BROWSER_ACTION_FORM_CLOSE 4
39
+#define EFI_BROWSER_ACTION_DEFAULT_STANDARD      0x1000
40
+#define EFI_BROWSER_ACTION_DEFAULT_MANUFACTURING 0x1001
41
+#define EFI_BROWSER_ACTION_DEFAULT_SAFE          0x1002
42
+#define EFI_BROWSER_ACTION_DEFAULT_PLATFORM      0x2000
43
+#define EFI_BROWSER_ACTION_DEFAULT_HARDWARE      0x3000
44
+#define EFI_BROWSER_ACTION_DEFAULT_FIRMWARE      0x4000
39 45
 
40 46
 /**
41 47
 

+ 24
- 1
src/include/ipxe/efi/Protocol/NetworkInterfaceIdentifier.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   EFI Network Interface Identifier Protocol.
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
@@ -87,6 +87,29 @@ typedef enum {
87 87
   EfiNetworkInterfaceUndi = 1
88 88
 } EFI_NETWORK_INTERFACE_TYPE;
89 89
 
90
+///
91
+/// Forward reference for pure ANSI compatability.
92
+///
93
+typedef struct undiconfig_table  UNDI_CONFIG_TABLE;
94
+
95
+///
96
+/// The format of the configuration table for UNDI
97
+///
98
+struct undiconfig_table {
99
+  UINT32             NumberOfInterfaces;    ///< The number of NIC devices
100
+                                            ///< that this UNDI controls.
101
+  UINT32             reserved;
102
+  UNDI_CONFIG_TABLE  *nextlink;             ///< A pointer to the next UNDI
103
+                                            ///< configuration table.
104
+  ///
105
+  /// The length of this array is given in the NumberOfInterfaces field.
106
+  ///
107
+  struct {
108
+    VOID             *NII_InterfacePointer; ///< Pointer to the NII interface structure.
109
+    VOID             *DevicePathPointer;    ///< Pointer to the device path for this NIC.
110
+  } NII_entry[1];
111
+};
112
+
90 113
 extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid;
91 114
 extern EFI_GUID gEfiNetworkInterfaceIdentifierProtocolGuid_31;
92 115
 

+ 8
- 2
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 - 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
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
@@ -21,6 +21,8 @@
21 21
 
22 22
 FILE_LICENCE ( BSD3 );
23 23
 
24
+#include <ipxe/efi/Library/BaseLib.h>
25
+
24 26
 #define EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID \
25 27
   { \
26 28
     0x2f707ebb, 0x4a1a, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
@@ -108,7 +110,11 @@ typedef enum {
108 110
 #define EFI_PCI_ATTRIBUTE_INVALID_FOR_ALLOCATE_BUFFER (~EFI_PCI_ATTRIBUTE_VALID_FOR_ALLOCATE_BUFFER)
109 111
 
110 112
 #define EFI_PCI_ADDRESS(bus, dev, func, reg) \
111
-    ((UINT64) ((((UINTN) bus) << 24) + (((UINTN) dev) << 16) + (((UINTN) func) << 8) + ((UINTN) reg)))
113
+  (UINT64) ( \
114
+  (((UINTN) bus) << 24) | \
115
+  (((UINTN) dev) << 16) | \
116
+  (((UINTN) func) << 8) | \
117
+  (((UINTN) (reg)) < 256 ? ((UINTN) (reg)) : (UINT64) (LShiftU64 ((UINT64) (reg), 32))))
112 118
 
113 119
 typedef struct {
114 120
   UINT8   Register;

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

@@ -4,7 +4,7 @@
4 4
   Abstraction of a very simple input device like a keyboard or serial
5 5
   terminal.
6 6
 
7
-  Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
7
+  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
8 8
   This program and the accompanying materials
9 9
   are licensed and made available under the terms and conditions of the BSD License
10 10
   which accompanies this distribution.  The full text of the license may be found at
@@ -78,8 +78,6 @@ typedef struct {
78 78
 #define SCAN_F8         0x0012
79 79
 #define SCAN_F9         0x0013
80 80
 #define SCAN_F10        0x0014
81
-#define SCAN_F11        0x0015
82
-#define SCAN_F12        0x0016
83 81
 #define SCAN_ESC        0x0017
84 82
 
85 83
 /**

+ 327
- 0
src/include/ipxe/efi/Protocol/SimpleTextInEx.h View File

@@ -0,0 +1,327 @@
1
+/** @file
2
+  Simple Text Input Ex protocol from the UEFI 2.0 specification.
3
+
4
+  This protocol defines an extension to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL
5
+  which exposes much more state and modifier information from the input device,
6
+  also allows one to register a notification for a particular keystroke.
7
+
8
+  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
9
+  This program and the accompanying materials
10
+  are licensed and made available under the terms and conditions of the BSD License
11
+  which accompanies this distribution.  The full text of the license may be found at
12
+  http://opensource.org/licenses/bsd-license.php
13
+
14
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
15
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16
+
17
+**/
18
+
19
+#ifndef __SIMPLE_TEXT_IN_EX_H__
20
+#define __SIMPLE_TEXT_IN_EX_H__
21
+
22
+FILE_LICENCE ( BSD3 );
23
+
24
+#include <ipxe/efi/Protocol/SimpleTextIn.h>
25
+
26
+#define EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID \
27
+  {0xdd9e7534, 0x7762, 0x4698, { 0x8c, 0x14, 0xf5, 0x85, 0x17, 0xa6, 0x25, 0xaa } }
28
+
29
+
30
+typedef struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL;
31
+
32
+/**
33
+  The Reset() function resets the input device hardware. As part
34
+  of initialization process, the firmware/device will make a quick
35
+  but reasonable attempt to verify that the device is functioning.
36
+  If the ExtendedVerification flag is TRUE the firmware may take
37
+  an extended amount of time to verify the device is operating on
38
+  reset. Otherwise the reset operation is to occur as quickly as
39
+  possible. The hardware verification process is not defined by
40
+  this specification and is left up to the platform firmware or
41
+  driver to implement.
42
+
43
+  @param This                 A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
44
+
45
+  @param ExtendedVerification Indicates that the driver may
46
+                              perform a more exhaustive
47
+                              verification operation of the
48
+                              device during reset.
49
+
50
+
51
+  @retval EFI_SUCCESS       The device was reset.
52
+
53
+  @retval EFI_DEVICE_ERROR  The device is not functioning
54
+                            correctly and could not be reset.
55
+
56
+**/
57
+typedef
58
+EFI_STATUS
59
+(EFIAPI *EFI_INPUT_RESET_EX)(
60
+  IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
61
+  IN BOOLEAN                           ExtendedVerification
62
+);
63
+
64
+
65
+///
66
+/// EFI_KEY_TOGGLE_STATE. The toggle states are defined.
67
+/// They are: EFI_TOGGLE_STATE_VALID, EFI_SCROLL_LOCK_ACTIVE
68
+/// EFI_NUM_LOCK_ACTIVE, EFI_CAPS_LOCK_ACTIVE
69
+///
70
+typedef UINT8 EFI_KEY_TOGGLE_STATE;
71
+
72
+typedef struct _EFI_KEY_STATE {
73
+  ///
74
+  /// Reflects the currently pressed shift
75
+  /// modifiers for the input device. The
76
+  /// returned value is valid only if the high
77
+  /// order bit has been set.
78
+  ///
79
+  UINT32                KeyShiftState;
80
+  ///
81
+  /// Reflects the current internal state of
82
+  /// various toggled attributes. The returned
83
+  /// value is valid only if the high order
84
+  /// bit has been set.
85
+  ///
86
+  EFI_KEY_TOGGLE_STATE  KeyToggleState;
87
+} EFI_KEY_STATE;
88
+
89
+typedef struct {
90
+  ///
91
+  /// The EFI scan code and Unicode value returned from the input device.
92
+  ///
93
+  EFI_INPUT_KEY   Key;
94
+  ///
95
+  /// The current state of various toggled attributes as well as input modifier values.
96
+  ///
97
+  EFI_KEY_STATE   KeyState;
98
+} EFI_KEY_DATA;
99
+
100
+//
101
+// Any Shift or Toggle State that is valid should have
102
+// high order bit set.
103
+//
104
+// Shift state
105
+//
106
+#define EFI_SHIFT_STATE_VALID     0x80000000
107
+#define EFI_RIGHT_SHIFT_PRESSED   0x00000001
108
+#define EFI_LEFT_SHIFT_PRESSED    0x00000002
109
+#define EFI_RIGHT_CONTROL_PRESSED 0x00000004
110
+#define EFI_LEFT_CONTROL_PRESSED  0x00000008
111
+#define EFI_RIGHT_ALT_PRESSED     0x00000010
112
+#define EFI_LEFT_ALT_PRESSED      0x00000020
113
+#define EFI_RIGHT_LOGO_PRESSED    0x00000040
114
+#define EFI_LEFT_LOGO_PRESSED     0x00000080
115
+#define EFI_MENU_KEY_PRESSED      0x00000100
116
+#define EFI_SYS_REQ_PRESSED       0x00000200
117
+
118
+//
119
+// Toggle state
120
+//
121
+#define EFI_TOGGLE_STATE_VALID    0x80
122
+#define EFI_KEY_STATE_EXPOSED     0x40
123
+#define EFI_SCROLL_LOCK_ACTIVE    0x01
124
+#define EFI_NUM_LOCK_ACTIVE       0x02
125
+#define EFI_CAPS_LOCK_ACTIVE      0x04
126
+
127
+//
128
+// EFI Scan codes
129
+//
130
+#define SCAN_F11                  0x0015
131
+#define SCAN_F12                  0x0016
132
+#define SCAN_PAUSE                0x0048
133
+#define SCAN_F13                  0x0068
134
+#define SCAN_F14                  0x0069
135
+#define SCAN_F15                  0x006A
136
+#define SCAN_F16                  0x006B
137
+#define SCAN_F17                  0x006C
138
+#define SCAN_F18                  0x006D
139
+#define SCAN_F19                  0x006E
140
+#define SCAN_F20                  0x006F
141
+#define SCAN_F21                  0x0070
142
+#define SCAN_F22                  0x0071
143
+#define SCAN_F23                  0x0072
144
+#define SCAN_F24                  0x0073
145
+#define SCAN_MUTE                 0x007F
146
+#define SCAN_VOLUME_UP            0x0080
147
+#define SCAN_VOLUME_DOWN          0x0081
148
+#define SCAN_BRIGHTNESS_UP        0x0100
149
+#define SCAN_BRIGHTNESS_DOWN      0x0101
150
+#define SCAN_SUSPEND              0x0102
151
+#define SCAN_HIBERNATE            0x0103
152
+#define SCAN_TOGGLE_DISPLAY       0x0104
153
+#define SCAN_RECOVERY             0x0105
154
+#define SCAN_EJECT                0x0106
155
+
156
+/**
157
+  The function reads the next keystroke from the input device. If
158
+  there is no pending keystroke the function returns
159
+  EFI_NOT_READY. If there is a pending keystroke, then
160
+  KeyData.Key.ScanCode is the EFI scan code defined in Error!
161
+  Reference source not found. The KeyData.Key.UnicodeChar is the
162
+  actual printable character or is zero if the key does not
163
+  represent a printable character (control key, function key,
164
+  etc.). The KeyData.KeyState is shift state for the character
165
+  reflected in KeyData.Key.UnicodeChar or KeyData.Key.ScanCode .
166
+  When interpreting the data from this function, it should be
167
+  noted that if a class of printable characters that are
168
+  normally adjusted by shift modifiers (e.g. Shift Key + "f"
169
+  key) would be presented solely as a KeyData.Key.UnicodeChar
170
+  without the associated shift state. So in the previous example
171
+  of a Shift Key + "f" key being pressed, the only pertinent
172
+  data returned would be KeyData.Key.UnicodeChar with the value
173
+  of "F". This of course would not typically be the case for
174
+  non-printable characters such as the pressing of the Right
175
+  Shift Key + F10 key since the corresponding returned data
176
+  would be reflected both in the KeyData.KeyState.KeyShiftState
177
+  and KeyData.Key.ScanCode values. UEFI drivers which implement
178
+  the EFI_SIMPLE_TEXT_INPUT_EX protocol are required to return
179
+  KeyData.Key and KeyData.KeyState values. These drivers must
180
+  always return the most current state of
181
+  KeyData.KeyState.KeyShiftState and
182
+  KeyData.KeyState.KeyToggleState. It should also be noted that
183
+  certain input devices may not be able to produce shift or toggle
184
+  state information, and in those cases the high order bit in the
185
+  respective Toggle and Shift state fields should not be active.
186
+
187
+
188
+  @param This     A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
189
+
190
+  @param KeyData  A pointer to a buffer that is filled in with
191
+                  the keystroke state data for the key that was
192
+                  pressed.
193
+
194
+
195
+  @retval EFI_SUCCESS     The keystroke information was
196
+                          returned.
197
+
198
+  @retval EFI_NOT_READY   There was no keystroke data available.
199
+                          EFI_DEVICE_ERROR The keystroke
200
+                          information was not returned due to
201
+                          hardware errors.
202
+
203
+
204
+**/
205
+typedef
206
+EFI_STATUS
207
+(EFIAPI *EFI_INPUT_READ_KEY_EX)(
208
+  IN  EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
209
+  OUT EFI_KEY_DATA                      *KeyData
210
+);
211
+
212
+/**
213
+  The SetState() function allows the input device hardware to
214
+  have state settings adjusted.
215
+
216
+  @param This           A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
217
+
218
+  @param KeyToggleState Pointer to the EFI_KEY_TOGGLE_STATE to
219
+                        set the state for the input device.
220
+
221
+
222
+  @retval EFI_SUCCESS       The device state was set appropriately.
223
+
224
+  @retval EFI_DEVICE_ERROR  The device is not functioning
225
+                            correctly and could not have the
226
+                            setting adjusted.
227
+
228
+  @retval EFI_UNSUPPORTED   The device does not support the
229
+                            ability to have its state set.
230
+
231
+**/
232
+typedef
233
+EFI_STATUS
234
+(EFIAPI *EFI_SET_STATE)(
235
+  IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
236
+  IN EFI_KEY_TOGGLE_STATE              *KeyToggleState
237
+);
238
+
239
+///
240
+/// The function will be called when the key sequence is typed specified by KeyData.
241
+///
242
+typedef
243
+EFI_STATUS
244
+(EFIAPI *EFI_KEY_NOTIFY_FUNCTION)(
245
+  IN EFI_KEY_DATA *KeyData
246
+);
247
+
248
+/**
249
+  The RegisterKeystrokeNotify() function registers a function
250
+  which will be called when a specified keystroke will occur.
251
+
252
+  @param This                     A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
253
+
254
+  @param KeyData                  A pointer to a buffer that is filled in with
255
+                                  the keystroke information for the key that was
256
+                                  pressed.
257
+
258
+  @param KeyNotificationFunction  Points to the function to be
259
+                                  called when the key sequence
260
+                                  is typed specified by KeyData.
261
+
262
+
263
+  @param NotifyHandle             Points to the unique handle assigned to
264
+                                  the registered notification.
265
+
266
+  @retval EFI_SUCCESS           The device state was set
267
+                                appropriately.
268
+
269
+  @retval EFI_OUT_OF_RESOURCES  Unable to allocate necessary
270
+                                data structures.
271
+
272
+**/
273
+typedef
274
+EFI_STATUS
275
+(EFIAPI *EFI_REGISTER_KEYSTROKE_NOTIFY)(
276
+  IN  EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
277
+  IN  EFI_KEY_DATA                      *KeyData,
278
+  IN  EFI_KEY_NOTIFY_FUNCTION           KeyNotificationFunction,
279
+  OUT EFI_HANDLE                        *NotifyHandle
280
+);
281
+
282
+/**
283
+  The UnregisterKeystrokeNotify() function removes the
284
+  notification which was previously registered.
285
+
286
+  @param This               A pointer to the EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL instance.
287
+
288
+  @param NotificationHandle The handle of the notification
289
+                            function being unregistered.
290
+
291
+  @retval EFI_SUCCESS The device state was set appropriately.
292
+
293
+  @retval EFI_INVALID_PARAMETER The NotificationHandle is
294
+                                invalid.
295
+
296
+**/
297
+typedef
298
+EFI_STATUS
299
+(EFIAPI *EFI_UNREGISTER_KEYSTROKE_NOTIFY)(
300
+  IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL  *This,
301
+  IN EFI_HANDLE                         NotificationHandle
302
+);
303
+
304
+
305
+///
306
+/// The EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL is used on the ConsoleIn
307
+/// device. It is an extension to the Simple Text Input protocol
308
+/// which allows a variety of extended shift state information to be
309
+/// returned.
310
+///
311
+struct _EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL{
312
+  EFI_INPUT_RESET_EX              Reset;
313
+  EFI_INPUT_READ_KEY_EX           ReadKeyStrokeEx;
314
+  ///
315
+  /// Event to use with WaitForEvent() to wait for a key to be available.
316
+  ///
317
+  EFI_EVENT                       WaitForKeyEx;
318
+  EFI_SET_STATE                   SetState;
319
+  EFI_REGISTER_KEYSTROKE_NOTIFY   RegisterKeyNotify;
320
+  EFI_UNREGISTER_KEYSTROKE_NOTIFY UnregisterKeyNotify;
321
+};
322
+
323
+
324
+extern EFI_GUID gEfiSimpleTextInputExProtocolGuid;
325
+
326
+#endif
327
+

+ 3
- 1
src/include/ipxe/efi/Uefi/UefiBaseType.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   Defines data types and constants introduced in UEFI.
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
@@ -150,11 +150,13 @@ typedef union {
150 150
 #define EFI_END_OF_MEDIA          RETURN_END_OF_MEDIA
151 151
 #define EFI_END_OF_FILE           RETURN_END_OF_FILE
152 152
 #define EFI_INVALID_LANGUAGE      RETURN_INVALID_LANGUAGE
153
+#define EFI_COMPROMISED_DATA      RETURN_COMPROMISED_DATA
153 154
 
154 155
 #define EFI_WARN_UNKNOWN_GLYPH    RETURN_WARN_UNKNOWN_GLYPH
155 156
 #define EFI_WARN_DELETE_FAILURE   RETURN_WARN_DELETE_FAILURE
156 157
 #define EFI_WARN_WRITE_FAILURE    RETURN_WARN_WRITE_FAILURE
157 158
 #define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL
159
+#define EFI_WARN_STALE_DATA       RETURN_WARN_STALE_DATA
158 160
 ///@}
159 161
 
160 162
 ///

+ 2
- 1
src/include/ipxe/efi/Uefi/UefiGpt.h View File

@@ -71,7 +71,8 @@ typedef struct {
71 71
   ///
72 72
   /// The size, in bytes, of each the GUID Partition
73 73
   /// Entry structures in the GUID Partition Entry
74
-  /// array. Must be a multiple of 8.
74
+  /// array. This field shall be set to a value of 128 x 2^n where n is
75
+  /// an integer greater than or equal to zero (e.g., 128, 256, 512, etc.).
75 76
   ///
76 77
   UINT32            SizeOfPartitionEntry;
77 78
   ///

+ 30
- 3
src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h View File

@@ -3,7 +3,7 @@
3 3
   IFR is primarily consumed by the EFI presentation engine, and produced by EFI
4 4
   internal application and drivers as well as all add-in card option-ROM drivers
5 5
 
6
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
6
+Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
7 7
 This program and the accompanying materials are licensed and made available under
8 8
 the terms and conditions of the BSD License that accompanies this distribution.
9 9
 The full text of the license may be found at
@@ -660,6 +660,13 @@ typedef struct {
660 660
   UINT8  Day;
661 661
 } EFI_HII_DATE;
662 662
 
663
+typedef struct {
664
+  EFI_QUESTION_ID QuestionId;
665
+  EFI_FORM_ID     FormId;
666
+  EFI_GUID        FormSetGuid;
667
+  EFI_STRING_ID   DevicePath;
668
+} EFI_HII_REF;
669
+
663 670
 typedef union {
664 671
   UINT8           u8;
665 672
   UINT16          u16;
@@ -669,7 +676,8 @@ typedef union {
669 676
   EFI_HII_TIME    time;
670 677
   EFI_HII_DATE    date;
671 678
   EFI_STRING_ID   string; ///< EFI_IFR_TYPE_STRING, EFI_IFR_TYPE_ACTION
672
-  // UINT8 buffer[];      ///< EFI_IFR_TYPE_ORDERED_LIST
679
+  EFI_HII_REF     ref;    ///< EFI_IFR_TYPE_REF
680
+  // UINT8 buffer[];      ///< EFI_IFR_TYPE_BUFFER
673 681
 } EFI_IFR_TYPE_VALUE;
674 682
 
675 683
 //
@@ -694,7 +702,7 @@ typedef union {
694 702
 #define EFI_IFR_INCONSISTENT_IF_OP     0x11
695 703
 #define EFI_IFR_EQ_ID_VAL_OP           0x12
696 704
 #define EFI_IFR_EQ_ID_ID_OP            0x13
697
-#define EFI_IFR_EQ_ID_LIST_OP          0x14
705
+#define EFI_IFR_EQ_ID_VAL_LIST_OP      0x14
698 706
 #define EFI_IFR_AND_OP                 0x15
699 707
 #define EFI_IFR_OR_OP                  0x16
700 708
 #define EFI_IFR_NOT_OP                 0x17
@@ -771,6 +779,8 @@ typedef union {
771 779
 #define EFI_IFR_CATENATE_OP            0x5E
772 780
 #define EFI_IFR_GUID_OP                0x5F
773 781
 #define EFI_IFR_SECURITY_OP            0x60
782
+#define EFI_IFR_MODAL_TAG_OP           0x61
783
+#define EFI_IFR_REFRESH_ID_OP          0x62
774 784
 
775 785
 //
776 786
 // Definitions of IFR Standard Headers
@@ -843,6 +853,8 @@ typedef struct _EFI_IFR_VARSTORE_EFI {
843 853
   EFI_VARSTORE_ID          VarStoreId;
844 854
   EFI_GUID                 Guid;
845 855
   UINT32                   Attributes;
856
+  UINT16                   Size;
857
+  UINT8                    Name[1];
846 858
 } EFI_IFR_VARSTORE_EFI;
847 859
 
848 860
 typedef struct _EFI_IFR_VARSTORE_NAME_VALUE {
@@ -875,6 +887,10 @@ typedef struct _EFI_IFR_IMAGE {
875 887
   EFI_IMAGE_ID             Id;
876 888
 } EFI_IFR_IMAGE;
877 889
 
890
+typedef struct _EFI_IFR_MODAL {
891
+  EFI_IFR_OP_HEADER        Header;
892
+} EFI_IFR_MODAL;
893
+
878 894
 typedef struct _EFI_IFR_LOCKED {
879 895
   EFI_IFR_OP_HEADER        Header;
880 896
 } EFI_IFR_LOCKED;
@@ -948,6 +964,11 @@ typedef struct _EFI_IFR_REF4 {
948 964
   EFI_STRING_ID            DevicePath;
949 965
 } EFI_IFR_REF4;
950 966
 
967
+typedef struct _EFI_IFR_REF5 {
968
+  EFI_IFR_OP_HEADER Header;
969
+  EFI_IFR_QUESTION_HEADER Question;
970
+} EFI_IFR_REF5;
971
+
951 972
 typedef struct _EFI_IFR_RESET_BUTTON {
952 973
   EFI_IFR_OP_HEADER        Header;
953 974
   EFI_IFR_STATEMENT_HEADER Statement;
@@ -1134,6 +1155,7 @@ typedef struct _EFI_IFR_ONE_OF_OPTION {
1134 1155
 #define EFI_IFR_TYPE_UNDEFINED         0x09
1135 1156
 #define EFI_IFR_TYPE_ACTION            0x0A
1136 1157
 #define EFI_IFR_TYPE_BUFFER            0x0B
1158
+#define EFI_IFR_TYPE_REF               0x0C
1137 1159
 
1138 1160
 #define EFI_IFR_OPTION_DEFAULT         0x10
1139 1161
 #define EFI_IFR_OPTION_DEFAULT_MFG     0x20
@@ -1144,6 +1166,11 @@ typedef struct _EFI_IFR_GUID {
1144 1166
   //Optional Data Follows
1145 1167
 } EFI_IFR_GUID;
1146 1168
 
1169
+typedef struct _EFI_IFR_REFRESH_ID {
1170
+  EFI_IFR_OP_HEADER Header;
1171
+  EFI_GUID          RefreshEventGroupId;
1172
+} EFI_IFR_REFRESH_ID;
1173
+
1147 1174
 typedef struct _EFI_IFR_DUP {
1148 1175
   EFI_IFR_OP_HEADER        Header;
1149 1176
 } EFI_IFR_DUP;

+ 33
- 9
src/include/ipxe/efi/Uefi/UefiMultiPhase.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   This includes some definitions introduced in UEFI that will be used in both PEI and DXE phases.
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
@@ -122,21 +122,26 @@ typedef struct {
122 122
 ///
123 123
 /// Attributes of variable.
124 124
 ///
125
-#define EFI_VARIABLE_NON_VOLATILE                 0x00000001
126
-#define EFI_VARIABLE_BOOTSERVICE_ACCESS           0x00000002
127
-#define EFI_VARIABLE_RUNTIME_ACCESS               0x00000004
128
-#define EFI_VARIABLE_HARDWARE_ERROR_RECORD        0x00000008
129
-
125
+#define EFI_VARIABLE_NON_VOLATILE                            0x00000001
126
+#define EFI_VARIABLE_BOOTSERVICE_ACCESS                      0x00000002
127
+#define EFI_VARIABLE_RUNTIME_ACCESS                          0x00000004
130 128
 ///
131 129
 /// This attribute is identified by the mnemonic 'HR'
132 130
 /// elsewhere in this specification.
133 131
 ///
134
-#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS   0x00000010
132
+#define EFI_VARIABLE_HARDWARE_ERROR_RECORD                   0x00000008
133
+///
134
+/// Attributes of Authenticated Variable
135
+///
136
+#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS              0x00000010
137
+#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS   0x00000020
138
+#define EFI_VARIABLE_APPEND_WRITE                            0x00000040
139
+
135 140
 
136 141
 ///
137 142
 /// AuthInfo is a WIN_CERTIFICATE using the wCertificateType
138 143
 /// WIN_CERTIFICATE_UEFI_GUID and the CertType
139
-/// EFI_CERT_TYPE_RSA2048_SHA256. If the attribute specifies
144
+/// EFI_CERT_TYPE_RSA2048_SHA256_GUID. If the attribute specifies
140 145
 /// authenticated access, then the Data buffer should begin with an
141 146
 /// authentication descriptor prior to the data payload and DataSize
142 147
 /// should reflect the the data.and descriptor size. The caller
@@ -167,5 +172,24 @@ typedef struct {
167 172
   WIN_CERTIFICATE_UEFI_GUID   AuthInfo;
168 173
 } EFI_VARIABLE_AUTHENTICATION;
169 174
 
170
-#endif
175
+///
176
+/// When the attribute EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS is
177
+/// set, then the Data buffer shall begin with an instance of a complete (and serialized)
178
+/// EFI_VARIABLE_AUTHENTICATION_2 descriptor. The descriptor shall be followed by the new
179
+/// variable value and DataSize shall reflect the combined size of the descriptor and the new
180
+/// variable value. The authentication descriptor is not part of the variable data and is not
181
+/// returned by subsequent calls to GetVariable().
182
+///
183
+typedef struct {
184
+  ///
185
+  /// For the TimeStamp value, components Pad1, Nanosecond, TimeZone, Daylight and
186
+  /// Pad2 shall be set to 0. This means that the time shall always be expressed in GMT.
187
+  ///
188
+  EFI_TIME                    TimeStamp;
189
+  ///
190
+  /// Only a CertType of  EFI_CERT_TYPE_PKCS7_GUID is accepted.
191
+  ///
192
+  WIN_CERTIFICATE_UEFI_GUID   AuthInfo;
193
+ } EFI_VARIABLE_AUTHENTICATION_2;
171 194
 
195
+#endif

+ 16
- 13
src/include/ipxe/efi/Uefi/UefiSpec.h View File

@@ -5,7 +5,7 @@
5 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 - 2011, Intel Corporation. All rights reserved.<BR>
8
+Copyright (c) 2006 - 2012, 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
@@ -25,6 +25,7 @@ FILE_LICENCE ( BSD3 );
25 25
 
26 26
 #include <ipxe/efi/Protocol/DevicePath.h>
27 27
 #include <ipxe/efi/Protocol/SimpleTextIn.h>
28
+#include <ipxe/efi/Protocol/SimpleTextInEx.h>
28 29
 #include <ipxe/efi/Protocol/SimpleTextOut.h>
29 30
 
30 31
 ///
@@ -128,6 +129,7 @@ typedef struct {
128 129
   @retval EFI_INVALID_PARAMETER 1) Type is not AllocateAnyPages or
129 130
                                 AllocateMaxAddress or AllocateAddress.
130 131
                                 2) MemoryType is in the range
132
+                                3) Memory is NULL.
131 133
                                 EfiMaxMemoryType..0x7FFFFFFF.
132 134
   @retval EFI_OUT_OF_RESOURCES  The pages could not be allocated.
133 135
   @retval EFI_NOT_FOUND         The requested pages could not be found.
@@ -206,7 +208,7 @@ EFI_STATUS
206 208
 
207 209
   @retval EFI_SUCCESS           The requested number of bytes was allocated.
208 210
   @retval EFI_OUT_OF_RESOURCES  The pool requested could not be allocated.
209
-  @retval EFI_INVALID_PARAMETER PoolType was invalid.
211
+  @retval EFI_INVALID_PARAMETER PoolType was invalid or Buffer is NULL.
210 212
 
211 213
 **/
212 214
 typedef
@@ -277,7 +279,7 @@ EFI_STATUS
277 279
                                 2) No drivers were connected to ControllerHandle, but
278 280
                                 RemainingDevicePath is not NULL, and it is an End Device
279 281
                                 Path Node.
280
-  @retval EFI_INVALID_PARAMETER ControllerHandle is not a valid EFI_HANDLE.
282
+  @retval EFI_INVALID_PARAMETER ControllerHandle is NULL.
281 283
   @retval EFI_NOT_FOUND         1) There are no EFI_DRIVER_BINDING_PROTOCOL instances
282 284
                                 present in the system.
283 285
                                 2) No drivers were connected to ControllerHandle.
@@ -307,7 +309,7 @@ EFI_STATUS
307 309
                                 2) On entry, no drivers are managing ControllerHandle.
308 310
                                 3) DriverImageHandle is not NULL, and on entry
309 311
                                    DriverImageHandle is not managing ControllerHandle.
310
-  @retval EFI_INVALID_PARAMETER 1) ControllerHandle is not a valid EFI_HANDLE.
312
+  @retval EFI_INVALID_PARAMETER 1) ControllerHandle is NULL.
311 313
                                 2) DriverImageHandle is not NULL, and it is not a valid EFI_HANDLE.
312 314
                                 3) ChildHandle is not NULL, and it is not a valid EFI_HANDLE.
313 315
                                 4) DriverImageHandle does not support the EFI_DRIVER_BINDING_PROTOCOL.
@@ -1168,7 +1170,7 @@ EFI_STATUS
1168 1170
   @retval EFI_ACCESS_DENIED     The protocol interface could not be reinstalled,
1169 1171
                                 because OldInterface is still being used by a
1170 1172
                                 driver that will not release it.
1171
-  @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.
1173
+  @retval EFI_INVALID_PARAMETER Handle is NULL.
1172 1174
   @retval EFI_INVALID_PARAMETER Protocol is NULL.
1173 1175
 
1174 1176
 **/
@@ -1194,7 +1196,7 @@ EFI_STATUS
1194 1196
   @retval EFI_NOT_FOUND         The interface was not found.
1195 1197
   @retval EFI_ACCESS_DENIED     The interface was not removed because the interface
1196 1198
                                 is still being used by a driver.
1197
-  @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.
1199
+  @retval EFI_INVALID_PARAMETER Handle is NULL.
1198 1200
   @retval EFI_INVALID_PARAMETER Protocol is NULL.
1199 1201
 
1200 1202
 **/
@@ -1234,7 +1236,7 @@ EFI_STATUS
1234 1236
 
1235 1237
   @retval EFI_SUCCESS           The interface information for the specified protocol was returned.
1236 1238
   @retval EFI_UNSUPPORTED       The device does not support the specified protocol.
1237
-  @retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.
1239
+  @retval EFI_INVALID_PARAMETER Handle is NULL.
1238 1240
   @retval EFI_INVALID_PARAMETER Protocol is NULL.
1239 1241
   @retval EFI_INVALID_PARAMETER Interface is NULL.
1240 1242
 
@@ -1305,8 +1307,8 @@ EFI_STATUS
1305 1307
                                 that required the protocol interface.
1306 1308
 
1307 1309
   @retval EFI_SUCCESS           The protocol instance was closed.
1308
-  @retval EFI_INVALID_PARAMETER 1) Handle is not a valid EFI_HANDLE.
1309
-                                2) AgentHandle is not a valid EFI_HANDLE.
1310
+  @retval EFI_INVALID_PARAMETER 1) Handle is NULL.
1311
+                                2) AgentHandle is NULL.
1310 1312
                                 3) ControllerHandle is not NULL and ControllerHandle is not a valid EFI_HANDLE.
1311 1313
                                 4) Protocol is NULL.
1312 1314
   @retval EFI_NOT_FOUND         1) Handle does not support the protocol specified by Protocol.
@@ -1493,7 +1495,7 @@ EFI_STATUS
1493 1495
 
1494 1496
   @retval EFI_SUCCESS           The (Guid, Table) pair was added, updated, or removed.
1495 1497
   @retval EFI_NOT_FOUND         An attempt was made to delete a nonexistent entry.
1496
-  @retval EFI_INVALID_PARAMETER Guid is not valid.
1498
+  @retval EFI_INVALID_PARAMETER Guid is NULL.
1497 1499
   @retval EFI_OUT_OF_RESOURCES  There is not enough memory available to complete the operation.
1498 1500
 
1499 1501
 **/
@@ -1725,16 +1727,17 @@ EFI_STATUS
1725 1727
 // EFI Runtime Services Table
1726 1728
 //
1727 1729
 #define EFI_SYSTEM_TABLE_SIGNATURE      SIGNATURE_64 ('I','B','I',' ','S','Y','S','T')
1730
+#define EFI_2_31_SYSTEM_TABLE_REVISION  ((2 << 16) | (31))
1728 1731
 #define EFI_2_30_SYSTEM_TABLE_REVISION  ((2 << 16) | (30))
1729 1732
 #define EFI_2_20_SYSTEM_TABLE_REVISION  ((2 << 16) | (20))
1730 1733
 #define EFI_2_10_SYSTEM_TABLE_REVISION  ((2 << 16) | (10))
1731 1734
 #define EFI_2_00_SYSTEM_TABLE_REVISION  ((2 << 16) | (00))
1732 1735
 #define EFI_1_10_SYSTEM_TABLE_REVISION  ((1 << 16) | (10))
1733 1736
 #define EFI_1_02_SYSTEM_TABLE_REVISION  ((1 << 16) | (02))
1734
-#define EFI_SYSTEM_TABLE_REVISION       EFI_2_30_SYSTEM_TABLE_REVISION
1737
+#define EFI_SYSTEM_TABLE_REVISION       EFI_2_31_SYSTEM_TABLE_REVISION
1735 1738
 
1736 1739
 #define EFI_RUNTIME_SERVICES_SIGNATURE  SIGNATURE_64 ('R','U','N','T','S','E','R','V')
1737
-#define EFI_RUNTIME_SERVICES_REVISION   EFI_2_30_SYSTEM_TABLE_REVISION
1740
+#define EFI_RUNTIME_SERVICES_REVISION   EFI_2_31_SYSTEM_TABLE_REVISION
1738 1741
 
1739 1742
 ///
1740 1743
 /// EFI Runtime Services Table.
@@ -1786,7 +1789,7 @@ typedef struct {
1786 1789
 
1787 1790
 
1788 1791
 #define EFI_BOOT_SERVICES_SIGNATURE   SIGNATURE_64 ('B','O','O','T','S','E','R','V')
1789
-#define EFI_BOOT_SERVICES_REVISION    EFI_2_30_SYSTEM_TABLE_REVISION
1792
+#define EFI_BOOT_SERVICES_REVISION    EFI_2_31_SYSTEM_TABLE_REVISION
1790 1793
 
1791 1794
 ///
1792 1795
 /// EFI Boot Services Table.

+ 3
- 3
src/include/ipxe/efi/X64/ProcessorBind.h View File

@@ -1,7 +1,7 @@
1 1
 /** @file
2 2
   Processor or Compiler specific defines and types x64 (Intel 64, AMD64).
3 3
 
4
-  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
4
+  Copyright (c) 2006 - 2012, 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
@@ -149,7 +149,7 @@ FILE_LICENCE ( BSD3 );
149 149
   ///
150 150
   /// 1-byte signed value
151 151
   ///
152
-  typedef char                INT8;
152
+  typedef signed char         INT8;
153 153
 #else
154 154
   ///
155 155
   /// 8-byte unsigned value
@@ -196,7 +196,7 @@ FILE_LICENCE ( BSD3 );
196 196
   ///
197 197
   /// 1-byte signed value
198 198
   ///
199
-  typedef char                INT8;
199
+  typedef signed char         INT8;
200 200
 #endif
201 201
 
202 202
 ///

+ 5
- 0
src/include/ipxe/efi/efi_pci.h View File

@@ -12,6 +12,11 @@ FILE_LICENCE ( GPL2_OR_LATER );
12 12
 #include <ipxe/efi/Protocol/PciIo.h>
13 13
 #include <ipxe/efi/Protocol/DevicePath.h>
14 14
 
15
+/* PciRootBridgeIo.h uses LShiftU64(), which isn't defined anywhere else */
16
+static inline EFIAPI uint64_t LShiftU64 ( UINT64 value, UINTN shift ) {
17
+	return ( value << shift );
18
+}
19
+
15 20
 struct efi_driver;
16 21
 struct device;
17 22
 

Loading…
Cancel
Save