Bläddra i källkod

[efi] Update to current EDK2 headers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 9 år sedan
förälder
incheckning
318b5fca1a

+ 12
- 13
src/include/ipxe/efi/Base.h Visa fil

@@ -81,21 +81,20 @@ VERIFY_SIZE_OF (CHAR16, 2);
81 81
 #endif
82 82
 
83 83
 //
84
-// For symbol name in GNU assembly code, an extra "_" is necessary
84
+// For symbol name in assembly code, an extra "_" is sometimes necessary
85 85
 //
86
-#if defined(__GNUC__)
87
-  ///
88
-  /// Private worker functions for ASM_PFX()
89
-  ///
90
-  #define _CONCATENATE(a, b)  __CONCATENATE(a, b)
91
-  #define __CONCATENATE(a, b) a ## b
92 86
 
93
-  ///
94
-  /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix
95
-  /// on symbols in assembly language.
96
-  ///
97
-  #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
98
-#endif
87
+///
88
+/// Private worker functions for ASM_PFX()
89
+///
90
+#define _CONCATENATE(a, b)  __CONCATENATE(a, b)
91
+#define __CONCATENATE(a, b) a ## b
92
+
93
+///
94
+/// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix
95
+/// on symbols in assembly language.
96
+///
97
+#define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
99 98
 
100 99
 #if __APPLE__
101 100
   //

+ 4
- 0
src/include/ipxe/efi/Ia32/ProcessorBind.h Visa fil

@@ -286,5 +286,9 @@ typedef INT32   INTN;
286 286
 **/
287 287
 #define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
288 288
 
289
+#ifndef __USER_LABEL_PREFIX__
290
+#define __USER_LABEL_PREFIX__ _
291
+#endif
292
+
289 293
 #endif
290 294
 

+ 39
- 0
src/include/ipxe/efi/IndustryStandard/Pci22.h Visa fil

@@ -6,7 +6,10 @@
6 6
     PCI-to-PCI Bridge Architecture Specification, Revision 1.2
7 7
     PC Card Standard, 8.0
8 8
 
9
+
10
+
9 11
   Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
12
+  Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
10 13
   This program and the accompanying materials
11 14
   are licensed and made available under the terms and conditions of the BSD License
12 15
   which accompanies this distribution.  The full text of the license may be found at
@@ -656,6 +659,42 @@ typedef struct {
656 659
   UINT8                   Data;
657 660
 } EFI_PCI_CAPABILITY_PMI;
658 661
 
662
+///
663
+/// PMC - Power Management Capabilities
664
+/// Section 3.2.3, PCI Power Management Interface Specifiction, Revision 1.2
665
+///
666
+typedef union {
667
+  struct {
668
+    UINT16 Version : 3;
669
+    UINT16 PmeClock : 1;
670
+    UINT16 : 1;
671
+    UINT16 DeviceSpecificInitialization : 1;
672
+    UINT16 AuxCurrent : 3;
673
+    UINT16 D1Support : 1;
674
+    UINT16 D2Support : 1;
675
+    UINT16 PmeSupport : 5;
676
+  } Bits;
677
+  UINT16 Data;
678
+} EFI_PCI_PMC;
679
+
680
+#define EFI_PCI_PMC_D3_COLD_MASK    (BIT15)
681
+
682
+///
683
+/// PMCSR - Power Management Control/Status
684
+/// Section 3.2.4, PCI Power Management Interface Specifiction, Revision 1.2
685
+///
686
+typedef union {
687
+  struct {
688
+    UINT16 PowerState : 2;
689
+    UINT16 : 6;
690
+    UINT16 PmeEnable : 1;
691
+    UINT16 DataSelect : 4;
692
+    UINT16 DataScale : 2;
693
+    UINT16 PmeStatus : 1;
694
+  } Bits;
695
+  UINT16 Data;
696
+} EFI_PCI_PMCSR;
697
+
659 698
 ///
660 699
 /// A.G.P Capability
661 700
 /// Section 6.1.4, Accelerated Graphics Port Interface Specification, Revision 1.0

+ 4
- 0
src/include/ipxe/efi/X64/ProcessorBind.h Visa fil

@@ -292,5 +292,9 @@ typedef INT64   INTN;
292 292
 **/
293 293
 #define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
294 294
 
295
+#ifndef __USER_LABEL_PREFIX__
296
+#define __USER_LABEL_PREFIX__
297
+#endif
298
+
295 299
 #endif
296 300
 

+ 1
- 2
src/include/ipxe/efi/import.pl Visa fil

@@ -78,9 +78,8 @@ sub try_import_file {
78 78
 	# Write out line
79 79
 	print $outfh "$_\n";
80 80
 	# Apply FILE_LICENCE() immediately after include guard
81
-	if ( defined $maybe_guard ) {
81
+	if ( defined $maybe_guard && ! defined $guard ) {
82 82
 	  if ( /^\#define\s+_?_${maybe_guard}_?_$/ ) {
83
-	    die "Duplicate header guard detected in $infile\n" if $guard;
84 83
 	    $guard = $maybe_guard;
85 84
 	    print $outfh "\nFILE_LICENCE ( $licence );\n" if $licence;
86 85
 	  }

Laddar…
Avbryt
Spara