Browse Source

[efi] Update to current EDK2 headers

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

+ 12
- 13
src/include/ipxe/efi/Base.h View File

81
 #endif
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
 #if __APPLE__
99
 #if __APPLE__
101
   //
100
   //

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

286
 **/
286
 **/
287
 #define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
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
 #endif
293
 #endif
290
 
294
 

+ 39
- 0
src/include/ipxe/efi/IndustryStandard/Pci22.h View File

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
 
8
 
9
+
10
+
9
   Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
11
   Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
12
+  Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
10
   This program and the accompanying materials
13
   This program and the accompanying materials
11
   are licensed and made available under the terms and conditions of the BSD License
14
   are licensed and made available under the terms and conditions of the BSD License
12
   which accompanies this distribution.  The full text of the license may be found at
15
   which accompanies this distribution.  The full text of the license may be found at
656
   UINT8                   Data;
659
   UINT8                   Data;
657
 } EFI_PCI_CAPABILITY_PMI;
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
 /// A.G.P Capability
699
 /// A.G.P Capability
661
 /// Section 6.1.4, Accelerated Graphics Port Interface Specification, Revision 1.0
700
 /// Section 6.1.4, Accelerated Graphics Port Interface Specification, Revision 1.0

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

292
 **/
292
 **/
293
 #define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
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
 #endif
299
 #endif
296
 
300
 

+ 1
- 2
src/include/ipxe/efi/import.pl View File

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

Loading…
Cancel
Save