mirror of
https://github.com/rdmsr/zag.git
synced 2026-11-01 07:48:20 +00:00
rework entry point
This commit is contained in:
@@ -1,16 +0,0 @@
|
||||
const std = @import("std");
|
||||
|
||||
const r = @import("root");
|
||||
|
||||
const pl = r.pl;
|
||||
const ke = r.ke;
|
||||
const ki = ke.private;
|
||||
|
||||
pub const std_options = r.std_options;
|
||||
pub const panic = r.panic;
|
||||
|
||||
export fn kmain(info: *r.BootInfo) callconv(.c) void {
|
||||
ke.ncpus = 1;
|
||||
|
||||
ki.init(info);
|
||||
}
|
||||
+1
-2
@@ -10,6 +10,7 @@ var thread0: ke.Thread = undefined;
|
||||
var stack: [r.kib(16)]u8 align(16) = undefined;
|
||||
|
||||
pub fn init(boot_info: *r.BootInfo) linksection(r.init) void {
|
||||
ke.ncpus = 1;
|
||||
ki.impl.early_init();
|
||||
ki.tunable.init(boot_info);
|
||||
std.log.info("Welcome to the machine", .{});
|
||||
@@ -27,6 +28,4 @@ pub fn init(boot_info: *r.BootInfo) linksection(r.init) void {
|
||||
ki.sched.percpu.local().current_thread = &thread0;
|
||||
|
||||
std.log.info("Zag for {s} ({s}), cmdline is \"{?s}\"", .{ pl.name, arch.name, boot_info.cmdline });
|
||||
|
||||
ex.private.init(boot_info);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ pub const Tunable = p.tunable.Tunable;
|
||||
|
||||
// === Exported Interfaces ===
|
||||
pub const panic = p.panic.panic;
|
||||
pub const init = p.init;
|
||||
|
||||
pub const ipl = struct {
|
||||
pub const raise = p.ipl.raise;
|
||||
|
||||
Reference in New Issue
Block a user