triple fault when moving 0x3 to CR0
Posted: Thu Jul 20, 2006 3:22 am
Well I got these trivial triple faults from moving anything into CR0 and bochs says like invalid opcode or something
this is my simple code which disabled paging and leaves everything else the same..
and bochs never gets to the hlt I really don't know how much simpler it could possibly be!
and the code in my bootloader is this and it works fine!
btw I have interrupts off in this whole thing
this is my simple code which disabled paging and leaves everything else the same..
Code: Select all
mov eax,CR0
and eax,0x7FFFFFFF
mov CR0,eax
hlt
and the code in my bootloader is this and it works fine!
Code: Select all
mov eax, CR0 ;Turn on paging and protected mode
or eax, 0x80000001
mov CR0, eax