feat(loader, kernel): impl part of loader and initialize kernel structure
This commit is contained in:
13
arch/x86_64/boot/payload.zig
Normal file
13
arch/x86_64/boot/payload.zig
Normal file
@@ -0,0 +1,13 @@
|
||||
const std = @import("std");
|
||||
|
||||
extern const compressed_kernel_data: u8;
|
||||
extern const compressed_kernel_size: u8;
|
||||
extern const uncompressed_kernel_size: u8;
|
||||
|
||||
pub fn getCompressedKernelData() []const u8 {
|
||||
return @as([*]const u8, @ptrCast(&compressed_kernel_data))[0..@as(usize, @intFromPtr(&compressed_kernel_size))];
|
||||
}
|
||||
|
||||
pub fn getUncompressedKernelSize() usize {
|
||||
return @as(usize, @intFromPtr(&uncompressed_kernel_size));
|
||||
}
|
||||
Reference in New Issue
Block a user