Browse Source

[efi] Update to current EDK2 headers

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

+ 1
- 1
src/include/ipxe/efi/AArch64/ProcessorBind.h View File

34
 
34
 
35
 #if _MSC_EXTENSIONS
35
 #if _MSC_EXTENSIONS
36
   //
36
   //
37
-  // use Microsoft* C complier dependent integer width types
37
+  // use Microsoft* C compiler dependent integer width types
38
   //
38
   //
39
   typedef unsigned __int64    UINT64;
39
   typedef unsigned __int64    UINT64;
40
   typedef __int64             INT64;
40
   typedef __int64             INT64;

+ 8
- 1
src/include/ipxe/efi/Arm/ProcessorBind.h View File

30
 #pragma pack()
30
 #pragma pack()
31
 #endif
31
 #endif
32
 
32
 
33
+//
34
+// RVCT does not support the __builtin_unreachable() macro
35
+//
36
+#ifdef __ARMCC_VERSION
37
+#define UNREACHABLE()
38
+#endif
39
+
33
 #if _MSC_EXTENSIONS
40
 #if _MSC_EXTENSIONS
34
   //
41
   //
35
-  // use Microsoft* C complier dependent integer width types
42
+  // use Microsoft* C compiler dependent integer width types
36
   //
43
   //
37
   typedef unsigned __int64    UINT64;
44
   typedef unsigned __int64    UINT64;
38
   typedef __int64             INT64;
45
   typedef __int64             INT64;

+ 144
- 7
src/include/ipxe/efi/Base.h View File

86
   #define GLOBAL_REMOVE_IF_UNREFERENCED
86
   #define GLOBAL_REMOVE_IF_UNREFERENCED
87
 #endif
87
 #endif
88
 
88
 
89
+//
90
+// Should be used in combination with NORETURN to avoid 'noreturn' returns
91
+// warnings.
92
+//
93
+#ifndef UNREACHABLE
94
+  #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4)
95
+    ///
96
+    /// Signal compilers and analyzers that this call is not reachable.  It is
97
+    /// up to the compiler to remove any code past that point.
98
+    /// Not implemented by GCC 4.4 or earlier.
99
+    ///
100
+    #define UNREACHABLE()  __builtin_unreachable ()
101
+  #elif defined (__has_feature)
102
+    #if __has_builtin (__builtin_unreachable)
103
+      ///
104
+      /// Signal compilers and analyzers that this call is not reachable.  It is
105
+      /// up to the compiler to remove any code past that point.
106
+      ///
107
+      #define UNREACHABLE()  __builtin_unreachable ()
108
+    #endif
109
+  #endif
110
+
111
+  #ifndef UNREACHABLE
112
+    ///
113
+    /// Signal compilers and analyzers that this call is not reachable.  It is
114
+    /// up to the compiler to remove any code past that point.
115
+    ///
116
+    #define UNREACHABLE()
117
+  #endif
118
+#endif
119
+
120
+//
121
+// Signaling compilers and analyzers that a certain function cannot return may
122
+// remove all following code and thus lead to better optimization and less
123
+// false positives.
124
+//
125
+#ifndef NORETURN
126
+  #if defined (__GNUC__) || defined (__clang__)
127
+    ///
128
+    /// Signal compilers and analyzers that the function cannot return.
129
+    /// It is up to the compiler to remove any code past a call to functions
130
+    /// flagged with this attribute.
131
+    ///
132
+    #define NORETURN  __attribute__((noreturn))
133
+  #elif defined(_MSC_EXTENSIONS) && !defined(MDE_CPU_EBC)
134
+    ///
135
+    /// Signal compilers and analyzers that the function cannot return.
136
+    /// It is up to the compiler to remove any code past a call to functions
137
+    /// flagged with this attribute.
138
+    ///
139
+    #define NORETURN  __declspec(noreturn)
140
+  #else
141
+    ///
142
+    /// Signal compilers and analyzers that the function cannot return.
143
+    /// It is up to the compiler to remove any code past a call to functions
144
+    /// flagged with this attribute.
145
+    ///
146
+    #define NORETURN
147
+  #endif
148
+#endif
149
+
150
+//
151
+// Should be used in combination with ANALYZER_NORETURN to avoid 'noreturn'
152
+// returns warnings.
153
+//
154
+#ifndef ANALYZER_UNREACHABLE
155
+  #ifdef __clang_analyzer__
156
+    #if __has_builtin (__builtin_unreachable)
157
+      ///
158
+      /// Signal the analyzer that this call is not reachable.
159
+      /// This excludes compilers.
160
+      ///
161
+      #define ANALYZER_UNREACHABLE()  __builtin_unreachable ()
162
+    #endif
163
+  #endif
164
+
165
+  #ifndef ANALYZER_UNREACHABLE
166
+    ///
167
+    /// Signal the analyzer that this call is not reachable.
168
+    /// This excludes compilers.
169
+    ///
170
+    #define ANALYZER_UNREACHABLE()
171
+  #endif
172
+#endif
173
+
174
+//
175
+// Static Analyzers may issue errors about potential NULL-dereferences when
176
+// dereferencing a pointer, that has been checked before, outside of a
177
+// NULL-check.  This may lead to false positives, such as when using ASSERT()
178
+// for verification.
179
+//
180
+#ifndef ANALYZER_NORETURN
181
+  #ifdef __has_feature
182
+    #if __has_feature (attribute_analyzer_noreturn)
183
+      ///
184
+      /// Signal analyzers that the function cannot return.
185
+      /// This excludes compilers.
186
+      ///
187
+      #define ANALYZER_NORETURN  __attribute__((analyzer_noreturn))
188
+    #endif
189
+  #endif
190
+
191
+  #ifndef ANALYZER_NORETURN
192
+    ///
193
+    /// Signal the analyzer that the function cannot return.
194
+    /// This excludes compilers.
195
+    ///
196
+    #define ANALYZER_NORETURN
197
+  #endif
198
+#endif
199
+
89
 //
200
 //
90
 // For symbol name in assembly code, an extra "_" is sometimes necessary
201
 // For symbol name in assembly code, an extra "_" is sometimes necessary
91
 //
202
 //
193
 
304
 
194
 //
305
 //
195
 //  UEFI specification claims 1 and 0. We are concerned about the
306
 //  UEFI specification claims 1 and 0. We are concerned about the
