diff options
| author | andromeda <andromeda@bsd.my.domain> | 2026-10-24 01:13:28 -0400 |
|---|---|---|
| committer | andromeda <andromeda@bsd.my.domain> | 2026-10-24 01:13:28 -0400 |
| commit | 954437ca1c46055cb3d9065fe8b386c59edc1cfe (patch) | |
| tree | 203c970b4aa740b7e48f6e8ae3de13eb4c6f2e13 /main.c3 | |
| parent | 32ff1b81922209059e474268f2288328f2fac743 (diff) | |
[acpi.c3l] add some ACPI structires
Diffstat (limited to 'main.c3')
| -rw-r--r-- | main.c3 | 27 |
1 files changed, 17 insertions, 10 deletions
@@ -88,10 +88,25 @@ fn EfiStatus efi_main(EfiHandle image_handle, SystemTable* system_table) @export uint num_entries = (xsdt.length - ExtendedSystemDescriptionTable::size) / ulong::size; + char[8] oemTableId = xsdt.oemTableId; + + log::info("OEM Table ID: "); + util::putbs(&oemTableId, 8); + util::puts(" revision "); + util::puti(xsdt.oemRevision); + util::puts("\r\n"); + for (usz i = 0; i < num_entries; i++) { DescriptionHeader* dh = (DescriptionHeader*)(uptr)xsdt.descriptionHeaders[i]; + // in QEMU on my device: + // FACP: Fixed ACPI Description Table + // APIC: Multiple APIC Description Table + // HPET: IA-PC High Precision Event Timer Table + // WAET: Windows ACPI Emulated Devices Table + // BGRT: Boot Graphics Resource Table + if (dh.is_valid()) { log::info("valid signature: "); @@ -115,17 +130,9 @@ fn EfiStatus efi_main(EfiHandle image_handle, SystemTable* system_table) @export alias PanicFn = fn void(String message, String file, String function, int line); PanicFn panicfn = &panic; -fn void panic(String message = "test", String file = "", String function = "", int line = 0) +fn void panic(String message = "<null>", String file = "<null>", String function = "<null>", int line = 0) { - util::puts("PANIC: "); - util::puts(message); - util::puts("\r\nfunc "); - util::puts(function); - util::puts(" in file "); - util::puts(file); - util::puts(" at line "); - util::puti((usz)line); - util::puts("\r\n"); + util::puts("PANIC"); spin(); } |
