summaryrefslogtreecommitdiff
path: root/console-client/fb.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2025-07-01 00:31:45 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2025-07-01 00:31:45 +0200
commitd2eb87c0674a281d1d3854b9c4fba0b7df215077 (patch)
treefcaf7c4434c6872ba6f95a327b2a1a4663cc6bb5 /console-client/fb.c
parentf5bbed75d021b84b181ede1d793a7401f928043c (diff)
console-client vga: Avoid using optimized string operations on vga_videomem
The VGA boards may not like AVX-whatnot-optimized 512B accesses. E.g. qemu does not support it and raises an invalid opcode trap.
Diffstat (limited to 'console-client/fb.c')
-rw-r--r--console-client/fb.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/console-client/fb.c b/console-client/fb.c
index c93a6ae0..9c8d2680 100644
--- a/console-client/fb.c
+++ b/console-client/fb.c
@@ -228,7 +228,7 @@ fb_init(void)
return err;
/* Clear screen */
- memset (vga_videomem, 0, fb_width * fb_height * fb_bpp/8);
+ vga_memset (vga_videomem, 0, fb_width * fb_height * fb_bpp/8);
return 0;
}
@@ -454,26 +454,26 @@ fb_display_scroll (void *handle, int delta)
if (delta > 0)
{
- memmove (vga_videomem, vga_videomem + fb_bpp/8 * pixels,
- fb_bpp/8 * disp->width * (disp->height - delta*fb_hc));
+ vga_memmove (vga_videomem, vga_videomem + fb_bpp/8 * pixels,
+ fb_bpp/8 * disp->width * (disp->height - delta*fb_hc));
}
else
{
- memmove (vga_videomem + fb_bpp/8 * pixels, vga_videomem,
- fb_bpp/8 * disp->width * (disp->height + delta*fb_hc));
+ vga_memmove (vga_videomem + fb_bpp/8 * pixels, vga_videomem,
+ fb_bpp/8 * disp->width * (disp->height + delta*fb_hc));
}
if (delta > 0)
{
r = disp->height/fb_hc - delta;
- memmove (&disp->refmatrix[0][0], &disp->refmatrix[0][0] + chars,
- sizeof (struct fbchr) * disp->width/fb_wc * r);
+ vga_memmove (&disp->refmatrix[0][0], &disp->refmatrix[0][0] + chars,
+ sizeof (struct fbchr) * disp->width/fb_wc * r);
}
else
{
r = 0;
- memmove (&disp->refmatrix[0][0] + chars, &disp->refmatrix[0][0],
- sizeof (struct fbchr) * disp->width/fb_wc * (disp->height/fb_hc + delta));
+ vga_memmove (&disp->refmatrix[0][0] + chars, &disp->refmatrix[0][0],
+ sizeof (struct fbchr) * disp->width/fb_wc * (disp->height/fb_hc + delta));
}
return 0;