196
-//  complier portability so we did it this way.
307
+//  compiler portability so we did it this way.
197
 //
308
 //
198
 
309
 
199
 ///
310
 ///
480
 
591
 
481
 #define VA_COPY(Dest, Start)          __va_copy (Dest, Start)
592
 #define VA_COPY(Dest, Start)          __va_copy (Dest, Start)
482
 
593
 
483
-#elif defined(__GNUC__) && !defined(NO_BUILTIN_VA_FUNCS)
594
+#elif defined(__GNUC__)
595
+
596
+#if defined(MDE_CPU_X64) && !defined(NO_MSABI_VA_FUNCS)
597
+//
598
+// X64 only. Use MS ABI version of GCC built-in macros for variable argument lists.
599
+//
600
+///
601
+/// Both GCC and LLVM 3.8 for X64 support new variable argument intrinsics for Microsoft ABI
602
+///
603
+
604
+///
605
+/// Variable used to traverse the list of arguments. This type can vary by
606
+/// implementation and could be an array or structure.
607
+///
608
+typedef __builtin_ms_va_list VA_LIST;
609
+
610
+#define VA_START(Marker, Parameter)  __builtin_ms_va_start (Marker, Parameter)
611
+
612
+#define VA_ARG(Marker, TYPE)         ((sizeof (TYPE) < sizeof (UINTN)) ? (TYPE)(__builtin_va_arg (Marker, UINTN)) : (TYPE)(__builtin_va_arg (Marker, TYPE)))
613
+
614
+#define VA_END(Marker)               __builtin_ms_va_end (Marker)
615
+
616
+#define VA_COPY(Dest, Start)         __builtin_ms_va_copy (Dest, Start)
617
+
618
+#else
484
 //
619
 //
485
 // Use GCC built-in macros for variable argument lists.
620
 // Use GCC built-in macros for variable argument lists.
486
 //
621
 //
499
 
634
 
500
 #define VA_COPY(Dest, Start)         __builtin_va_copy (Dest, Start)
635
 #define VA_COPY(Dest, Start)         __builtin_va_copy (Dest, Start)
501
 
636
 
637
+#endif
638
+
502
 #else
639
 #else
503
 ///
640
 ///
504
 /// Variable used to traverse the list of arguments. This type can vary by
641
 /// Variable used to traverse the list of arguments. This type can vary by
1038
 #if defined(_MSC_EXTENSIONS) && !defined (__INTEL_COMPILER) && !defined (MDE_CPU_EBC)
1175
 #if defined(_MSC_EXTENSIONS) && !defined (__INTEL_COMPILER) && !defined (MDE_CPU_EBC)
1039
   #pragma intrinsic(_ReturnAddress)
1176
   #pragma intrinsic(_ReturnAddress)
1040
   /**
1177
   /**
1041
-    Get the return address of the calling funcation.
1178
+    Get the return address of the calling function.
1042
 
1179
 
1043
     Based on intrinsic function _ReturnAddress that provides the address of
1180
     Based on intrinsic function _ReturnAddress that provides the address of
1044
     the instruction in the calling function that will be executed after
1181
     the instruction in the calling function that will be executed after
1046
 
1183
 
1047
     @param L    Return Level.
1184
     @param L    Return Level.
1048
 
1185
 
1049
-    @return The return address of the calling funcation or 0 if L != 0.
1186
+    @return The return address of the calling function or 0 if L != 0.
1050
 
1187
 
1051
   **/
1188
   **/
1052
   #define RETURN_ADDRESS(L)     ((L == 0) ? _ReturnAddress() : (VOID *) 0)
1189
   #define RETURN_ADDRESS(L)     ((L == 0) ? _ReturnAddress() : (VOID *) 0)
1053
 #elif defined(__GNUC__)
1190
 #elif defined(__GNUC__)
1054
   void * __builtin_return_address (unsigned int level);
1191
   void * __builtin_return_address (unsigned int level);
1055
   /**
1192
   /**
1056
-    Get the return address of the calling funcation.
1193
+    Get the return address of the calling function.
1057
 
1194
 
1058
     Based on built-in Function __builtin_return_address that returns
1195
     Based on built-in Function __builtin_return_address that returns
1059
     the return address of the current function, or of one of its callers.
1196
     the return address of the current function, or of one of its callers.
1060
 
1197
 
1061
     @param L    Return Level.
1198
     @param L    Return Level.
1062
 
1199
 
1063
-    @return The return address of the calling funcation.
1200
+    @return The return address of the calling function.
1064
 
1201
 
1065
   **/
1202
   **/
1066
   #define RETURN_ADDRESS(L)     __builtin_return_address (L)
1203
   #define RETURN_ADDRESS(L)     __builtin_return_address (L)
1067
 #else
1204
 #else
1068
   /**
1205
   /**
1069
-    Get the return address of the calling funcation.
1206
+    Get the return address of the calling function.
1070
 
1207
 
1071
     @param L    Return Level.
1208
     @param L    Return Level.
1072
 
1209
 

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

81
 #pragma warning ( disable : 4057 )
81
 #pragma warning ( disable : 4057 )
82
 
82
 
83
 //
83
 //
84
-// ASSERT(FALSE) or while (TRUE) are legal constructes so supress this warning
84
+// ASSERT(FALSE) or while (TRUE) are legal constructs so suppress this warning
85
 //
85
 //
86
 #pragma warning ( disable : 4127 )
86
 #pragma warning ( disable : 4127 )
87
 
87
 
121
 #if defined(_MSC_EXTENSIONS)
121
 #if defined(_MSC_EXTENSIONS)
122
 
122
 
123
   //
123
   //
124
-  // use Microsoft C complier dependent integer width types
124
+  // use Microsoft C compiler dependent integer width types
125
   //
125
   //
126
 
126
 
127
   ///
127
   ///

+ 38
- 18
src/include/ipxe/efi/IndustryStandard/Pci22.h View File

5
     PCI Local Bus Specification, 2.2
5
     PCI Local Bus Specification, 2.2
6
     PCI-to-PCI Bridge Architecture Specification, Revision 1.2
6
     PCI-to-PCI Bridge Architecture Specification, Revision 1.2
7
     PC Card Standard, 8.0
7
     PC Card Standard, 8.0
8
+    PCI Power Management Interface Specifiction, Revision 1.2
8
 
9
 
9
-
10
-
11
-  Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
12
-  Copyright (c) 2014 - 2105, Hewlett-Packard Development Company, L.P.<BR>
10
+  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
11
+  Copyright (c) 2014 - 2015, Hewlett-Packard Development Company, L.P.<BR>
13
   This program and the accompanying materials
12
   This program and the accompanying materials
14
   are licensed and made available under the terms and conditions of the BSD License
13
   are licensed and made available under the terms and conditions of the BSD License
15
   which accompanies this distribution.  The full text of the license may be found at
14
   which accompanies this distribution.  The full text of the license may be found at
638
 #define EFI_PCI_CAPABILITY_ID_SLOTID  0x04
637
 #define EFI_PCI_CAPABILITY_ID_SLOTID  0x04
639
 #define EFI_PCI_CAPABILITY_ID_MSI     0x05
638
 #define EFI_PCI_CAPABILITY_ID_MSI     0x05
640
 #define EFI_PCI_CAPABILITY_ID_HOTPLUG 0x06
639
 #define EFI_PCI_CAPABILITY_ID_HOTPLUG 0x06
640
+#define EFI_PCI_CAPABILITY_ID_SHPC    0x0C
641
 
641
 
642
 ///
642
 ///
643
 /// Capabilities List Header
643
 /// Capabilities List Header
648
   UINT8 NextItemPtr;
648
   UINT8 NextItemPtr;
649
 } EFI_PCI_CAPABILITY_HDR;
649
 } EFI_PCI_CAPABILITY_HDR;
650
 
650
 
651
-///
652
-/// Power Management Register Block Definition
653
-/// Section 3.2, PCI Power Management Interface Specifiction, Revision 1.2
654
-///
655
-typedef struct {
656
-  EFI_PCI_CAPABILITY_HDR  Hdr;
657
-  UINT16                  PMC;
658
-  UINT16                  PMCSR;
659
-  UINT8                   BridgeExtention;
660
-  UINT8                   Data;
661
-} EFI_PCI_CAPABILITY_PMI;
662
-
663
 ///
651
 ///
664
 /// PMC - Power Management Capabilities
652
 /// PMC - Power Management Capabilities
665
 /// Section 3.2.3, PCI Power Management Interface Specifiction, Revision 1.2
653
 /// Section 3.2.3, PCI Power Management Interface Specifiction, Revision 1.2
668
   struct {
656
   struct {
669
     UINT16 Version : 3;
657
     UINT16 Version : 3;
670
     UINT16 PmeClock : 1;
658
     UINT16 PmeClock : 1;
671
-    UINT16 : 1;
659
+    UINT16 Reserved : 1;
672
     UINT16 DeviceSpecificInitialization : 1;
660
     UINT16 DeviceSpecificInitialization : 1;
673
     UINT16 AuxCurrent : 3;
661
     UINT16 AuxCurrent : 3;
674
     UINT16 D1Support : 1;
662
     UINT16 D1Support : 1;
687
 typedef union {
675
 typedef union {
688
   struct {
676
   struct {
689
     UINT16 PowerState : 2;
677
     UINT16 PowerState : 2;
690
-    UINT16 : 6;
678
+    UINT16 ReservedForPciExpress : 1;
679
+    UINT16 NoSoftReset : 1;
680
+    UINT16 Reserved : 4;
691
     UINT16 PmeEnable : 1;
681
     UINT16 PmeEnable : 1;
692
     UINT16 DataSelect : 4;
682
     UINT16 DataSelect : 4;
693
     UINT16 DataScale : 2;
683
     UINT16 DataScale : 2;
696
   UINT16 Data;
686
   UINT16 Data;
697
 } EFI_PCI_PMCSR;
687
 } EFI_PCI_PMCSR;
698
 
688
 
689
+#define PCI_POWER_STATE_D0     0
690
+#define PCI_POWER_STATE_D1     1
691
+#define PCI_POWER_STATE_D2     2
692
+#define PCI_POWER_STATE_D3_HOT 3
693
+
694
+///
695
+/// PMCSR_BSE - PMCSR PCI-to-PCI Bridge Support Extensions
696
+/// Section 3.2.5, PCI Power Management Interface Specifiction, Revision 1.2
697
+///
698
+typedef union {
699
+  struct {
700
+    UINT8 Reserved : 6;
701
+    UINT8 B2B3 : 1;
702
+    UINT8 BusPowerClockControl : 1;
703
+  } Bits;
704
+  UINT8   Uint8;
705
+} EFI_PCI_PMCSR_BSE;
706
+
707
+///
708
+/// Power Management Register Block Definition
709
+/// Section 3.2, PCI Power Management Interface Specifiction, Revision 1.2
710
+///
711
+typedef struct {
712
+  EFI_PCI_CAPABILITY_HDR  Hdr;
713
+  EFI_PCI_PMC             PMC;
714
+  EFI_PCI_PMCSR           PMCSR;
715
+  EFI_PCI_PMCSR_BSE       BridgeExtention;
716
+  UINT8                   Data;
717
+} EFI_PCI_CAPABILITY_PMI;
718
+
699
 ///
719
 ///
700
 /// A.G.P Capability
720
 /// A.G.P Capability
701
 /// Section 6.1.4, Accelerated Graphics Port Interface Specification, Revision 1.0
721
 /// Section 6.1.4, Accelerated Graphics Port Interface Specification, Revision 1.0

+ 141
- 2
src/include/ipxe/efi/Library/BaseLib.h View File

2
   Provides string functions, linked list functions, math functions, synchronization
2
   Provides string functions, linked list functions, math functions, synchronization
3
   functions, file path functions, and CPU architecture-specific functions.
3
   functions, file path functions, and CPU architecture-specific functions.
4
 
4
 
5
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
5
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
6
 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
6
 Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
7
 This program and the accompanying materials
7
 This program and the accompanying materials
8
 are licensed and made available under the terms and conditions of the BSD License
8
 are licensed and made available under the terms and conditions of the BSD License
189
 /**
189
 /**
190
   Returns the length of a Null-terminated Unicode string.
190
   Returns the length of a Null-terminated Unicode string.
191
 
191
 
192
+  This function is similar as strlen_s defined in C11.
193
+
192
   If String is not aligned on a 16-bit boundary, then ASSERT().
194
   If String is not aligned on a 16-bit boundary, then ASSERT().
193
 
195
 
194
   @param  String   A pointer to a Null-terminated Unicode string.
196
   @param  String   A pointer to a Null-terminated Unicode string.
211
   Copies the string pointed to by Source (including the terminating null char)
213
   Copies the string pointed to by Source (including the terminating null char)
212
   to the array pointed to by Destination.
214
   to the array pointed to by Destination.
213
 
215
 
216
+  This function is similar as strcpy_s defined in C11.
217
+
214
   If Destination is not aligned on a 16-bit boundary, then ASSERT().
218
   If Destination is not aligned on a 16-bit boundary, then ASSERT().
215
   If Source is not aligned on a 16-bit boundary, then ASSERT().
219
   If Source is not aligned on a 16-bit boundary, then ASSERT().
216
   If an error would be returned, then the function will also ASSERT().
220
   If an error would be returned, then the function will also ASSERT().
217
 
221
 
222
+  If an error is returned, then the Destination is unmodified.
223
+
218
   @param  Destination              A pointer to a Null-terminated Unicode string.
224
   @param  Destination              A pointer to a Null-terminated Unicode string.
219
   @param  DestMax                  The maximum number of Destination Unicode
225
   @param  DestMax                  The maximum number of Destination Unicode
220
                                    char, including terminating null char.
226
                                    char, including terminating null char.
243
   Source to the array pointed to by Destination. If no null char is copied from
249
   Source to the array pointed to by Destination. If no null char is copied from
244
   Source, then Destination[Length] is always set to null.
250
   Source, then Destination[Length] is always set to null.
245
 
251
 
252
+  This function is similar as strncpy_s defined in C11.
253
+
246
   If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().
254
   If Length > 0 and Destination is not aligned on a 16-bit boundary, then ASSERT().
247
   If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
255
   If Length > 0 and Source is not aligned on a 16-bit boundary, then ASSERT().
248
   If an error would be returned, then the function will also ASSERT().
256
   If an error would be returned, then the function will also ASSERT().
249
 
257
 
258
+  If an error is returned, then the Destination is unmodified.
259
+
250
   @param  Destination              A pointer to a Null-terminated Unicode string.
260
   @param  Destination              A pointer to a Null-terminated Unicode string.
251
   @param  DestMax                  The maximum number of Destination Unicode
261
   @param  DestMax                  The maximum number of Destination Unicode
252
                                    char, including terminating null char.
262
                                    char, including terminating null char.
277
   Appends a copy of the string pointed to by Source (including the terminating
287
   Appends a copy of the string pointed to by Source (including the terminating
278
   null char) to the end of the string pointed to by Destination.
288
   null char) to the end of the string pointed to by Destination.
279
 
289
 
290
+  This function is similar as strcat_s defined in C11.
291
+
280
   If Destination is not aligned on a 16-bit boundary, then ASSERT().
292
   If Destination is not aligned on a 16-bit boundary, then ASSERT().
281
   If Source is not aligned on a 16-bit boundary, then ASSERT().
293
   If Source is not aligned on a 16-bit boundary, then ASSERT().
282
   If an error would be returned, then the function will also ASSERT().
294
   If an error would be returned, then the function will also ASSERT().
283
 
295
 
296
+  If an error is returned, then the Destination is unmodified.
297
+
284
   @param  Destination              A pointer to a Null-terminated Unicode string.
298
   @param  Destination              A pointer to a Null-terminated Unicode string.
285
   @param  DestMax                  The maximum number of Destination Unicode
299
   @param  DestMax                  The maximum number of Destination Unicode
286
                                    char, including terminating null char.
300
                                    char, including terminating null char.
313
   copied from Source, then Destination[StrLen(Destination) + Length] is always
327
   copied from Source, then Destination[StrLen(Destination) + Length] is always
314
   set to null.
328
   set to null.
315
 
329
 
330
+  This function is similar as strncat_s defined in C11.
331
+
316
   If Destination is not aligned on a 16-bit boundary, then ASSERT().
332
   If Destination is not aligned on a 16-bit boundary, then ASSERT().
317
   If Source is not aligned on a 16-bit boundary, then ASSERT().
333
   If Source is not aligned on a 16-bit boundary, then ASSERT().
318
   If an error would be returned, then the function will also ASSERT().
334
   If an error would be returned, then the function will also ASSERT().
319
 
335
 
336
+  If an error is returned, then the Destination is unmodified.
337
+
320
   @param  Destination              A pointer to a Null-terminated Unicode string.
338
   @param  Destination              A pointer to a Null-terminated Unicode string.
321
   @param  DestMax                  The maximum number of Destination Unicode
339
   @param  DestMax                  The maximum number of Destination Unicode
322
                                    char, including terminating null char.
340
                                    char, including terminating null char.
348
 /**
366
 /**
349
   Returns the length of a Null-terminated Ascii string.
367
   Returns the length of a Null-terminated Ascii string.
350
 
368
 
369
+  This function is similar as strlen_s defined in C11.
370
+
351
   @param  String   A pointer to a Null-terminated Ascii string.
371
   @param  String   A pointer to a Null-terminated Ascii string.
352
   @param  MaxSize  The maximum number of Destination Ascii
372
   @param  MaxSize  The maximum number of Destination Ascii
353
                    char, including terminating null char.
373
                    char, including terminating null char.
368
   Copies the string pointed to by Source (including the terminating null char)
388
   Copies the string pointed to by Source (including the terminating null char)
369
   to the array pointed to by Destination.
389
   to the array pointed to by Destination.
370
 
390
 
391
+  This function is similar as strcpy_s defined in C11.
392
+
371
   If an error would be returned, then the function will also ASSERT().
393
   If an error would be returned, then the function will also ASSERT().
372
 
394
 
395
+  If an error is returned, then the Destination is unmodified.
396
+
373
   @param  Destination              A pointer to a Null-terminated Ascii string.
397
   @param  Destination              A pointer to a Null-terminated Ascii string.
374
   @param  DestMax                  The maximum number of Destination Ascii
398
   @param  DestMax                  The maximum number of Destination Ascii
375
                                    char, including terminating null char.
399
                                    char, including terminating null char.
398
   Source to the array pointed to by Destination. If no null char is copied from
422
   Source to the array pointed to by Destination. If no null char is copied from
399
   Source, then Destination[Length] is always set to null.
423
   Source, then Destination[Length] is always set to null.
400
 
424
 
425
+  This function is similar as strncpy_s defined in C11.
426
+
401
   If an error would be returned, then the function will also ASSERT().
427
   If an error would be returned, then the function will also ASSERT().
402
 
428
 
429
+  If an error is returned, then the Destination is unmodified.
430
+
403
   @param  Destination              A pointer to a Null-terminated Ascii string.
431
   @param  Destination              A pointer to a Null-terminated Ascii string.
404
   @param  DestMax                  The maximum number of Destination Ascii
432
   @param  DestMax                  The maximum number of Destination Ascii
405
                                    char, including terminating null char.
433
                                    char, including terminating null char.
430
   Appends a copy of the string pointed to by Source (including the terminating
458
   Appends a copy of the string pointed to by Source (including the terminating
431
   null char) to the end of the string pointed to by Destination.
459
   null char) to the end of the string pointed to by Destination.
432
 
460
 
461
+  This function is similar as strcat_s defined in C11.
462
+
433
   If an error would be returned, then the function will also ASSERT().
463
   If an error would be returned, then the function will also ASSERT().
434
 
464
 
465
+  If an error is returned, then the Destination is unmodified.
466
+
435
   @param  Destination              A pointer to a Null-terminated Ascii string.
467
   @param  Destination              A pointer to a Null-terminated Ascii string.
436
   @param  DestMax                  The maximum number of Destination Ascii
468
   @param  DestMax                  The maximum number of Destination Ascii
437
                                    char, including terminating null char.
469
                                    char, including terminating null char.
464
   copied from Source, then Destination[StrLen(Destination) + Length] is always
496
   copied from Source, then Destination[StrLen(Destination) + Length] is always
465
   set to null.
497
   set to null.
466
 
498
 
499
+  This function is similar as strncat_s defined in C11.
500
+
467
   If an error would be returned, then the function will also ASSERT().
501
   If an error would be returned, then the function will also ASSERT().
468
 
502
 
503
+  If an error is returned, then the Destination is unmodified.
504
+
469
   @param  Destination              A pointer to a Null-terminated Ascii string.
505
   @param  Destination              A pointer to a Null-terminated Ascii string.
470
   @param  DestMax                  The maximum number of Destination Ascii
506
   @param  DestMax                  The maximum number of Destination Ascii
471
                                    char, including terminating null char.
507
                                    char, including terminating null char.
986
   IN      CONST CHAR16             *String
1022
   IN      CONST CHAR16             *String
987
   );
1023
   );
988
 
1024
 
1025
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
1026
+
989
 /**
1027
 /**
1028
+  [ATTENTION] This function is deprecated for security reason.
1029
+
990
   Convert a Null-terminated Unicode string to a Null-terminated
1030
   Convert a Null-terminated Unicode string to a Null-terminated
991
   ASCII string and returns the ASCII string.
1031
   ASCII string and returns the ASCII string.
992
 
1032
 
1026
   OUT     CHAR8                     *Destination
1066
   OUT     CHAR8                     *Destination
1027
   );
1067
   );
1028
 
1068
 
1069
+#endif
1070
+
1071
+/**
1072
+  Convert a Null-terminated Unicode string to a Null-terminated
1073
+  ASCII string.
1074
+
1075
+  This function is similar to AsciiStrCpyS.
1076
+
1077
+  This function converts the content of the Unicode string Source
1078
+  to the ASCII string Destination by copying the lower 8 bits of
1079
+  each Unicode character. The function terminates the ASCII string
1080
+  Destination by appending a Null-terminator character at the end.
1081
+
1082
+  The caller is responsible to make sure Destination points to a buffer with size
1083
+  equal or greater than ((StrLen (Source) + 1) * sizeof (CHAR8)) in bytes.
1084
+
1085
+  If any Unicode characters in Source contain non-zero value in
1086
+  the upper 8 bits, then ASSERT().
1087
+
1088
+  If Source is not aligned on a 16-bit boundary, then ASSERT().
1089
+  If an error would be returned, then the function will also ASSERT().
1090
+
1091
+  If an error is returned, then the Destination is unmodified.
1092
+
1093
+  @param  Source        The pointer to a Null-terminated Unicode string.
1094
+  @param  Destination   The pointer to a Null-terminated ASCII string.
1095
+  @param  DestMax       The maximum number of Destination Ascii
1096
+                        char, including terminating null char.
1097
+
1098
+  @retval RETURN_SUCCESS           String is converted.
1099
+  @retval RETURN_BUFFER_TOO_SMALL  If DestMax is NOT greater than StrLen(Source).
1100
+  @retval RETURN_INVALID_PARAMETER If Destination is NULL.
1101
+                                   If Source is NULL.
1102
+                                   If PcdMaximumAsciiStringLength is not zero,
1103
+                                    and DestMax is greater than
1104
+                                    PcdMaximumAsciiStringLength.
1105
+                                   If PcdMaximumUnicodeStringLength is not zero,
1106
+                                    and DestMax is greater than
1107
+                                    PcdMaximumUnicodeStringLength.
1108
+                                   If DestMax is 0.
1109
+  @retval RETURN_ACCESS_DENIED     If Source and Destination overlap.
1110
+
1111
+**/
1112
+RETURN_STATUS
1113
+EFIAPI
1114
+UnicodeStrToAsciiStrS (
1115
+  IN      CONST CHAR16              *Source,
1116
+  OUT     CHAR8                     *Destination,
1117
+  IN      UINTN                     DestMax
1118
+  );
1029
 
