Something went wrong. Try again.
[WIP] A toy kernel written in Zig
Something went wrong. Try again.
123456789101112const sysconAddr: *volatile u32 = @ptrFromInt(0x100000);
pub const Action = enum(u32) { poweroff = 0x5555, reboot = 0x7777,};
pub fn action(a: Action) noreturn { sysconAddr.* = @intFromEnum(a); while (true) {}}