Page 1 of 1
Triple fault error on page directory swich
Posted: Wed Jul 29, 2009 12:00 am
by balthasar
on MemoryManager.cpp line 217 is the code thats causing the triple fault
i cant figure out to the life of me why its not working, it worked when it was in C.
Help is needed sources can be viewed here
http://code.google.com/p/ensemble/sourc ... #svn/trunk
Re: Triple fault error on page directory swich
Posted: Wed Jul 29, 2009 12:19 am
by balthasar
also here is the Bochs log where the error occured (maybe it can help)
00067827234i[CPU0 ] | EAX=00001000 EBX=00026260 ECX=00000700 EDX=000003ff
00067827234i[CPU0 ] | ESP=00067e60 EBP=00067e60 ESI=000263fa EDI=00026408
00067827234i[CPU0 ] | IOPL=0 id vip vif ac vm RF nt of df IF tf sf zf AF PF cf
00067827234i[CPU0 ] | SEG selector base limit G D
00067827234i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D
00067827234i[CPU0 ] | CS:0008( 0001| 0| 0) 00000000 ffffffff 1 1
00067827234i[CPU0 ] | DS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00067827234i[CPU0 ] | SS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00067827234i[CPU0 ] | ES:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00067827234i[CPU0 ] | FS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00067827234i[CPU0 ] | GS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00067827234i[CPU0 ] | EIP=00102b2d (00102b2d)
00067827234i[CPU0 ] | CR0=0xe0000011 CR2=0x001094a0
00067827234i[CPU0 ] | CR3=0x00001000 CR4=0x00000000
00067827234e[CPU0 ] exception(): 3rd (14) exception with no resolution, shutdown status is 00h, resetting
Re: Triple fault error on page directory swich
Posted: Wed Jul 29, 2009 12:55 am
by raghuk
Looks like you got a page fault and there is no page fault handler, so it double faulted and there is no double fault handler, and it triple faulted.
Look at the address in CR2. You are trying to access that address but the page table/directory is marked as not present.
Re: Triple fault error on page directory swich
Posted: Sat Aug 01, 2009 8:04 am
by Combuster
on MemoryManager.cpp line 217 is the code thats causing the triple fault
google wrote:Your search - MemoryManager.cpp package:http://ensemble\.googlecode\.com - did not match any documents.
You might want to fix that problem first
In the meantime, your pointers seem to be in odd places (stack at some magic address, PD at 0x1000), my crystal ball suggests that you might have "lost" your pagetable somewhere....
You are trying to access that address but the page table/directory is marked as not present.
You can't determine the pagefault type from CR2, you need the error code for that.
Re: Triple fault error on page directory swich
Posted: Sat Aug 01, 2009 10:01 am
by raghuk
You can't determine the pagefault type from CR2, you need the error code for that.
Good catch Combuster. That helped me fix my early version of paging code
Re: Triple fault error on page directory swich
Posted: Sun Aug 09, 2009 7:31 am
by DeleteMe
watch your stack. when you switch PD's you will remove the page under the stack. it will generate a pagefaul, but, becuase it can't push some thing in too the stack, it will pagefault, before, it's pagefault, then you have a doublefault, but you still can't push to the stack, and will pagefault(again), then you will have a fullblown triplefault.
thats my guss.