1119
 
1030
 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
1120
 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES
1031
 
1121
 
1529
   IN      CONST CHAR8                *String
1619
   IN      CONST CHAR8                *String
1530
   );
1620
   );
1531
 
1621
 
1622
+#ifndef DISABLE_NEW_DEPRECATED_INTERFACES
1532
 
1623
 
1533
 /**
1624
 /**
1625
+  [ATTENTION] This function is deprecated for security reason.
1626
+
1534
   Convert one Null-terminated ASCII string to a Null-terminated
1627
   Convert one Null-terminated ASCII string to a Null-terminated
1535
   Unicode string and returns the Unicode string.
1628
   Unicode string and returns the Unicode string.
1536
 
1629
 
1564
   OUT     CHAR16                    *Destination
1657
   OUT     CHAR16                    *Destination
1565
   );
1658
   );
1566
 
1659
 
1660
+#endif
1661
+
1662
+/**
1663
+  Convert one Null-terminated ASCII string to a Null-terminated
1664
+  Unicode string.
1665
+
1666
+  This function is similar to StrCpyS.
1667
+
1668
+  This function converts the contents of the ASCII string Source to the Unicode
1669
+  string Destination. The function terminates the Unicode string Destination by
1670
+  appending a Null-terminator character at the end.
1671
+
1672
+  The caller is responsible to make sure Destination points to a buffer with size
1673
+  equal or greater than ((AsciiStrLen (Source) + 1) * sizeof (CHAR16)) in bytes.
1674
+
1675
+  If Destination is not aligned on a 16-bit boundary, then ASSERT().
1676
+  If an error would be returned, then the function will also ASSERT().
1677
+
1678
+  If an error is returned, then the Destination is unmodified.
1679
+
1680
+  @param  Source        The pointer to a Null-terminated ASCII string.
1681
+  @param  Destination   The pointer to a Null-terminated Unicode string.
1682
+  @param  DestMax       The maximum number of Destination Unicode
1683
+                        char, including terminating null char.
1684
+
1685
+  @retval RETURN_SUCCESS           String is converted.
1686
+  @retval RETURN_BUFFER_TOO_SMALL  If DestMax is NOT greater than StrLen(Source).
1687
+  @retval RETURN_INVALID_PARAMETER If Destination is NULL.
1688
+                                   If Source is NULL.
1689
+                                   If PcdMaximumUnicodeStringLength is not zero,
1690
+                                    and DestMax is greater than
1691
+                                    PcdMaximumUnicodeStringLength.
1692
+                                   If PcdMaximumAsciiStringLength is not zero,
1693
+                                    and DestMax is greater than
1694
+                                    PcdMaximumAsciiStringLength.
1695
+                                   If DestMax is 0.
1696
+  @retval RETURN_ACCESS_DENIED     If Source and Destination overlap.
1697
+
1698
+**/
1699
+RETURN_STATUS
1700
+EFIAPI
1701
+AsciiStrToUnicodeStrS (
1702
+  IN      CONST CHAR8               *Source,
1703
+  OUT     CHAR16                    *Destination,
1704
+  IN      UINTN                     DestMax
1705
+  );
1567
 
