[BOOT] Add EFI headers and entry point
This commit is contained in:
76
BOOT/ENVIRON/INC/AMD64/efibind.h
Normal file
76
BOOT/ENVIRON/INC/AMD64/efibind.h
Normal file
@@ -0,0 +1,76 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2024, the LibreXP developers.
|
||||
Provided under the BSD 3-Clause license.
|
||||
|
||||
Module Name:
|
||||
|
||||
efibind.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Provides definitions specific to AMD64 EFI systems.
|
||||
|
||||
--*/
|
||||
|
||||
#if defined(_MSC_EXTENSIONS)
|
||||
typedef unsigned __int64 uint64_t;
|
||||
typedef __int64 int64_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef __int32 int32_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef __int16 int16_t;
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef __int8 int8_t;
|
||||
#elif defined(UNIX_LP64)
|
||||
typedef unsigned long uint64_t;
|
||||
typedef long int64_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef int int32_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef short int16_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef char int8_t;
|
||||
#else
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef long long int64_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef int int32_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef short int16_t;
|
||||
typedef unsigned char uint8_t;
|
||||
typedef char int8_t;
|
||||
#endif
|
||||
|
||||
typedef uint64_t UINT64;
|
||||
typedef int64_t INT64;
|
||||
typedef uint32_t UINT32;
|
||||
typedef int32_t INT32;
|
||||
typedef uint16_t UINT16;
|
||||
typedef int16_t INT16;
|
||||
typedef uint8_t UINT8;
|
||||
typedef int8_t INT8;
|
||||
|
||||
typedef int64_t INTN;
|
||||
typedef uint64_t UINTN;
|
||||
|
||||
#define EFI_ERROR_MASK 0x8000000000000000
|
||||
#define EFI_ERROR_MASK_OEM 0xc000000000000000
|
||||
#define EFIERR(e) (EFI_ERROR_MASK | e)
|
||||
#define EFIERR_OEM(e) (EFI_ERROR_MASK_OEM | e)
|
||||
|
||||
#ifndef EFIAPI
|
||||
#if defined(_MSC_EXTENSIONS)
|
||||
#define EFIAPI __cdecl
|
||||
#else
|
||||
#define EFIAPI __attribute__((ms_abi))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define VOLATILE volatile
|
||||
|
||||
#if defined(__GNUC__) || defined(_MSC_EXTENSIONS)
|
||||
#define INTERFACE_DECL(n) struct n
|
||||
#else
|
||||
#define INTERFACE_DECL(n) typedef struct n
|
||||
#endif
|
Reference in New Issue
Block a user