From d8b53a78fcb131235c1e83fe7d6600ab50560420 Mon Sep 17 00:00:00 2001 From: hachem Date: Thu, 10 Sep 2026 05:49:32 +0200 Subject: setup: initialize repo + limine as a bootloader --- boot/limine.zig | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 boot/limine.zig (limited to 'boot/limine.zig') diff --git a/boot/limine.zig b/boot/limine.zig new file mode 100644 index 0000000..e9aac9c --- /dev/null +++ b/boot/limine.zig @@ -0,0 +1,27 @@ +// Limine scans the loaded image for these magic numbers, +// BaseRevision is a handshake, essentially we ask limine +// for rev 3, and if it supports it, limine zeros it out +pub const BaseRevision = extern struct { + magic0: u64 = 0xf9562b2d5c95a6c8, + magic1: u64 = 0x6a7b384944536bdc, + revision: u64, + + pub fn init(revision: u64) BaseRevision { + return .{ .revision = revision }; + } +}; + +// Bracketing markers, they are pretty optional but when +// we add proper limine requests, having these here comes +// handy +pub const RequestsStartMarker = extern struct { + m0: u64 = 0xf6b8f4b39de7d1ae, + m1: u64 = 0xfab91a6940fcb9cf, + m2: u64 = 0x785c6ed015d3e316, + m3: u64 = 0x181e920a7852b9d9, +}; + +pub const RequestsEndMarker = extern struct { + m0: u64 = 0xadc0e0531bb10d03, + m1: u64 = 0x9572709f31764c62, +}; -- cgit v1.3