diff options
author | dzwdz | 2022-08-01 16:33:44 +0200 |
---|---|---|
committer | dzwdz | 2022-08-01 20:35:49 +0200 |
commit | 6a85c6ede66f723e1415552482e1c6640653efa2 (patch) | |
tree | bb3790a2d1f42d9cf3c69654f20cbd53cc929038 /src/kernel/arch/amd64/boot.c | |
parent | 24a5f2bf46432aef70fd8d2ebf6c7ba94a6ce5a2 (diff) |
amd64: /video/b device, provided by grub
Diffstat (limited to 'src/kernel/arch/amd64/boot.c')
-rw-r--r-- | src/kernel/arch/amd64/boot.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/kernel/arch/amd64/boot.c b/src/kernel/arch/amd64/boot.c index e8f9a26..301df52 100644 --- a/src/kernel/arch/amd64/boot.c +++ b/src/kernel/arch/amd64/boot.c @@ -3,6 +3,7 @@ #include <kernel/arch/amd64/driver/fsroot.h> #include <kernel/arch/amd64/driver/ps2.h> #include <kernel/arch/amd64/driver/serial.h> +#include <kernel/arch/amd64/driver/video.h> #include <kernel/arch/amd64/interrupts/idt.h> #include <kernel/arch/amd64/interrupts/irq.h> #include <kernel/arch/amd64/multiboot.h> @@ -25,6 +26,7 @@ static void find_init(struct multiboot_info *multiboot, struct kmain_info *info) void kmain_early(struct multiboot_info *multiboot) { struct kmain_info info; + struct fb_info vid; tty_init(); kprintf("idt..."); @@ -45,5 +47,16 @@ void kmain_early(struct multiboot_info *multiboot) { kprintf("ata..."); ata_init(); + vid.b = (void*)multiboot->framebuffer_addr; + vid.pitch = multiboot->framebuffer_pitch; + vid.width = multiboot->framebuffer_width; + vid.height = multiboot->framebuffer_height; + vid.bpp = multiboot->framebuffer_bpp; + + // TODO printf decimal + kprintf("framebuffer at 0x%x, %xx%x bpp 0x%x\n", vid.b, vid.width, vid.height, vid.bpp); + video_init(vid); + + kmain(info); } |