diff options
author | Freya Murphy <freya@freyacat.org> | 2025-04-20 11:26:32 -0400 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2025-04-20 11:26:32 -0400 |
commit | 5e0e6240ab058c490304e0789552b45160f900be (patch) | |
tree | 82e19097301d3914f80e356710438278df24fd36 /kernel/drivers/gpu/bochs.c | |
parent | fix code segment (retfq) on long mode edge case (kvm) (diff) | |
download | comus-5e0e6240ab058c490304e0789552b45160f900be.tar.gz comus-5e0e6240ab058c490304e0789552b45160f900be.tar.bz2 comus-5e0e6240ab058c490304e0789552b45160f900be.zip |
fix term/gpu memory OOB error, add dynamic kernel identity map with N_IDENT_PTS
Diffstat (limited to 'kernel/drivers/gpu/bochs.c')
-rw-r--r-- | kernel/drivers/gpu/bochs.c | 5 |
1 files changed, 3 insertions, 2 deletions
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; |