Fixed double fault handler. Personally I disclaim all responsiblity
for these changes. I was mostly just staring in amazement at the screen while Axel and Thomas were discussing IA32 internals. A particularly fascinating moment was when Thomas produced the cause of a bug we had been trying to track down for hours off the top of his head (of course iret behaves specially when the NT bit is set :-). His slowness must be excused though, since he hadn't slept for more then 30 hours. ;-) The code doesn't wholeheartedly deal with multi-processor machines yet. Axel will certainly do some cleanup... git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12239 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -75,6 +75,8 @@ void i386_fxrstor(const void *fpu_state);
|
||||
void i386_fsave_swap(void *old_fpu_state, const void *new_fpu_state);
|
||||
void i386_fxsave_swap(void *old_fpu_state, const void *new_fpu_state);
|
||||
void x86_set_task_gate(int32 n, int32 segment);
|
||||
struct tss *x86_get_main_tss(void);
|
||||
|
||||
|
||||
#define read_ebp(value) \
|
||||
__asm__("movl %%ebp,%0" : "=r" (value))
|
||||
|
||||
@@ -17,8 +17,8 @@
|
||||
// this file can also be included from assembler as well
|
||||
// (and is in arch_interrupts.S)
|
||||
|
||||
#define DOUBLE_FAULT_TSS_SEGMENT 5
|
||||
#define TSS_BASE_SEGMENT 6
|
||||
#define DOUBLE_FAULT_TSS_BASE_SEGMENT 5
|
||||
#define TSS_BASE_SEGMENT (DOUBLE_FAULT_TSS_BASE_SEGMENT + smp_get_num_cpus())
|
||||
#define TLS_BASE_SEGMENT (TSS_BASE_SEGMENT + smp_get_num_cpus())
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ set_tss_descriptor(struct segment_descriptor *desc, addr_t base, uint32 limit)
|
||||
desc->privilege_level = DPL_KERNEL;
|
||||
|
||||
desc->present = 1;
|
||||
desc->granularity = 1; // 4 GB size (in page size steps)
|
||||
desc->granularity = 0; // 1 Byte granularity
|
||||
desc->available = 0; // system available bit is currently not used
|
||||
desc->d_b = 0;
|
||||
|
||||
|
||||
@@ -5,8 +5,10 @@
|
||||
#ifndef _NEWOS_KERNEL_ARCH_I386_FAULTS
|
||||
#define _NEWOS_KERNEL_ARCH_I386_FAULTS
|
||||
|
||||
struct iframe;
|
||||
|
||||
int i386_general_protection_fault(int errorcode);
|
||||
int i386_double_fault(int errorcode);
|
||||
int i386_double_fault(struct iframe *frame);
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -6,12 +6,14 @@
|
||||
#define _NEWOS_KERNEL_ARCH_I386_INTERRUPTS_H
|
||||
|
||||
void trap0();void trap1();void trap2();void trap3();void trap4();void trap5();
|
||||
void trap6();void trap7();void trap8();void trap9();void trap10();void trap11();
|
||||
void trap6();void trap7();void trap9();void trap10();void trap11();
|
||||
void trap12();void trap13();void trap14();void trap16();void trap17();void trap18();
|
||||
void trap32();void trap33();void trap34();void trap35();void trap36();void trap37();
|
||||
void trap38();void trap39();void trap40();void trap41();void trap42();void trap43();
|
||||
void trap44();void trap45();void trap46();void trap47();
|
||||
|
||||
void double_fault(); // int 8
|
||||
|
||||
void trap99();
|
||||
|
||||
void trap251();void trap252();void trap253();void trap254();void trap255();
|
||||
|
||||
Reference in New Issue
Block a user