summaryrefslogtreecommitdiff
path: root/src/boot.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot.c')
-rw-r--r--src/boot.c15
1 files changed, 14 insertions, 1 deletions
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();