Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
In my OS (x86_64), I am supporting multiboot2. I've done the normal procedure of parsing the multiboot structure and retrieving a framebuffer and various information. But here's the part that bugs me, if I try the following demo, a page fault will occur
Your longmode bootstrap appears to be only mapping one 2MiB page, which obviously will not get you the region just below 4GiB where that framebuffer lives. Limine's stivale spec loads an identity map for all of the 32-bit address space.
iansjack wrote:Have you mapped the frame buffer in your page table?
no, but how?
The same way that you map any other memory pages. Just make an entry for the memory range in your page table. It's probably easier to identity map the range, but you could assign it a different virtual address if you wish.
When you are in paging mode any memory that you address must be mapped in your page tables.
iansjack wrote:Have you mapped the frame buffer in your page table?
no, but how?
Take a look at BOOTBOOT source code. Unlike limine and Grub, it will map the framebuffer for you. It is MIT licensed, so feel free to study its source.
Mapping framebuffer is special, should be handled as MMIO, and not like normal RAM (for one, always use write-through policy).