Paging for kernel which is linked to 0xc0100000
Posted: Sat Jul 17, 2004 5:09 am
As the thread name says, my kernel is linked at 0xc0100000 and I use first segmentation for solving the problem (base 0x40000000) that it realy is at 0x100000. I then setup a PD and init the needed PTs and PGs. But when I enable paging, bochs resets (tripple fault). This is my code to enable paging:
The problem is that I don?t know why it is tripple faulting.
Correct me if I?m wrong, but the address of the PD has to be a physically address, because it gives a **** to segmentation. This is also for the PTs and the PGs.
The most OSs here move the kernel space to the last GiB, aren?t they?! So how did you all solve the problem?
Code: Select all
.enable_paging
mov eax,cr0
or eax,0x80000000
mov cr0,eax
jmp 0x08:.end
.end
mov eax,10h
mov ds,eax
mov es,eax
mov fs,eax
mov fs,eax
mov ss,eax
Correct me if I?m wrong, but the address of the PD has to be a physically address, because it gives a **** to segmentation. This is also for the PTs and the PGs.
The most OSs here move the kernel space to the last GiB, aren?t they?! So how did you all solve the problem?