1706
 
1568
 /**
1707
 /**
1569
   Converts an 8-bit value to an 8-bit BCD value.
1708
   Converts an 8-bit value to an 8-bit BCD value.
1635
 
1774
 
1636
   @param[in] Path       The pointer to the string containing the path.
1775
   @param[in] Path       The pointer to the string containing the path.
1637
 
1776
 
1638
-  @return       Returns Path, otherwise returns NULL to indicate that an error has occured.
1777
+  @return       Returns Path, otherwise returns NULL to indicate that an error has occurred.
1639
 **/
1778
 **/
1640
 CHAR16*
1779
 CHAR16*
1641
 EFIAPI
1780
 EFIAPI

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

1
 /** @file
1
 /** @file
2
   HOB related definitions in PI.
2
   HOB related definitions in PI.
3
 
3
 
4
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
4
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
5
 This program and the accompanying materials are licensed and made available under
5
 This program and the accompanying materials are licensed and made available under
6
 the terms and conditions of the BSD License that accompanies this distribution.
6
 the terms and conditions of the BSD License that accompanies this distribution.
7
 The full text of the license may be found at
7
 The full text of the license may be found at
11
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
11
 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
 
12
 
13
   @par Revision Reference:
13
   @par Revision Reference:
14
-  PI Version 1.4
14
+  PI Version 1.4a
15
 
15
 
16
 **/
