aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2014-10-15 14:45:17 +0100
committerMichael Brown <mcb30@ipxe.org>2014-10-16 14:12:42 +0100
commit318b5fca1a0602389b090785aada7783794076ab (patch)
tree97a2f7fad586e499339c95db8a681266b06ab008 /src
parentb9a5ff2b03b7354c9fafdca7e0e6c9b3da151f1c (diff)
downloadipxe-318b5fca1a0602389b090785aada7783794076ab.zip
ipxe-318b5fca1a0602389b090785aada7783794076ab.tar.gz
ipxe-318b5fca1a0602389b090785aada7783794076ab.tar.bz2
[efi] Update to current EDK2 headers
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src')
-rw-r--r--src/include/ipxe/efi/Base.h25
-rw-r--r--src/include/ipxe/efi/Ia32/ProcessorBind.h4
-rw-r--r--src/include/ipxe/efi/IndustryStandard/Pci22.h39
-rw-r--r--src/include/ipxe/efi/X64/ProcessorBind.h4
-rwxr-xr-xsrc/include/ipxe/efi/import.pl3
5 files changed, 60 insertions, 15 deletions
diff --git a/src/include/ipxe/efi/Base.h b/src/include/ipxe/efi/Base.h
index c75a7ae..844f428 100644
--- a/src/include/ipxe/efi/Base.h
+++ b/src/include/ipxe/efi/Base.h
@@ -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__
//
diff --git a/src/include/ipxe/efi/Ia32/ProcessorBind.h b/src/include/ipxe/efi/Ia32/ProcessorBind.h
index b98785b..16e30b3 100644
--- a/src/include/ipxe/efi/Ia32/ProcessorBind.h
+++ b/src/include/ipxe/efi/Ia32/ProcessorBind.h
@@ -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
diff --git a/src/include/ipxe/efi/IndustryStandard/Pci22.h b/src/include/ipxe/efi/IndustryStandard/Pci22.h
index 53654ee..a73820f 100644
--- a/src/include/ipxe/efi/IndustryStandard/Pci22.h
+++ b/src/include/ipxe/efi/IndustryStandard/Pci22.h
@@ -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
@@ -657,6 +660,42 @@ typedef struct {
} 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
///
diff --git a/src/include/ipxe/efi/X64/ProcessorBind.h b/src/include/ipxe/efi/X64/ProcessorBind.h
index 1d927e6..4f21bb8 100644
--- a/src/include/ipxe/efi/X64/ProcessorBind.h
+++ b/src/include/ipxe/efi/X64/ProcessorBind.h
@@ -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
diff --git a/src/include/ipxe/efi/import.pl b/src/include/ipxe/efi/import.pl
index 62ee750..f5a3f54 100755
--- a/src/include/ipxe/efi/import.pl
+++ b/src/include/ipxe/efi/import.pl
@@ -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;
}