Post UEFI - set my own page table
Posted: Wed Jul 29, 2020 12:03 pm
Hi,
So I'm trying to break things way down for my understanding, and I do need some help.
I have successfully loaded a test "kernel" trough UEFI and I understand the memory map that I'm getting from UEFI and what I need to be aware off regards this.
However I would like to make a "simple" test, to create my own page table and change the page table set by UEFI to my own, where I map the location of my loaded test kernel to virtual address 0 (and also wants to map the screen buffer to an address such that I can write something to the screen).
I have code to create a page table from when I boot with BIOS which work, but when I try to do more or less the same after UEFI,
then when i try to move the address of PML4 into cr3, the system just ends up rebooting.
(I guess triple fault? or? )
So I guess my starting question would be why the move instruction to cr3 immediately can caused a reboot?
I have no clue at this point, and I have done cli hlt rigth after the move instruction, so the reboot should(?) not be cause by a following bad reference.
Is it because that I mess up the interrupt handlers from UEFI?
Hope that someone can point my in a direction.
So I'm trying to break things way down for my understanding, and I do need some help.
I have successfully loaded a test "kernel" trough UEFI and I understand the memory map that I'm getting from UEFI and what I need to be aware off regards this.
However I would like to make a "simple" test, to create my own page table and change the page table set by UEFI to my own, where I map the location of my loaded test kernel to virtual address 0 (and also wants to map the screen buffer to an address such that I can write something to the screen).
I have code to create a page table from when I boot with BIOS which work, but when I try to do more or less the same after UEFI,
then when i try to move the address of PML4 into cr3, the system just ends up rebooting.
(I guess triple fault? or? )
So I guess my starting question would be why the move instruction to cr3 immediately can caused a reboot?
I have no clue at this point, and I have done cli hlt rigth after the move instruction, so the reboot should(?) not be cause by a following bad reference.
Is it because that I mess up the interrupt handlers from UEFI?
Hope that someone can point my in a direction.