16
 **/
17
 
17
 
295
 #define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE              0x01000000
295
 #define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE              0x01000000
296
 
296
 
297
 #define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED      0x00040000
297
 #define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED      0x00040000
298
-#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE    0x00800000
298
+#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE    0x00080000
299
 
299
 
300
 //
300
 //
301
 // Physical memory relative reliability attribute. This
301
 // Physical memory relative reliability attribute. This

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

5
   from a software point of view. The path must persist from boot to boot, so
5
   from a software point of view. The path must persist from boot to boot, so
6
   it can not contain things like PCI bus numbers that change from boot to boot.
6
   it can not contain things like PCI bus numbers that change from boot to boot.
7
 
7
 
8
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
8
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
9
 This program and the accompanying materials are licensed and made available under
9
 This program and the accompanying materials are licensed and made available under
10
 the terms and conditions of the BSD License that accompanies this distribution.
10
 the terms and conditions of the BSD License that accompanies this distribution.
11
 The full text of the license may be found at
11
 The full text of the license may be found at
511
   UINT16                          HBAPortNumber;
511
   UINT16                          HBAPortNumber;
512
   ///
512
   ///
513
   /// The Port multiplier port number that facilitates the connection
513
   /// The Port multiplier port number that facilitates the connection
514
-  /// to the device. Bit 15 should be set if the device is directly
514
+  /// to the device. Must be set to 0xFFFF if the device is directly
515
   /// connected to the HBA.
515
   /// connected to the HBA.
516
   ///
516
   ///
517
   UINT16                          PortMultiplierPortNumber;
517
   UINT16                          PortMultiplierPortNumber;
856
   UINT8                           SlotNumber;
856
   UINT8                           SlotNumber;
857
 } SD_DEVICE_PATH;
857
 } SD_DEVICE_PATH;
858
 
858
 
859
+///
860
+/// EMMC (Embedded MMC) Device Path SubType.
861
+///
862
+#define MSG_EMMC_DP                 0x1D
863
+typedef struct {
864
+  EFI_DEVICE_PATH_PROTOCOL        Header;
865
+  UINT8                           SlotNumber;
866
+} EMMC_DEVICE_PATH;
867
+
859
 ///
868
 ///
860
 /// iSCSI Device Path SubType
869
 /// iSCSI Device Path SubType
861
 ///
870
 ///
1241
   WIFI_DEVICE_PATH                           WiFi;
1250
   WIFI_DEVICE_PATH                           WiFi;
1242
   UFS_DEVICE_PATH                            Ufs;
1251
   UFS_DEVICE_PATH                            Ufs;
1243
   SD_DEVICE_PATH                             Sd;
1252
   SD_DEVICE_PATH                             Sd;
