76
SDK/INC/EFI/X64/efibind.h
Normal file
76
SDK/INC/EFI/X64/efibind.h
Normal file
@@ -0,0 +1,76 @@
|
||||
/*++
|
||||
|
||||
Copyright (c) 2024-2025, Quinn Stephens.
|
||||
Provided under the BSD 3-Clause license.
|
||||
|
||||
Module Name:
|
||||
|
||||
efibind.h
|
||||
|
||||
Abstract:
|
||||
|
||||
Provides processor/compiler-specific EFI definitions for x64 systems.
|
||||
|
||||
--*/
|
||||
|
||||
#ifndef _EFIBIND_H
|
||||
#define _EFIBIND_H
|
||||
|
||||
//
|
||||
// Calling conventions.
|
||||
//
|
||||
#ifndef EFIAPI
|
||||
#if defined(_MSC_EXTENSIONS)
|
||||
#define EFIAPI __cdecl
|
||||
#elif defined(__clang__) || defined(__GNUC__)
|
||||
#define EFIAPI __attribute__((ms_abi))
|
||||
#else
|
||||
#define EFIAPI
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//
|
||||
// Error masks.
|
||||
//
|
||||
#define EFI_ERROR_MASK 0x8000000000000000
|
||||
#define EFI_ERROR_MASK_OEM 0xC000000000000000
|
||||
|
||||
//
|
||||
// Integer types.
|
||||
//
|
||||
#if defined(_MSC_EXTENSIONS)
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef unsigned __int64 uint64_t;
|
||||
typedef __int8 int8_t;
|
||||
typedef __int16 int16_t;
|
||||
typedef __int32 int32_t;
|
||||
typedef __int64 int64_t;
|
||||
#elif defined(UNIX_LP64)
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned long uint64_t;
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef int int32_t;
|
||||
typedef long int64_t;
|
||||
#else
|
||||
typedef unsigned char uint8_t;
|
||||
typedef unsigned short uint16_t;
|
||||
typedef unsigned int uint32_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef char int8_t;
|
||||
typedef short int16_t;
|
||||
typedef int int32_t;
|
||||
typedef long long int64_t;
|
||||
#endif
|
||||
|
||||
//
|
||||
// Word-sized integers.
|
||||
//
|
||||
typedef uint64_t UINTN;
|
||||
typedef int64_t INTN;
|
||||
|
||||
#endif /* !_EFIBIND_H */
|
Reference in New Issue
Block a user