all: use root boot info pointer

This commit is contained in:
Loïc Grégoire
2026-07-18 14:41:30 -04:00
parent 072239dc32
commit 301946c774
8 changed files with 31 additions and 26 deletions
+2 -2
View File
@@ -322,8 +322,8 @@ fn enumerate_tables() void {
}
}
pub fn init(boot_info: *r.BootInfo) linksection(r.init) void {
const rsdp_addr = boot_info.rsdp orelse return;
pub fn init() linksection(r.init) void {
const rsdp_addr = r.boot_info.rsdp orelse return;
const rsdp: *Rsdp = @ptrFromInt(rsdp_addr);
+3 -4
View File
@@ -32,7 +32,7 @@ fn com1_write(c: u8) void {
amd64.outb(com1, c);
}
pub fn early_init(boot_info: *r.BootInfo) linksection(r.init) void {
pub fn early_init() linksection(r.init) void {
com1_init();
const f = amd64.cpu_features;
@@ -58,7 +58,6 @@ pub fn early_init(boot_info: *r.BootInfo) linksection(r.init) void {
if (amd64.hypervisor.info) |h| {
log.info("running on hypervisor {s}", .{@tagName(h.vendor)});
}
_ = boot_info;
}
fn init_hypervisor(hv: amd64.hypervisor.Info) void {
@@ -79,12 +78,12 @@ pub fn init_ap() void {
apic.init_local();
}
pub fn late_init(boot_info: *r.BootInfo) linksection(r.init) void {
pub fn late_init() linksection(r.init) void {
if (amd64.hypervisor.info) |hv| {
init_hypervisor(hv);
}
pl.acpi.init(boot_info);
pl.acpi.init();
tsc.init();
+4 -4
View File
@@ -12,14 +12,14 @@ pub const impl = switch (config.arch) {
pub const acpi = @import("acpi/root.zig");
/// Early platform-specific initialization, called before anything else.
pub inline fn early_init(boot_info: *r.BootInfo) void {
return impl.early_init(boot_info);
pub inline fn early_init() void {
return impl.early_init();
}
/// Late platform init. Memory allocator is available at this point.
/// SMP bringup must be done after this returns.
pub inline fn late_init(boot_info: *r.BootInfo) void {
return impl.late_init(boot_info);
pub inline fn late_init() void {
return impl.late_init();
}
/// Write a single character to the debug console.