1253
+  EMMC_DEVICE_PATH                           Emmc;
1244
   HARDDRIVE_DEVICE_PATH                      HardDrive;
1254
   HARDDRIVE_DEVICE_PATH                      HardDrive;
1245
   CDROM_DEVICE_PATH                          CD;
1255
   CDROM_DEVICE_PATH                          CD;
1246
 
1256
 
1297
   WIFI_DEVICE_PATH                           *WiFi;
1307
   WIFI_DEVICE_PATH                           *WiFi;
1298
   UFS_DEVICE_PATH                            *Ufs;
1308
   UFS_DEVICE_PATH                            *Ufs;
1299
   SD_DEVICE_PATH                             *Sd;
1309
   SD_DEVICE_PATH                             *Sd;
1310
+  EMMC_DEVICE_PATH                           *Emmc;
1300
   HARDDRIVE_DEVICE_PATH                      *HardDrive;
1311
   HARDDRIVE_DEVICE_PATH                      *HardDrive;
1301
   CDROM_DEVICE_PATH                          *CD;
1312
   CDROM_DEVICE_PATH                          *CD;
1302
 
1313
 

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

1
 /** @file
1
 /** @file
2
   The file provides services to access to images in the images database.
2
   The file provides services to access to images in the images database.
3
 
3
 
4
-  Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
4
+  Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
5
   This program and the accompanying materials
5
   This program and the accompanying materials
6
   are licensed and made available under the terms and conditions of the BSD License
6
   are licensed and made available under the terms and conditions of the BSD License
7
   which accompanies this distribution.  The full text of the license may be found at
7
   which accompanies this distribution.  The full text of the license may be found at
17
 
17
 
18
 FILE_LICENCE ( BSD3 );
18
 FILE_LICENCE ( BSD3 );
19
 
19
 
20
+#include <ipxe/efi/Protocol/GraphicsOutput.h>
21
+
20
 #define EFI_HII_IMAGE_PROTOCOL_GUID \
22
 #define EFI_HII_IMAGE_PROTOCOL_GUID \
21
   { 0x31a6406a, 0x6bdf, 0x4e46, { 0xb2, 0xa2, 0xeb, 0xaa, 0x89, 0xc4, 0x9, 0x20 } }
23
   { 0x31a6406a, 0x6bdf, 0x4e46, { 0xb2, 0xa2, 0xeb, 0xaa, 0x89, 0xc4, 0x9, 0x20 } }
22
 
24
 

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

1
 /** @file
1
 /** @file
2
-  EFI Multicast Trivial File Tranfer Protocol Definition
2
+  EFI Multicast Trivial File Transfer Protocol Definition
3
 
3
 
4
 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
4
 Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
5
 This program and the accompanying materials are licensed and made available under
5
 This program and the accompanying materials are licensed and made available under
214
   );
214
   );
215
 
215
 
216
 /**
216
 /**
217
-  Timeout callback funtion.
217
+  Timeout callback function.
218
 
218
 
219
   @param  This           The pointer to the EFI_MTFTP4_PROTOCOL instance.
219
   @param  This           The pointer to the EFI_MTFTP4_PROTOCOL instance.
220
   @param  Token          The token that is provided in the
220
   @param  Token          The token that is provided in the

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

162
   Reset the text output device hardware and optionaly run diagnostics
162
   Reset the text output device hardware and optionaly run diagnostics
163
 
163
 
164
   @param  This                 The protocol instance pointer.
164
   @param  This                 The protocol instance pointer.
165
-  @param  ExtendedVerification Driver may perform more exhaustive verfication
165
+  @param  ExtendedVerification Driver may perform more exhaustive verification
166
                                operation of the device during reset.
166
                                operation of the device during reset.
167
 
167
 
168
   @retval EFI_SUCCESS          The text output device was reset.
168
   @retval EFI_SUCCESS          The text output device was reset.

+ 23
- 1
src/include/ipxe/efi/Uefi/UefiInternalFormRepresentation.h View File

3
   IFR is primarily consumed by the EFI presentation engine, and produced by EFI
3
   IFR is primarily consumed by the EFI presentation engine, and produced by EFI
4
   internal application and drivers as well as all add-in card option-ROM drivers
4
   internal application and drivers as well as all add-in card option-ROM drivers
5
 
5
 
6
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
6
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>
7
+(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
7
 This program and the accompanying materials are licensed and made available under
8
 This program and the accompanying materials are licensed and made available under
8
 the terms and conditions of the BSD License that accompanies this distribution.
9
 the terms and conditions of the BSD License that accompanies this distribution.
9
 The full text of the license may be found at
10
 The full text of the license may be found at
211
 #define EFI_HII_GIBT_GLYPHS               0x11
212
 #define EFI_HII_GIBT_GLYPHS               0x11
212
 #define EFI_HII_GIBT_GLYPH_DEFAULT        0x12
213
 #define EFI_HII_GIBT_GLYPH_DEFAULT        0x12
213
 #define EFI_HII_GIBT_GLYPHS_DEFAULT       0x13
214
 #define EFI_HII_GIBT_GLYPHS_DEFAULT       0x13
215
+#define EFI_HII_GIBT_GLYPH_VARIABILITY    0x14
214
 #define EFI_HII_GIBT_DUPLICATE            0x20
216
 #define EFI_HII_GIBT_DUPLICATE            0x20
215
 #define EFI_HII_GIBT_SKIP2                0x21
217
 #define EFI_HII_GIBT_SKIP2                0x21
216
 #define EFI_HII_GIBT_SKIP1                0x22
218
 #define EFI_HII_GIBT_SKIP1                0x22
283
   UINT8                  BitmapData[1];
285
   UINT8                  BitmapData[1];
284
 } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK;
286
 } EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK;
285
 
287
 
288
+typedef struct _EFI_HII_GIBT_VARIABILITY_BLOCK {
289
+  EFI_HII_GLYPH_BLOCK    Header;
290
+  EFI_HII_GLYPH_INFO     Cell;
291
+  UINT8                  GlyphPackInBits;
292
+  UINT8                  BitmapData [1];
293
+} EFI_HII_GIBT_VARIABILITY_BLOCK;
294
+
286
 typedef struct _EFI_HII_GIBT_SKIP1_BLOCK {
295
 typedef struct _EFI_HII_GIBT_SKIP1_BLOCK {
287
   EFI_HII_GLYPH_BLOCK    Header;
296
   EFI_HII_GLYPH_BLOCK    Header;
288
   UINT8                  SkipCount;
297
   UINT8                  SkipCount;
491
 #define EFI_HII_IIBT_IMAGE_24BIT       0x16
500
 #define EFI_HII_IIBT_IMAGE_24BIT       0x16
492
 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
501
 #define EFI_HII_IIBT_IMAGE_24BIT_TRANS 0x17
493
 #define EFI_HII_IIBT_IMAGE_JPEG        0x18
502
 #define EFI_HII_IIBT_IMAGE_JPEG        0x18
503
+#define EFI_HII_IIBT_IMAGE_PNG         0x19
494
 #define EFI_HII_IIBT_DUPLICATE         0x20
504
 #define EFI_HII_IIBT_DUPLICATE         0x20
495
 #define EFI_HII_IIBT_SKIP2             0x21
505
 #define EFI_HII_IIBT_SKIP2             0x21
496
 #define EFI_HII_IIBT_SKIP1             0x22
506
 #define EFI_HII_IIBT_SKIP1             0x22
611
   UINT8                        Data[1];
621
   UINT8                        Data[1];
612
 } EFI_HII_IIBT_JPEG_BLOCK;
622
 } EFI_HII_IIBT_JPEG_BLOCK;
613
 
623
 
624
+typedef struct _EFI_HII_IIBT_PNG_BLOCK {
625
+  EFI_HII_IMAGE_BLOCK          Header;
626
+  UINT32                       Size;
627
+  UINT8                        Data[1];
628
+} EFI_HII_IIBT_PNG_BLOCK;
629
+
614
 typedef struct _EFI_HII_IIBT_SKIP1_BLOCK {
630
 typedef struct _EFI_HII_IIBT_SKIP1_BLOCK {
615
   EFI_HII_IMAGE_BLOCK          Header;
631
   EFI_HII_IMAGE_BLOCK          Header;
616
   UINT8                        SkipCount;
632
   UINT8                        SkipCount;
2112
 ///
2128
 ///
2113
 #define STRING_TOKEN(t) t
2129
 #define STRING_TOKEN(t) t
2114
 
2130
 
2131
+///
2132
+/// IMAGE_TOKEN is not defined in UEFI specification. But it is placed
2133
+/// here for the easy access by C files and VFR source files.
2134
+///
2135
+#define IMAGE_TOKEN(t) t
2136
+
2115
 #endif
2137
 #endif

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

1081
 
1081
 
1082
   ///
1082
   ///
1083
   /// protocol driver can provide anything for this Unique_ID, UNDI remembers
1083
   /// protocol driver can provide anything for this Unique_ID, UNDI remembers
1084
-  /// that as just a 64bit value assocaited to the interface specified by
1084
+  /// that as just a 64bit value associated to the interface specified by
1085
   /// the ifnum and gives it back as a parameter to all the call-back routines
1085
   /// the ifnum and gives it back as a parameter to all the call-back routines
1086
   /// when calling for that interface!
1086
   /// when calling for that interface!
1087
   ///
1087
   ///

+ 6
- 2
src/include/ipxe/efi/Uefi/UefiSpec.h View File

1006
 
1006
 
1007
   @param[in]  ResetType         The type of reset to perform.
1007
   @param[in]  ResetType         The type of reset to perform.
1008
   @param[in]  ResetStatus       The status code for the reset.
1008
   @param[in]  ResetStatus       The status code for the reset.
1009
-  @param[in]  DataSize          The size, in bytes, of WatchdogData.
1009
+  @param[in]  DataSize          The size, in bytes, of ResetData.
1010
   @param[in]  ResetData         For a ResetType of EfiResetCold, EfiResetWarm, or
1010
   @param[in]  ResetData         For a ResetType of EfiResetCold, EfiResetWarm, or
1011
                                 EfiResetShutdown the data buffer starts with a Null-terminated
1011
                                 EfiResetShutdown the data buffer starts with a Null-terminated
1012
                                 string, optionally followed by additional binary data.
1012
                                 string, optionally followed by additional binary data.
1013
-
1013
+                                The string is a description that the caller may use to further
1014
+                                indicate the reason for the system reset. ResetData is only
1015
+                                valid if ResetStatus is something other than EFI_SUCCESS
1016
+                                unless the ResetType is EfiResetPlatformSpecific
1017
+                                where a minimum amount of ResetData is always required.
1014
 **/
