+675
LICENSE
···
+6
README.md
+9
assets/limine.conf
+54
build.zig
···+const arch = b.option(build_helpers.Architecture, "arch", "The target architecture") orelse .amd64;+const loader_install = b.addInstallFileWithDir(loader_path, .{ .custom = "EFI/BOOT" }, "BOOTX64.EFI");+const config_install = b.addInstallFileWithDir(b.path("assets/limine.conf"), .{ .custom = "limine" }, "limine.conf");+const qemu_cmd = b.addSystemCommand(&.{ "qemu-system-x86_64", "-smp", "4", "-m", "4G", "-monitor", "stdio", "-drive", "format=raw,file=fat:rw:zig-out", "-drive", "if=pflash,format=raw,readonly=on,file=zig-out/OVMF_CODE_X64.fd", "-drive", "if=pflash,format=raw,file=zig-out/OVMF_VARS_X64.fd" });
+37
build.zig.zon
···+.url = "git+https://codeberg.org/Limine/Limine?ref=v9.x-binary#acf1e35c4685dba7ef271013db375a727c340ff7",
+9
components/build_helpers/build.zig
+32
components/build_helpers/root.zig
···
+35
components/root_server/build.zig
···+const arch = b.option(build_helpers.Architecture, "arch", "The target root_server architecture") orelse .amd64;
+14
components/root_server/build.zig.zon
···
+10
components/root_server/src/main.zig
+38
components/root_server/src/os.zig
···
+101
components/ukernel/arch/aarch64/boot.zig
···
+5
components/ukernel/arch/aarch64/instructions.zig
+45
components/ukernel/arch/aarch64/linker.ld
···
+27
components/ukernel/arch/aarch64/root.zig
···
+42
components/ukernel/arch/amd64/asm/traps.S
···
+364
components/ukernel/arch/amd64/boot.zig
···+pub export var base_revision: limine.BaseRevision linksection(".limine_reqs") = .{ .revision = 3 };+pub export var mp: limine.SmpMpFeature.MpRequest linksection(".limine_reqs") = .{ .flags = .{ .x2apic = true } };+const shellcode = [_]u8{ 0x48, 0xBF, 0xE1, 0xAB, 0xDB, 0xBA, 0xB5, 0x00, 0x6B, 0xB1, 0x48, 0xBE, 0x06, 0x42, 0x69, 0x20, 0x94, 0x06, 0x42, 0x69, 0x0F, 0x05, 0xBF, 0x11, 0xCA, 0x00, 0x00, 0xBE, 0x69, 0x69, 0x69, 0x69, 0x0F, 0x05, 0xEB, 0xFE };+const star_value: u64 = 0 | @as(u64, arch.structures.gdt.StandardGdt.selectors.kernel_code) << 32 | (@as(u64, arch.structures.gdt.StandardGdt.selectors.tss_desc + 8) | 3) << 48;+log.info("usercode64 GDT 0x{x}, userdata64 GDT 0x{x}", .{ arch.structures.gdt.StandardGdt.selectors.user_code, arch.structures.gdt.StandardGdt.selectors.user_data });+pub fn page_fault(stack_frame: *arch.structures.Idt.InterruptStackFrame, err_code_u64: u64) callconv(.{ .x86_64_interrupt = .{} }) void {+log.err("PAGE FAULT @ 0x{x:0>16}, code 0x{x}!!!!!!!!!!!", .{ stack_frame.instruction_pointer, err_code.val() });+pub fn breakpoint_handler(stack_frame: *Idt.InterruptStackFrame) callconv(.{ .x86_64_interrupt = .{} }) void {+log.warn("Breakpoint @ 0x{x:0>16}, returning execution...", .{stack_frame.instruction_pointer});+pub fn gpf(stack_frame: *Idt.InterruptStackFrame, err_code: u64) callconv(.{ .x86_64_interrupt = .{} }) void {+log.warn("gpf @ 0x{x:0>16} ERR CODE {}, returning execution...", .{ stack_frame.instruction_pointer, err_code });+pub fn double_fault(stack_frame: *Idt.InterruptStackFrame, err_code: u64) callconv(.{ .x86_64_interrupt = .{} }) noreturn {+log.err("FATAL DOUBLE FAULT @ 0x{x:0>16}, code 0x{x}!!!!!!!!!!!", .{ stack_frame.instruction_pointer, err_code });+const buf: [*]u8 = @ptrFromInt(common.init_data.bootmem.allocMem(total_required_size) catch |err| {+const tss_buf: [*]Tss = @ptrCast(@alignCast(buf[gdt_size * cpu_count ..][0 .. tss_size * cpu_count]));
+5
components/ukernel/arch/amd64/instructions.zig
+52
components/ukernel/arch/amd64/linker.ld
···
+279
components/ukernel/arch/amd64/mm/paging.zig
···+pub fn make_child_table(self: *const Self, pte: *PageTable.Entry, perms: Perms) !TableHandle {
+1
components/ukernel/arch/amd64/mm/root.zig
···
+95
components/ukernel/arch/amd64/registers.zig
···
+24
components/ukernel/arch/amd64/root.zig
···
+170
components/ukernel/arch/amd64/structures/Idt.zig
···
+167
components/ukernel/arch/amd64/structures/gdt.zig
···
+3
components/ukernel/arch/amd64/structures/root.zig
+17
components/ukernel/arch/amd64/structures/tss.zig
···
+40
components/ukernel/arch/riscv64/linker.ld
···
+97
components/ukernel/build.zig
···+const arch = b.option(build_helpers.Architecture, "arch", "The target ukernel architecture") orelse .amd64;+const arch_root_path, const linker_script_path, const code_model: std.builtin.CodeModel = blk: {
+18
components/ukernel/build.zig.zon
···
+73
components/ukernel/common/aux.zig
···
+146
components/ukernel/common/mm/bootmem.zig
···+.usable, .acpi_reclaimable, .bootloader_reclaimable, .executable_and_modules, .framebuffer => region_count += 1,+const bootmem_pages = std.mem.alignForward(usize, bootmem_structure_size, std.heap.pageSize());+const bootmem_struct_ptr = common.mm.physToHHDM([*]BootPmm.Region, region.base + region.length);
+117
components/ukernel/common/mm/paging.zig
···+if (domain.ptr == vaddr.* and domain.len <= size.* and arch.mm.paging.can_map_at(table.level - 1) and is_aligned(vaddr.*, paddr, table.level - 1)) {
+7
components/ukernel/common/mm/root.zig
+5
components/ukernel/common/root.zig
+7
components/ukernel/deps/console/build.zig
+18
components/ukernel/deps/console/build.zig.zon
···
+195
components/ukernel/deps/console/console.zig
···+var offset: u64 = (cy * self.font.hdr.height * self.fb.pitch) + (cx * (self.font.hdr.width + 0) * self.fb.bypp);+return (((red * mult) / div) << red_shift) | (((green * mult) / div) << green_shift) | (((blue * mult) / div) << blue_shift);+const prev_line = self.fb.address[(i - amount) * h * self.fb.pitch ..][0 .. h * self.fb.pitch];+// const last_line = self.fb.address[(num_lines - amount) * h * self.fb.pitch .. (num_lines) * h * self.fb.pitch];+const last_line = self.fb.address[(num_lines - amount) * h * self.fb.pitch ..][0 .. amount * h * self.fb.pitch];
+24
components/ukernel/deps/console/fonts/LICENSE.spleen
···
components/ukernel/deps/console/fonts/bold16x32.psf
This is a binary file and will not be displayed.
components/ukernel/deps/console/fonts/bold8x16.psf
This is a binary file and will not be displayed.
components/ukernel/deps/console/fonts/spleen-12x24.psf
This is a binary file and will not be displayed.
components/ukernel/deps/console/fonts/spleen-16x32.psf
This is a binary file and will not be displayed.
components/ukernel/deps/console/fonts/spleen-32x64.psf
This is a binary file and will not be displayed.
components/ukernel/deps/console/fonts/spleen-5x8.psf
This is a binary file and will not be displayed.
components/ukernel/deps/console/fonts/spleen-6x12.psf
This is a binary file and will not be displayed.
components/ukernel/deps/console/fonts/spleen-8x16.psf
This is a binary file and will not be displayed.
+53
components/ukernel/deps/console/psf2.zig
···
+1
components/ukernel/deps/limine-zig/.gitignore
···
+22
components/ukernel/deps/limine-zig/LICENSE
···
+35
components/ukernel/deps/limine-zig/README.md
···+Zig bindings for the [The Limine Boot Protocol](https://github.com/limine-bootloader/limine/blob/trunk/PROTOCOL.md).+You can find an example kernel using this library [here](https://github.com/48cf/limine-zig-template).
+17
components/ukernel/deps/limine-zig/build.zig
···+const allow_deprecated = b.option(bool, "allow_deprecated", "Whether to allow deprecated features");
+14
components/ukernel/deps/limine-zig/build.zig.zon
+988
components/ukernel/deps/limine-zig/src/root.zig
···+pub const TerminalCallback = *const fn (*Terminal, TerminalCallbackType, u64, u64, u64) callconv(.c) void;
+21
components/ukernel/deps/spinlock/LICENSE
···
+17
components/ukernel/deps/spinlock/README.md
···+A simple spinlock in zig, with the same API as [std.Thread.Mutex](https://ziglang.org/documentation/master/std/#std.Thread.Mutex).
+12
components/ukernel/deps/spinlock/build.zig
···
+14
components/ukernel/deps/spinlock/build.zig.zon
+44
components/ukernel/deps/spinlock/spinlock.zig
···
+24
flake.lock
···+"url": "https://releases.nixos.org/nixpkgs/nixpkgs-25.11pre855444.aaff8c16d7fc/nixexprs.tar.xz?rev=aaff8c16d7fc04991cac6245bee1baa31f72b1e1"
+24
flake.nix
···