[feat] Use gnu-efi
This commit is contained in:
@@ -1,22 +1,9 @@
|
||||
#define ull unsigned long long
|
||||
#include <efi.h>
|
||||
#include <efilib.h>
|
||||
|
||||
struct EFI_SYSTEM_TABLE {
|
||||
char _buf[60];
|
||||
struct EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL {
|
||||
ull _buf;
|
||||
ull (*OutputString)(
|
||||
struct EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This,
|
||||
unsigned short *String);
|
||||
ull _buf2[4];
|
||||
ull (*ClearScreen)(
|
||||
struct EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *This);
|
||||
} *ConOut;
|
||||
};
|
||||
|
||||
void efi_main(void *ImageHandle __attribute__ ((unused)), struct EFI_SYSTEM_TABLE *SystemTable)
|
||||
{
|
||||
SystemTable->ConOut->ClearScreen(SystemTable->ConOut);
|
||||
SystemTable->ConOut->OutputString(SystemTable->ConOut, L"Hello UEFI!\n");
|
||||
EFI_STATUS EFIAPI efi_main (EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) {
|
||||
InitializeLib(ImageHandle, SystemTable);
|
||||
Print(L"Hello, world!\n");
|
||||
while (1);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user