1 /* SPDX-License-Identifier: GPL-2.0+ */ 2 3 #include <stdint.h> 4 5 #define EFIAPI 6 #define EFI_ERROR_MASK 0x8000000000000000 7 #define EFIERR(a) (EFI_ERROR_MASK | a) 8 #define INTERFACE_DECL(x) struct x 9 #define MIN_ALIGNMENT_SIZE 8 10 #define RUNTIMEFUNCTION 11 #define VOID void 12 13 typedef uint8_t BOOLEAN; 14 typedef int64_t INTN; 15 typedef uint64_t UINTN; 16 typedef int8_t INT8; 17 typedef uint8_t UINT8; 18 typedef int16_t INT16; 19 typedef uint16_t UINT16; 20 typedef int32_t INT32; 21 typedef uint32_t UINT32; 22 typedef int64_t INT64; 23 typedef uint64_t UINT64; 24 typedef uint16_t WCHAR; 25 26 #define BREAKPOINT() while(1); 27 #define uefi_call_wrapper(func, va_num, ...) func(__VA_ARGS__) 28 29 #define EFI_SIGNATURE_16(A,B) ((A) | (B<<8)) 30 #define EFI_SIGNATURE_32(A,B,C,D) (EFI_SIGNATURE_16(A,B) | (EFI_SIGNATURE_16(C,D) << 16)) 31 #define EFI_SIGNATURE_64(A,B,C,D,E,F,G,H) (EFI_SIGNATURE_32(A,B,C,D) | ((UINT64)(EFI_SIGNATURE_32(E,F,G,H)) << 32)) 32 33 #define EFI_FUNCTION 34