GP Fault handler
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user