From 5e0e6240ab058c490304e0789552b45160f900be Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Sun, 20 Apr 2025 11:26:32 -0400 Subject: fix term/gpu memory OOB error, add dynamic kernel identity map with N_IDENT_PTS --- kernel/drivers/gpu/bochs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'kernel/drivers/gpu/bochs.c') diff --git a/kernel/drivers/gpu/bochs.c b/kernel/drivers/gpu/bochs.c index 3438ab5..f8e5820 100644 --- a/kernel/drivers/gpu/bochs.c +++ b/kernel/drivers/gpu/bochs.c @@ -68,8 +68,9 @@ int bochs_init(struct gpu **gpu_dev) bochs_dev.width = BOCHS_WIDTH; bochs_dev.height = BOCHS_HEIGHT; bochs_dev.bit_depth = BOCHS_BIT_DEPTH; - bochs_dev.framebuffer = kmapaddr( - addr, NULL, BOCHS_WIDTH * BOCHS_HEIGHT * BOCHS_BIT_DEPTH, F_WRITEABLE); + bochs_dev.framebuffer = + kmapaddr(addr, NULL, BOCHS_WIDTH * BOCHS_HEIGHT * (BOCHS_BIT_DEPTH / 8), + F_WRITEABLE); *gpu_dev = &bochs_dev; return 0; -- cgit v1.2.3-freya