Skip to content

Commit

Permalink
[efi] Update to current EDK2 headers
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Oct 7, 2015
1 parent 1880691 commit 42e0c7e
Show file tree
Hide file tree
Showing 28 changed files with 12,442 additions and 373 deletions.
49 changes: 48 additions & 1 deletion src/include/ipxe/efi/Base.h
Expand Up @@ -6,7 +6,7 @@
environment. There are a set of base libraries in the Mde Package that can
be used to implement base modules.
Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
Expand All @@ -29,6 +29,12 @@ FILE_LICENCE ( BSD3 );
//
#include <ipxe/efi/ProcessorBind.h>

#if defined(_MSC_EXTENSIONS)
//
// Disable warning when last field of data structure is a zero sized array.
//
#pragma warning ( disable : 4200 )
#endif

/**
Verifies the storage size of a given data type.
Expand Down Expand Up @@ -1018,5 +1024,46 @@ typedef UINTN RETURN_STATUS;
#define SIGNATURE_64(A, B, C, D, E, F, G, H) \
(SIGNATURE_32 (A, B, C, D) | ((UINT64) (SIGNATURE_32 (E, F, G, H)) << 32))

#if defined(_MSC_EXTENSIONS) && !defined (MDE_CPU_EBC)
#pragma intrinsic(_ReturnAddress)
/**
Get the return address of the calling funcation.
Based on intrinsic function _ReturnAddress that provides the address of
the instruction in the calling function that will be executed after
control returns to the caller.
@param L Return Level.
@return The return address of the calling funcation or 0 if L != 0.
**/
#define RETURN_ADDRESS(L) ((L == 0) ? _ReturnAddress() : (VOID *) 0)
#elif defined(__GNUC__)
void * __builtin_return_address (unsigned int level);
/**
Get the return address of the calling funcation.
Based on built-in Function __builtin_return_address that returns
the return address of the current function, or of one of its callers.
@param L Return Level.
@return The return address of the calling funcation.
**/
#define RETURN_ADDRESS(L) __builtin_return_address (L)
#else
/**
Get the return address of the calling funcation.
@param L Return Level.
@return 0 as compilers don't support this feature.
**/
#define RETURN_ADDRESS(L) ((VOID *) 0)
#endif

#endif

14 changes: 10 additions & 4 deletions src/include/ipxe/efi/Guid/SmBios.h
@@ -1,11 +1,11 @@
/** @file
GUIDs used to locate the SMBIOS tables in the UEFI 2.0 system table.
GUIDs used to locate the SMBIOS tables in the UEFI 2.5 system table.
This GUID in the system table is the only legal way to search for and
These GUIDs in the system table are the only legal ways to search for and
locate the SMBIOS tables. Do not search the 0xF0000 segment to find SMBIOS
tables.
Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<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
Expand All @@ -15,7 +15,7 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
GUIDs defined in UEFI 2.0 spec.
GUIDs defined in UEFI 2.5 spec.
**/

Expand All @@ -29,6 +29,12 @@ FILE_LICENCE ( BSD3 );
0xeb9d2d31, 0x2d88, 0x11d3, {0x9a, 0x16, 0x0, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
}

#define SMBIOS3_TABLE_GUID \
{ \
0xf2fd1544, 0x9794, 0x4a2c, {0x99, 0x2e, 0xe5, 0xbb, 0xcf, 0x20, 0xe3, 0x94 } \
}

extern EFI_GUID gEfiSmbiosTableGuid;
extern EFI_GUID gEfiSmbios3TableGuid;

#endif
22 changes: 21 additions & 1 deletion src/include/ipxe/efi/Ia32/ProcessorBind.h
@@ -1,7 +1,7 @@
/** @file
Processor or Compiler specific defines and types for IA-32 architecture.
Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.<BR>
Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under
the terms and conditions of the BSD License that accompanies this distribution.
The full text of the license may be found at
Expand Down Expand Up @@ -95,6 +95,26 @@ FILE_LICENCE ( BSD3 );
//
#pragma warning ( disable : 4206 )

#if _MSC_VER == 1800

//
// Disable these warnings for VS2013.
//

//
// This warning is for potentially uninitialized local variable, and it may cause false
// positive issues in VS2013 build
//
#pragma warning ( disable : 4701 )

//
// This warning is for potentially uninitialized local pointer variable, and it may cause
// false positive issues in VS2013 build
//
#pragma warning ( disable : 4703 )

#endif

#endif


Expand Down

0 comments on commit 42e0c7e

Please sign in to comment.