axeld + bonefish:
Answered Travis question. We save the registers from the exception causing the double fault in the double fault iframe, since otherwise it would contain only completely unusable values. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21661 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
b17ea3a37c
commit
210ea8a561
|
@ -6,6 +6,7 @@
|
||||||
* Distributed under the terms of the NewOS License.
|
* Distributed under the terms of the NewOS License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <cpu.h>
|
||||||
#include <int.h>
|
#include <int.h>
|
||||||
#include <kscheduler.h>
|
#include <kscheduler.h>
|
||||||
#include <ksyscalls.h>
|
#include <ksyscalls.h>
|
||||||
|
@ -386,17 +387,31 @@ i386_handle_trap(struct iframe frame)
|
||||||
|
|
||||||
case 8: // Double Fault Exception (#DF)
|
case 8: // Double Fault Exception (#DF)
|
||||||
{
|
{
|
||||||
#if 0
|
// The double fault iframe contains no useful information (as
|
||||||
// XXX what is this supposed to do?
|
// per Intel's architecture spec). Thus we simply save the
|
||||||
struct tss *tss = x86_get_main_tss();
|
// information from the (unhandable) exception which caused the
|
||||||
|
// double in our iframe. This will result even in useful stack
|
||||||
|
// traces. Only problem is that we trust that at least the
|
||||||
|
// TSS is still accessible.
|
||||||
|
struct tss *tss = &gCPU[smp_get_current_cpu()].arch.tss;
|
||||||
|
|
||||||
frame.cs = tss->cs;
|
frame.cs = tss->cs;
|
||||||
|
frame.es = tss->es;
|
||||||
|
frame.ds = tss->ds;
|
||||||
|
frame.fs = tss->fs;
|
||||||
|
frame.gs = tss->gs;
|
||||||
frame.eip = tss->eip;
|
frame.eip = tss->eip;
|
||||||
|
frame.ebp = tss->ebp;
|
||||||
frame.esp = tss->esp;
|
frame.esp = tss->esp;
|
||||||
|
frame.eax = tss->eax;
|
||||||
|
frame.ebx = tss->ebx;
|
||||||
|
frame.ecx = tss->ecx;
|
||||||
|
frame.edx = tss->edx;
|
||||||
|
frame.esi = tss->esi;
|
||||||
|
frame.edi = tss->edi;
|
||||||
frame.flags = tss->eflags;
|
frame.flags = tss->eflags;
|
||||||
#endif
|
|
||||||
|
|
||||||
panic("double fault! errorcode = 0x%lx\n", frame.error_code);
|
panic("double fault!\n");
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue