feat: add initial impl of efi-stub and kernel
This commit is contained in:
17
drivers/firmware/efi/x86.zig
Normal file
17
drivers/firmware/efi/x86.zig
Normal file
@@ -0,0 +1,17 @@
|
||||
const std = @import("std");
|
||||
const console = @import("console.zig");
|
||||
const uefi = std.os.uefi;
|
||||
const SystemTable = uefi.tables.SystemTable;
|
||||
|
||||
export fn efi_pe_entry(image_handle: uefi.Handle, system_table: *SystemTable) callconv(.{ .x86_64_win = .{} }) uefi.Status {
|
||||
const mark_ptr: *usize = @ptrFromInt(0x10000);
|
||||
mark_ptr.* = 0xdeadbeef;
|
||||
_ = image_handle;
|
||||
if (system_table.hdr.signature != SystemTable.signature) {
|
||||
return uefi.Status.invalid_parameter;
|
||||
}
|
||||
console.initUefiConsole(system_table);
|
||||
console.info("Booting YukiOS kernel\n", .{});
|
||||
while(true) {}
|
||||
return .success;
|
||||
}
|
||||
Reference in New Issue
Block a user