]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Update to current EDK2 headers
authorMichael Brown <mcb30@ipxe.org>
Wed, 15 Oct 2014 13:45:17 +0000 (14:45 +0100)
committerMichael Brown <mcb30@ipxe.org>
Thu, 16 Oct 2014 13:12:42 +0000 (14:12 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/efi/Base.h
src/include/ipxe/efi/Ia32/ProcessorBind.h
src/include/ipxe/efi/IndustryStandard/Pci22.h
src/include/ipxe/efi/X64/ProcessorBind.h
src/include/ipxe/efi/import.pl

index c75a7ae53d6cb77aa1dd7e16d25566d0499a0e7f..844f428f15c09f551a6b4e1492616ecb831dc57f 100644 (file)
@@ -81,21 +81,20 @@ VERIFY_SIZE_OF (CHAR16, 2);
 #endif
 
 //
-// For symbol name in GNU assembly code, an extra "_" is necessary
+// For symbol name in assembly code, an extra "_" is sometimes necessary
 //
-#if defined(__GNUC__)
-  ///
-  /// Private worker functions for ASM_PFX()
-  ///
-  #define _CONCATENATE(a, b)  __CONCATENATE(a, b)
-  #define __CONCATENATE(a, b) a ## b
 
-  ///
-  /// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix
-  /// on symbols in assembly language.
-  ///
-  #define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
-#endif
+///
+/// Private worker functions for ASM_PFX()
+///
+#define _CONCATENATE(a, b)  __CONCATENATE(a, b)
+#define __CONCATENATE(a, b) a ## b
+
+///
+/// The __USER_LABEL_PREFIX__ macro predefined by GNUC represents the prefix
+/// on symbols in assembly language.
+///
+#define ASM_PFX(name) _CONCATENATE (__USER_LABEL_PREFIX__, name)
 
 #if __APPLE__
   //
index b98785b4fcbfea7dcc11d56f073d324d5049721f..16e30b35887b6b834999a560835b552f6d4bc4b1 100644 (file)
@@ -286,5 +286,9 @@ typedef INT32   INTN;
 **/
 #define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
 
+#ifndef __USER_LABEL_PREFIX__
+#define __USER_LABEL_PREFIX__ _
+#endif
+
 #endif
 
index 53654ee42573c6d2931138b12c6965ee4135a41c..a73820f6952407c14e23d5b8e87ce59e1176c1ed 100644 (file)
@@ -6,7 +6,10 @@
     PCI-to-PCI Bridge Architecture Specification, Revision 1.2
     PC Card Standard, 8.0
 
+
+
   Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
   which accompanies this distribution.  The full text of the license may be found at
@@ -656,6 +659,42 @@ typedef struct {
   UINT8                   Data;
 } EFI_PCI_CAPABILITY_PMI;
 
+///
+/// PMC - Power Management Capabilities
+/// Section 3.2.3, PCI Power Management Interface Specifiction, Revision 1.2
+///
+typedef union {
+  struct {
+    UINT16 Version : 3;
+    UINT16 PmeClock : 1;
+    UINT16 : 1;
+    UINT16 DeviceSpecificInitialization : 1;
+    UINT16 AuxCurrent : 3;
+    UINT16 D1Support : 1;
+    UINT16 D2Support : 1;
+    UINT16 PmeSupport : 5;
+  } Bits;
+  UINT16 Data;
+} EFI_PCI_PMC;
+
+#define EFI_PCI_PMC_D3_COLD_MASK    (BIT15)
+
+///
+/// PMCSR - Power Management Control/Status
+/// Section 3.2.4, PCI Power Management Interface Specifiction, Revision 1.2
+///
+typedef union {
+  struct {
+    UINT16 PowerState : 2;
+    UINT16 : 6;
+    UINT16 PmeEnable : 1;
+    UINT16 DataSelect : 4;
+    UINT16 DataScale : 2;
+    UINT16 PmeStatus : 1;
+  } Bits;
+  UINT16 Data;
+} EFI_PCI_PMCSR;
+
 ///
 /// A.G.P Capability
 /// Section 6.1.4, Accelerated Graphics Port Interface Specification, Revision 1.0
index 1d927e648f6b6938b32413414f7018ee06782325..4f21bb8de19a2d22471be7f5648dbdc012898284 100644 (file)
@@ -292,5 +292,9 @@ typedef INT64   INTN;
 **/
 #define FUNCTION_ENTRY_POINT(FunctionPointer) (VOID *)(UINTN)(FunctionPointer)
 
+#ifndef __USER_LABEL_PREFIX__
+#define __USER_LABEL_PREFIX__
+#endif
+
 #endif
 
index 62ee750b25e700d34ee1c326c3e7c722c84c90b0..f5a3f546f8a91ed0f3d7bc030e2c5a3309d556b8 100755 (executable)
@@ -78,9 +78,8 @@ sub try_import_file {
        # Write out line
        print $outfh "$_\n";
        # Apply FILE_LICENCE() immediately after include guard
-       if ( defined $maybe_guard ) {
+       if ( defined $maybe_guard && ! defined $guard ) {
          if ( /^\#define\s+_?_${maybe_guard}_?_$/ ) {
-           die "Duplicate header guard detected in $infile\n" if $guard;
            $guard = $maybe_guard;
            print $outfh "\nFILE_LICENCE ( $licence );\n" if $licence;
          }