GP Fault handler

This commit is contained in:
2026-01-10 11:04:08 +01:00
parent 12ab12f1b2
commit 9cbecc1689
2 changed files with 35 additions and 3 deletions

View File

@@ -46,7 +46,7 @@ int term_init()
{
fb = boot_ctx.fb->address;
framebuffer = boot_ctx.fb;
DEBUG("terminal initialized");
DEBUG("terminal initialized, fb=0x%p (width=%u height=%u pitch=%u bpp=%u)", fb, framebuffer->width, framebuffer->height, framebuffer->pitch, framebuffer->bpp);
return 0;
}
return -ENOMEM;
@@ -102,7 +102,12 @@ void term_scroll()
const size_t screen_rows = framebuffer->height;
// Move framebuffer up by one text row
memmove(fb, fb + row_height * row_bytes, (screen_rows - row_height) * row_bytes);
//memmove(fb, fb + row_height * row_bytes, (screen_rows - row_height) * row_bytes);
for (size_t i = 0; i < (screen_rows - row_height) * row_bytes; i++)
{
fb[i] = fb[i + row_height * row_bytes];
}
// Clear last text row
size_t clear_start = (screen_rows - row_height) * row_bytes;