Quote:
And 1 other question. If I setup an ISO image of my kernel with GRUB as bootloader, how should I tell it to use VGA or SVGA modules and what screen resolution should it setup VBE with?
@tristanseifert has already explained this..look at the last
Code:
.long 0, 0, 0, 0, 0
.long 0 # 0 = set graphics mode
.long 1024, 768, 32 # Width, height, depth
Quote:
If your kernel is multiboot-compliant, you can simply extend your multiboot header to specify a graphics mode for GRUB to switch into:
Code:
.set ALIGN, 1 << 0
.set MEMINFO, 1 << 1
.set VIDINFO, 1 << 2
.set FLAGS, ALIGN | MEMINFO | VIDINFO
.set MAGIC, 0x1BADB002
.set CHECKSUM, -(MAGIC + FLAGS)
.section .multiboot
.long MAGIC
.long FLAGS
.long CHECKSUM
.long 0, 0, 0, 0, 0
.long 0 # 0 = set graphics mode
.long 1024, 768, 32 # Width, height, depth
(See this file for some more detailed explanations)
You will probably also need to access the multiboot structure that GRUB gives you a pointer to in EBX (it's a physical address!) to get the VBE info structure, in which you can locate where in memory (physical, again, so you'll need to map this to your virtual address space) the linear framebuffer is. From there, if you have either 16bpp or 32bpp modes, it's as simple as writing an RGB value to that memory location.