Hello.
Is it necessary to use a physical address below 0x100000 for the CR3?
If I use address 0x10000 it works fine, but using address 0x100000 causes a reboot only on my Pentium 4 (bochs and vmware work also!).
Hornet(german)
cr3(PDBR) - Question
Re:cr3(PDBR) - Question
Maybe it has something to do with a20 line... Do you enable it correctly? Maybe if you tell where actual error is; does rebooting occur at the instruction where you load cr3 register with 0x100000?
Re:cr3(PDBR) - Question
Hello.
Here is my code, perhaps it can help.
[tt] ....
CLI
; Debug-Information:
; CR0 = 0x11 || CR3 = 0 || CR4 = 0
; At 0x100000 you can find "0x101217" -> OK
; At 0x101204 (must be this page, where this code is) you can find "0x81217" -> OK
mov eax, 0x100000
mov cr3, eax
call enable_A20 ; just added, but nothing changed
mov ebx,cr0
or ebx,0x80000000
mov cr0,ebx ; reboot, perhaps no right page ?
; But it seems OK, and bochs and vmware work!
....
[/tt]
Here is my code, perhaps it can help.
[tt] ....
CLI
; Debug-Information:
; CR0 = 0x11 || CR3 = 0 || CR4 = 0
; At 0x100000 you can find "0x101217" -> OK
; At 0x101204 (must be this page, where this code is) you can find "0x81217" -> OK
mov eax, 0x100000
mov cr3, eax
call enable_A20 ; just added, but nothing changed
mov ebx,cr0
or ebx,0x80000000
mov cr0,ebx ; reboot, perhaps no right page ?
; But it seems OK, and bochs and vmware work!
....
[/tt]
Re:cr3(PDBR) - Question
OK, this means that you are probably not at right place I mean when you enable paging the code address you are executing should be mapped onto itself or you should do a jump to correct address(virtual address) where you your code is mapped. Read intel manual about address translation (paging part) stuff it tells more clearly. But I think this is not the problem I think it is a20 line. try loading cr3 with 300000h(after switching to pmode) on 3Meg just as you do for 0x10000, and set pd also on 3Meg, if it works, problem is a20 line. Thats all I can think of... Good luck...