mirror of
https://github.com/rdmsr/zag.git
synced 2026-10-31 07:18:22 +00:00
loader: initial loader code
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
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
-1
@@ -9,7 +9,7 @@ const ex = r.ex;
|
||||
var thread0: ke.Thread = undefined;
|
||||
var stack: [r.kib(16)]u8 align(16) = undefined;
|
||||
|
||||
pub fn init(boot_info: *pl.BootInfo) linksection(r.init) void {
|
||||
pub fn init(boot_info: *r.BootInfo) linksection(r.init) void {
|
||||
ki.impl.early_init();
|
||||
ki.tunable.init(boot_info);
|
||||
std.log.info("Welcome to the machine", .{});
|
||||
|
||||
@@ -42,7 +42,7 @@ pub fn Tunable(comptime T: type, comptime default: T, comptime name: []const u8)
|
||||
};
|
||||
}
|
||||
|
||||
pub fn init(boot_info: *pl.BootInfo) void {
|
||||
pub fn init(boot_info: *r.BootInfo) void {
|
||||
const cmdline = boot_info.cmdline orelse return;
|
||||
|
||||
const elems = set.elems();
|
||||
|
||||
Reference in New Issue
Block a user