diff options
| author | 2026-08-18 12:15:05 +0200 | |
|---|---|---|
| committer | 2026-08-18 12:15:05 +0200 | |
| commit | 132d3236bb884433bf94e961f6d32264e0334aec (patch) | |
| tree | 06638976b06f019ea4037175ff228f8271057c44 /misc-host/ELF/ELF-loader-test/bootloader_compat.h | |
Diffstat (limited to 'misc-host/ELF/ELF-loader-test/bootloader_compat.h')
| -rw-r--r-- | misc-host/ELF/ELF-loader-test/bootloader_compat.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/misc-host/ELF/ELF-loader-test/bootloader_compat.h b/misc-host/ELF/ELF-loader-test/bootloader_compat.h new file mode 100644 index 0000000..d6f56a5 --- /dev/null +++ b/misc-host/ELF/ELF-loader-test/bootloader_compat.h @@ -0,0 +1,35 @@ +#ifndef BOOTLOADER_COMPAT_H +#define BOOTLOADER_COMPAT_H + +// partial API of UEFI/bootloader + +#include <wchar.h> +#include <stdint.h> + +#define EFIAPI +#define IN +#define OUT + +// basic UEFI datatypes +typedef uint8_t BOOLEAN; +typedef int8_t INT8; +typedef uint8_t UINT8; +typedef int16_t INT16; +typedef uint16_t UINT16; +typedef int32_t INT32; +typedef uint32_t UINT32; +typedef int64_t INT64; +typedef uint64_t UINT64; +typedef char CHAR8; +typedef wchar_t CHAR16; +typedef uint64_t UINTN; + +// UEFI native functions +typedef int (*UEFIPrint)(const wchar_t *, ...); +extern UEFIPrint Print; + +// Bootloader defined +void * EFIAPI LoadFile(char * name, UINTN memtype); + +#endif // BOOTLOADER_COMPAT_H + |
