Hello UEFI!

This commit is contained in:
2026-05-09 20:07:36 +08:00
Unverified
parent 112b1b8d08
commit 06fd67c1d2
3 changed files with 43 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#define ull unsigned long long
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");
while (1);
}