diff --git a/src/arch/x86_64/asm/multiboot_header.s b/src/arch/x86_64/asm/multiboot_header.s index c4406e1..f0b90fa 100644 --- a/src/arch/x86_64/asm/multiboot_header.s +++ b/src/arch/x86_64/asm/multiboot_header.s @@ -24,14 +24,16 @@ header_start: dd 12 ; size dd 0x3 ; kernel supports EGA console - ; Define graphics mode tag - ;align 8 ; tags should be 64-bit aligned - ;dw 5 ; type - ;dw 0 ; flags - ;dd 20 ; size - ;dd 80 ; width (pixels or chars) - ;dd 25 ; height (pixels or chars) - ;dd 0 ; bpp (0 for text mode + ; Define graphics mode tag to advise the bootloader that the kernel + ; supports framebuffer console. Ssetting 0 for width, height and bpp + ; indicates no particular mode preference. + align 8 ; tags should be 64-bit aligned + dw 5 ; type + dw 0 ; flags + dd 20 ; size + dd 0 ; width (pixels or chars) + dd 0 ; height (pixels or chars) + dd 0 ; bpp (0 for text mode) ; According to page 6 of the spec, the tag list is terminated by a tag with ; type 0 and size 8 diff --git a/src/arch/x86_64/script/grub.cfg b/src/arch/x86_64/script/grub.cfg index e2e169f..01afb15 100644 --- a/src/arch/x86_64/script/grub.cfg +++ b/src/arch/x86_64/script/grub.cfg @@ -1,7 +1,32 @@ -set timeout=0 -set default=0 +set timeout=3 +set default=1 -menuentry "gopheros" { +menuentry "gopheros (800x600)" { multiboot2 /boot/kernel.bin + set gfxpayload=800x600 + boot +} + +menuentry "gopheros (1024x768)" { + multiboot2 /boot/kernel.bin + set gfxpayload=1024x768 + boot +} + +menuentry "gopheros (1280x1024)" { + multiboot2 /boot/kernel.bin + set gfxpayload=1280x1024 + boot +} + +menuentry "gopheros (2560x1600)" { + multiboot2 /boot/kernel.bin + set gfxpayload=2560x1600x16 + boot +} + +menuentry "gopheros (text-mode)" { + multiboot2 /boot/kernel.bin + set gfxpayload=text boot }