efibind.h 923 B

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