1018
 **/
1015
 typedef
1019
 typedef
1016
 VOID
1020
 VOID

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

29
 #pragma pack()
29
 #pragma pack()
30
 #endif
30
 #endif
31
 
31
 
32
+#if defined(__GNUC__) && defined(__pic__) && !defined(USING_LTO)
33
+//
34
+// Mark all symbol declarations and references as hidden, meaning they will
35
+// not be subject to symbol preemption. This allows the compiler to refer to
36
+// symbols directly using relative references rather than via the GOT, which
37
+// contains absolute symbol addresses that are subject to runtime relocation.
38
+//
39
+// The LTO linker will not emit GOT based relocations when all symbol
40
+// references can be resolved locally, and so there is no need to set the
41
+// pragma in that case (and doing so will cause other issues).
42
+//
43
+#pragma GCC visibility push (hidden)
44
+#endif
32
 
45
 
33
 #if defined(__INTEL_COMPILER)
46
 #if defined(__INTEL_COMPILER)
34
 //
47
 //
82
 #pragma warning ( disable : 4057 )
95
 #pragma warning ( disable : 4057 )
83
 
96
 
84
 //
97
 //
85
-// ASSERT(FALSE) or while (TRUE) are legal constructes so supress this warning
98
+// ASSERT(FALSE) or while (TRUE) are legal constructs so suppress this warning
86
 //
99
 //
87
 #pragma warning ( disable : 4127 )
100
 #pragma warning ( disable : 4127 )
88
 
101
 
121
 
134
 
122
 #if defined(_MSC_EXTENSIONS)
135
 #if defined(_MSC_EXTENSIONS)
123
   //
136
   //
124
-  // use Microsoft C complier dependent integer width types
137
+  // use Microsoft C compiler dependent integer width types
125
   //
138
   //
126
 
139
 
127
   ///
140
   ///

Loading…
Cancel
Save