mirror of
https://github.com/rdmsr/zag.git
synced 2026-11-02 08:08:21 +00:00
feat(boot): export limine framebuffers
This commit is contained in:
@@ -85,6 +85,14 @@ export fn kmain() callconv(.c) void {
|
|||||||
.virtual_base = ka_response.virtual_base,
|
.virtual_base = ka_response.virtual_base,
|
||||||
} else .{ .physical_base = 0, .virtual_base = 0 };
|
} else .{ .physical_base = 0, .virtual_base = 0 };
|
||||||
|
|
||||||
|
boot_info.framebuffer = if (framebuffer_request.response) |fb_response| .{
|
||||||
|
.address = @intFromPtr(fb_response.framebuffers[0].address),
|
||||||
|
.width = @intCast(fb_response.framebuffers[0].width),
|
||||||
|
.height = @intCast(fb_response.framebuffers[0].height),
|
||||||
|
.pitch = @intCast(fb_response.framebuffers[0].pitch),
|
||||||
|
.bpp = @intCast(fb_response.framebuffers[0].bpp),
|
||||||
|
} else null;
|
||||||
|
|
||||||
build_memory_map();
|
build_memory_map();
|
||||||
|
|
||||||
ke.ncpus = 1;
|
ke.ncpus = 1;
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ pub const FramebufferRequest = extern struct {
|
|||||||
pub const FramebufferResponse = extern struct {
|
pub const FramebufferResponse = extern struct {
|
||||||
revision: u64,
|
revision: u64,
|
||||||
framebuffer_count: u64,
|
framebuffer_count: u64,
|
||||||
framebuffers: ?[*]*Framebuffer,
|
framebuffers: [*]*Framebuffer,
|
||||||
};
|
};
|
||||||
|
|
||||||
pub const Framebuffer = extern struct {
|
pub const Framebuffer = extern struct {
|
||||||
|
|||||||
Reference in New Issue
Block a user