From 5e12467c860372dfa10323365fb0df9db79c8f9b Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Thu, 31 Jul 2025 22:33:56 +0200 Subject: APIC/ACPI/keyboard stuff. I now get interrupts when a key is pressed --- src/boot.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/boot.c') diff --git a/src/boot.c b/src/boot.c index 00cbcca..00afae2 100644 --- a/src/boot.c +++ b/src/boot.c @@ -41,11 +41,16 @@ REQUEST struct limine_entry_point_request entry_point_request = { .entry = bootmain }; -REQUEST struct limine_hhdm_request hhdm_request = { +REQUEST struct limine_hhdm_request hhdm_request = { .id = LIMINE_HHDM_REQUEST, .revision = 0 }; +REQUEST struct limine_rsdp_request rsdp_request = { + .id = LIMINE_RSDP_REQUEST, + .revision = 0 +}; + LIMINE(".limine_requests_start") LIMINE_REQUESTS_START_MARKER LIMINE(".limine_requests_end") LIMINE_REQUESTS_END_MARKER @@ -55,6 +60,12 @@ cpu_count(void) return mp_request.response->cpu_count; } +uint8_t +boot_apic_id(void) +{ + return mp_request.response->bsp_lapic_id; +} + static void bootmain(void) { @@ -66,6 +77,7 @@ bootmain(void) assert(paging_request.response); assert(mp_request.response); assert(hhdm_request.response); + assert(rsdp_request.response); assert(framebuffer_request.response->framebuffer_count >= 1); @@ -92,6 +104,7 @@ bootmain(void) } info.memmaps = memmaps; info.physbase = hhdm_request.response->offset; + info.rsdp = rsdp_request.response->address; main(&info); halt(); -- cgit v1.2.3