david/ipxe
Archived
1
0

[efi] Update to current EDK2 headers

Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown 2014-10-15 14:45:17 +01:00
parent b9a5ff2b03
commit 318b5fca1a
5 changed files with 60 additions and 15 deletions

View 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__
//

View 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

View 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

View 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

View File

@ -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;
}