Skip to content

Commit

Permalink
added framebuffer info to multiboot
Browse files Browse the repository at this point in the history
  • Loading branch information
ozkl committed Mar 26, 2018
1 parent a1f2b02 commit ab97568
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
8 changes: 8 additions & 0 deletions kernel/main.c
Expand Up @@ -431,6 +431,14 @@ int kmain(struct Multiboot *mboot_ptr)
Screen_PrintF("Video: x:%d, y:%d\n", vbe_info->XResolution, vbe_info->YResolution);
}

Serial_PrintF("framebuffer_addr: %x\n", mboot_ptr->framebuffer_addr);
Serial_PrintF("framebuffer_pitch: %d\n", mboot_ptr->framebuffer_pitch);
Serial_PrintF("framebuffer_width: %d\n", mboot_ptr->framebuffer_width);
Serial_PrintF("framebuffer_height: %d\n", mboot_ptr->framebuffer_height);
Serial_PrintF("framebuffer_bpp: %d\n", mboot_ptr->framebuffer_bpp);
Serial_PrintF("framebuffer_type: %d\n", mboot_ptr->framebuffer_type);


initializeRandom();

createRamdisk("ramdisk1", 12*1024*1024);
Expand Down
15 changes: 11 additions & 4 deletions kernel/multiboot.h
Expand Up @@ -26,10 +26,17 @@ struct Multiboot
uint32 apm_table;
uint32 vbe_control_info;
uint32 vbe_mode_info;
uint32 vbe_mode;
uint32 vbe_interface_seg;
uint32 vbe_interface_off;
uint32 vbe_interface_len;
uint16 vbe_mode;
uint16 vbe_interface_seg;
uint16 vbe_interface_off;
uint16 vbe_interface_len;

uint64 framebuffer_addr;
uint32 framebuffer_pitch;
uint32 framebuffer_width;
uint32 framebuffer_height;
uint8 framebuffer_bpp;
uint8 framebuffer_type;
} __attribute__((packed));

#endif

0 comments on commit ab97568

Please sign in to comment.