Consolidate formating
This commit is contained in:
@@ -7,27 +7,22 @@ gfx_context kernel_fb;
|
||||
gfx_context *term_fb;
|
||||
static int setup = 0;
|
||||
|
||||
void fbterm_movecursor(unsigned int cursor)
|
||||
{
|
||||
void fbterm_movecursor(unsigned int cursor) {
|
||||
(void) cursor;
|
||||
}
|
||||
|
||||
void fbterm_flush(struct vga_cell *buffer)
|
||||
{
|
||||
void fbterm_flush(struct vga_cell *buffer) {
|
||||
if(!setup) return;
|
||||
int i = 0;
|
||||
for(int row = 0; row < VGA_ROWS; row++)
|
||||
{
|
||||
for(int col=0; col < VGA_COLS; col++)
|
||||
{
|
||||
for(int row = 0; row < VGA_ROWS; row++) {
|
||||
for(int col=0; col < VGA_COLS; col++) {
|
||||
putCharacter(term_fb, col*8, row*16, 0xebdbb2, 0x282828, (char)buffer[i++].c);
|
||||
}
|
||||
}
|
||||
flip(term_fb);
|
||||
}
|
||||
|
||||
void fbterm_init(struct fbinfo *fbinfo)
|
||||
{
|
||||
void fbterm_init(struct fbinfo *fbinfo) {
|
||||
kernel_fb.width = fbinfo->framebuffer_width;
|
||||
kernel_fb.height = fbinfo->framebuffer_height;
|
||||
kernel_fb.bpp = fbinfo->framebuffer_bpp/8;
|
||||
@@ -36,8 +31,11 @@ void fbterm_init(struct fbinfo *fbinfo)
|
||||
kernel_fb.size = fbinfo->framebuffer_pitch * (kernel_fb.height);
|
||||
kernel_fb.buffer = calloc(1, kernel_fb.size);
|
||||
|
||||
for(uintptr_t p = (uintptr_t)kernel_fb.addr; p < ((uintptr_t)kernel_fb.addr + kernel_fb.size); p += PAGE_SIZE)
|
||||
{
|
||||
for(
|
||||
uintptr_t p = (uintptr_t)kernel_fb.addr;
|
||||
p < ((uintptr_t)kernel_fb.addr + kernel_fb.size);
|
||||
p += PAGE_SIZE
|
||||
) {
|
||||
vmm_set_page(kernel_P4, p, V2P(p), PAGE_GLOBAL | PAGE_WRITE | PAGE_PRESENT);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user