PERFORCE change 28202 for review
Peter Wemm
peter at FreeBSD.org
Sat Apr 5 01:57:53 PST 2003
http://perforce.freebsd.org/chv.cgi?CH=28202
Change 28202 by peter at peter_overcee on 2003/04/05 01:57:16
get machdep.c and trap.c to compile.. Worry about 'work' later.
Affected files ...
.. //depot/projects/hammer/sys/x86_64/include/segments.h#12 edit
.. //depot/projects/hammer/sys/x86_64/include/tss.h#5 edit
.. //depot/projects/hammer/sys/x86_64/x86_64/machdep.c#37 edit
.. //depot/projects/hammer/sys/x86_64/x86_64/trap.c#20 edit
Differences ...
==== //depot/projects/hammer/sys/x86_64/include/segments.h#12 (text+ko) ====
@@ -72,7 +72,7 @@
u_int64_t sd_p:1; /* segment descriptor present */
u_int64_t sd_hilimit:4; /* segment extent (msb) */
u_int64_t sd_xx:1; /* unused */
- u_int64_t sd_l:2; /* long mode (cs only) */
+ u_int64_t sd_long:1; /* long mode (cs only) */
u_int64_t sd_def32:1; /* default 32 vs 16 bit size */
u_int64_t sd_gran:1; /* limit granularity (byte/page units)*/
u_int64_t sd_hibase:8; /* segment base address (msb) */
@@ -108,10 +108,8 @@
u_int64_t gd_type:5; /* segment type */
u_int64_t gd_dpl:2; /* segment descriptor priority level */
u_int64_t gd_p:1; /* segment descriptor present */
- u_int64_t gd_hioffset:38; /* gate offset (msb) */
- u_int64_t sd_xx1:8;
- u_int64_t sd_mbz:5; /* MUST be zero */
- u_int64_t sd_xx2:19;
+ u_int64_t gd_hioffset:48; /* gate offset (msb) */
+ u_int64_t sd_xx1:32;
};
/* system segments and gate types */
@@ -147,24 +145,23 @@
* when needed to be used by the 386 hardware
*/
-struct soft_segment_descriptor32 {
- unsigned ssd_base; /* segment base address */
- unsigned ssd_limit; /* segment extent */
- unsigned ssd_type:5; /* segment type */
- unsigned ssd_dpl:2; /* segment descriptor priority level */
- unsigned ssd_p:1; /* segment descriptor present */
- unsigned ssd_xx:4; /* unused */
- unsigned ssd_xx1:2; /* unused */
- unsigned ssd_def32:1; /* default 32 vs 16 bit size */
- unsigned ssd_gran:1; /* limit granularity (byte/page units)*/
+struct soft_segment_descriptor {
+ unsigned long ssd_base; /* segment base address */
+ unsigned long ssd_limit; /* segment extent */
+ unsigned long ssd_type:5; /* segment type */
+ unsigned long ssd_dpl:2; /* segment descriptor priority level */
+ unsigned long ssd_p:1; /* segment descriptor present */
+ unsigned long ssd_long:1; /* long mode (for %cs) */
+ unsigned long ssd_def32:1; /* default 32 vs 16 bit size */
+ unsigned long ssd_gran:1; /* limit granularity (byte/page units)*/
};
/*
* region descriptors, used to load gdt/idt tables before segments yet exist.
*/
struct region_descriptor {
- unsigned rd_limit:16; /* segment extent */
- unsigned rd_base:32 __packed; /* base address */
+ unsigned long rd_limit:16; /* segment extent */
+ unsigned long rd_base:64 __packed; /* base address */
};
/*
@@ -180,39 +177,21 @@
#define GCODE_SEL 1 /* Kernel Code Descriptor */
#define GDATA_SEL 2 /* Kernel Data Descriptor */
#define GPROC0_SEL 3 /* Task state process slot zero and up */
-#define GLDT_SEL 4 /* LDT - eventually one per process */
-#define GUSERLDT_SEL 5 /* User LDT */
-#define GPANIC_SEL 6 /* Task state to consider panic from */
-#define NGDT 7
+/* slot 4 is second half of GPROC0_SEL */
+#define NGDT 5
-/*
- * Entries in the Local Descriptor Table (LDT)
- */
-#define LSYS5CALLS_SEL 0 /* forced by intel BCS */
-#define LSYS5SIGR_SEL 1
-#define L43BSDCALLS_SEL 2 /* notyet */
-#define LUCODE_SEL 3
-#define LSOL26CALLS_SEL 4 /* Solaris >= 2.6 system call gate */
-#define LUDATA_SEL 5
-/* separate stack, es,fs,gs sels ? */
-/* #define LPOSIXCALLS_SEL 5*/ /* notyet */
-#define LBSDICALLS_SEL 16 /* BSDI system call gate */
-#define NLDT (LBSDICALLS_SEL + 1)
-
#ifdef _KERNEL
-extern int _default_ldt;
-extern union descriptor gdt[];
+extern struct user_segment_descriptor gdt[];
extern struct soft_segment_descriptor gdt_segs[];
extern struct gate_descriptor *idt;
-extern union descriptor ldt[NLDT];
void lgdt(struct region_descriptor *rdp);
-#if 0
-void sdtossd(struct segment_descriptor *sdp,
+void sdtossd(struct user_segment_descriptor *sdp,
struct soft_segment_descriptor *ssdp);
void ssdtosd(struct soft_segment_descriptor *ssdp,
- struct segment_descriptor *sdp);
-#endif
+ struct user_segment_descriptor *sdp);
+void ssdtosyssd(struct soft_segment_descriptor *ssdp,
+ struct system_segment_descriptor *sdp);
#endif /* _KERNEL */
#endif /* !_MACHINE_SEGMENTS_H_ */
==== //depot/projects/hammer/sys/x86_64/include/tss.h#5 (text+ko) ====
@@ -70,4 +70,13 @@
};
#pragma pack()
+#ifdef _KERNEL
+/* Hack to fight with the crazy alignment */
+struct aligned_tss {
+ u_int32_t pad;
+ struct x86_64tss tss __packed;
+};
+extern struct aligned_tss common_tss;
+#endif
+
#endif /* _MACHINE_TSS_H_ */
==== //depot/projects/hammer/sys/x86_64/x86_64/machdep.c#37 (text+ko) ====
@@ -111,7 +111,9 @@
#include <machine/sigframe.h>
extern void init386(int first);
+#if 0
extern void dblfault_handler(void);
+#endif
extern void printcpuinfo(void); /* XXX header file */
extern void finishidentcpu(void);
@@ -550,15 +552,20 @@
* Initialize segments & interrupt table
*/
-union descriptor gdt[NGDT * MAXCPU]; /* global descriptor table */
+struct user_segment_descriptor gdt[NGDT];/* global descriptor table */
static struct gate_descriptor idt0[NIDT];
struct gate_descriptor *idt = &idt0[0]; /* interrupt descriptor table */
-int private_tss; /* flag indicating private tss */
-
-static struct i386tss dblfault_tss;
+#if 0
+static struct x86_64tss dblfault_tss;
static char dblfault_stack[PAGE_SIZE];
+#endif
+/*
+ * Nasty hack to arrange internal longword alignment.
+ * Probably not necessary.
+ */
+static struct aligned_tss common_tss;
/* software prototypes -- in more palatable form */
@@ -569,7 +576,7 @@
0, /* segment type */
0, /* segment descriptor priority level */
0, /* segment descriptor present */
- 0, 0,
+ 0, /* long */
0, /* default 32 vs 16 bit size */
0 /* limit granularity (byte/page units)*/ },
/* GCODE_SEL 1 Code Descriptor for kernel */
@@ -578,7 +585,7 @@
SDT_MEMERA, /* segment type */
0, /* segment descriptor priority level */
1, /* segment descriptor present */
- 0, 0,
+ 1, /* long */
1, /* default 32 vs 16 bit size */
1 /* limit granularity (byte/page units)*/ },
/* GDATA_SEL 2 Data Descriptor for kernel */
@@ -587,28 +594,39 @@
SDT_MEMRWA, /* segment type */
0, /* segment descriptor priority level */
1, /* segment descriptor present */
- 0, 0,
+ 1, /* long */
1, /* default 32 vs 16 bit size */
1 /* limit granularity (byte/page units)*/ },
/* GPROC0_SEL 3 Proc 0 Tss Descriptor */
{
0x0, /* segment base address */
- sizeof(struct i386tss)-1,/* length - all address space */
+ sizeof(struct x86_64tss)-1,/* length - all address space */
SDT_SYSTSS, /* segment type */
0, /* segment descriptor priority level */
1, /* segment descriptor present */
- 0, 0,
+ 0, /* long */
0, /* unused - default 32 vs 16 bit size */
0 /* limit granularity (byte/page units)*/ },
+/* Actually, the TSS is a system descriptor which is double size */
+{ 0x0, /* segment base address */
+ 0x0, /* length */
+ 0, /* segment type */
+ 0, /* segment descriptor priority level */
+ 0, /* segment descriptor present */
+ 0, /* long */
+ 0, /* default 32 vs 16 bit size */
+ 0 /* limit granularity (byte/page units)*/ },
+#if 0
/* GPANIC_SEL 4 Panic Tss Descriptor */
{ (int) &dblfault_tss, /* segment base address */
- sizeof(struct i386tss)-1,/* length - all address space */
+ sizeof(struct x86_64tss)-1,/* length - all address space */
SDT_SYSTSS, /* segment type */
0, /* segment descriptor priority level */
1, /* segment descriptor present */
- 0, 0,
+ 0, /* long */
0, /* unused - default 32 vs 16 bit size */
0 /* limit granularity (byte/page units)*/ },
+#endif
};
void
@@ -622,14 +640,14 @@
struct gate_descriptor *ip;
ip = idt + idx;
- ip->gd_looffset = (int)func;
+ ip->gd_looffset = (uintptr_t)func;
ip->gd_selector = selec;
- ip->gd_stkcpy = 0;
+ ip->gd_ist = 0;
ip->gd_xx = 0;
ip->gd_type = typ;
ip->gd_dpl = dpl;
ip->gd_p = 1;
- ip->gd_hioffset = ((int)func)>>16 ;
+ ip->gd_hioffset = ((uintptr_t)func)>>16 ;
}
#define IDTVEC(name) __CONCAT(X,name)
@@ -643,15 +661,16 @@
void
sdtossd(sd, ssd)
- struct segment_descriptor *sd;
+ struct user_segment_descriptor *sd;
struct soft_segment_descriptor *ssd;
{
ssd->ssd_base = (sd->sd_hibase << 24) | sd->sd_lobase;
- ssd->ssd_limit = (sd->sd_hilimit << 16) | sd->sd_Lolimit;
+ ssd->ssd_limit = (sd->sd_hilimit << 16) | sd->sd_lolimit;
ssd->ssd_type = sd->sd_type;
ssd->ssd_dpl = sd->sd_dpl;
ssd->ssd_p = sd->sd_p;
+ ssd->ssd_long = sd->sd_long;
ssd->ssd_def32 = sd->sd_def32;
ssd->ssd_gran = sd->sd_gran;
}
@@ -659,23 +678,46 @@
void
ssdtosd(ssd, sd)
struct soft_segment_descriptor *ssd;
- struct segment_descriptor *sd;
+ struct user_segment_descriptor *sd;
{
sd->sd_lobase = (ssd->ssd_base) & 0xffffff;
- sd->sd_hibase = (ssd->ssd_base >> 24) & 0xff
+ sd->sd_hibase = (ssd->ssd_base >> 24) & 0xff;
sd->sd_lolimit = (ssd->ssd_limit) & 0xffff;
sd->sd_hilimit = (ssd->ssd_limit >> 16) & 0xf;
sd->sd_type = ssd->ssd_type;
sd->sd_dpl = ssd->ssd_dpl;
sd->sd_p = ssd->ssd_p;
+ sd->sd_long = ssd->ssd_long;
sd->sd_def32 = ssd->ssd_def32;
sd->sd_gran = ssd->ssd_gran;
}
+
+void
+ssdtosyssd(ssd, sd)
+ struct soft_segment_descriptor *ssd;
+ struct system_segment_descriptor *sd;
+{
+
+ sd->sd_lobase = (ssd->ssd_base) & 0xffffff;
+ sd->sd_hibase = (ssd->ssd_base >> 24) & 0xffffff;
+ sd->sd_lolimit = (ssd->ssd_limit) & 0xffff;
+ sd->sd_hilimit = (ssd->ssd_limit >> 16) & 0xf;
+ sd->sd_type = ssd->ssd_type;
+ sd->sd_dpl = ssd->ssd_dpl;
+ sd->sd_p = ssd->ssd_p;
+ sd->sd_gran = ssd->ssd_gran;
+}
#define PHYSMAP_SIZE (2 * 8)
+struct bios_smap {
+ u_int64_t base;
+ u_int64_t length;
+ u_int32_t type;
+} __packed;
+
/*
* Populate the (physmap) array with base/bound pairs describing the
* available physical memory in the system, then test this memory and
@@ -711,7 +753,7 @@
/*
* get memory map with INT 15:E820
*/
-#error "smap = fetch from loader metadata"
+/* #error "smap = fetch from loader metadata" */
physmap_idx = 0;
do {
@@ -749,7 +791,7 @@
physmap[physmap_idx + 1] = smap->base + smap->length;
next_run: ;
} while (1 /* XXX more to go */);
-#error "while not end of smap table from loader"
+/* #error "while not end of smap table from loader" */
/*
* Perform "base memory" related probes & setup based on SMAP
@@ -783,7 +825,7 @@
/*
* If we failed above, try memory map with INT 15:E801
*/
-#error "get smap from loader"
+/* #error "get smap from loader" */
else {
/*
* Prefer the RTC value for extended memory.
@@ -1005,7 +1047,7 @@
*/
proc_linkup(&proc0, &ksegrp0, &kse0, &thread0);
- preload_metadata = modulep + KERNBASE;
+ preload_metadata = (caddr_t)(uintptr_t)(modulep + KERNBASE);
preload_bootstrap_relocate(KERNBASE);
kmdp = preload_search_by_type("elf kernel");
boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int);
@@ -1023,15 +1065,18 @@
* XXX text protection is temporarily (?) disabled. The limit was
* i386_btop(round_page(etext)) - 1.
*/
- gdt_segs[GCODE_SEL].ssd_limit = atop(0 - 1);
- gdt_segs[GDATA_SEL].ssd_limit = atop(0 - 1);
- gdt_segs[GPROC0_SEL].ssd_base = (int) &pc->pc_common_tss;
+ gdt_segs[GCODE_SEL].ssd_limit = -1;
+ gdt_segs[GDATA_SEL].ssd_limit = -1;
+ gdt_segs[GPROC0_SEL].ssd_base = (uintptr_t)&common_tss.tss;
- for (x = 0; x < NGDT; x++)
- ssdtosd(&gdt_segs[x], &gdt[x].sd);
+ for (x = 0; x < NGDT; x++) {
+ if (x != GPROC0_SEL)
+ ssdtosd(&gdt_segs[x], &gdt[x]);
+ }
+ ssdtosyssd(&gdt_segs[GPROC0_SEL], (struct system_segment_descriptor *)&gdt[GPROC0_SEL]);
r_gdt.rd_limit = NGDT * sizeof(gdt[0]) - 1;
- r_gdt.rd_base = (int) gdt;
+ r_gdt.rd_base = (long) gdt;
lgdt(&r_gdt);
pc = &__pcpu;
@@ -1053,52 +1098,54 @@
/* exceptions */
for (x = 0; x < NIDT; x++)
- setidt(x, &IDTVEC(rsvd), SDT_SYS386TGT, SEL_KPL,
+ setidt(x, &IDTVEC(rsvd), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(0, &IDTVEC(div), SDT_SYS386TGT, SEL_KPL,
+ setidt(0, &IDTVEC(div), SDT_SYSTGT, SEL_KPL,
+ GSEL(GCODE_SEL, SEL_KPL));
+ setidt(1, &IDTVEC(dbg), SDT_SYSIGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(1, &IDTVEC(dbg), SDT_SYS386IGT, SEL_KPL,
+ setidt(2, &IDTVEC(nmi), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(2, &IDTVEC(nmi), SDT_SYS386TGT, SEL_KPL,
+ setidt(3, &IDTVEC(bpt), SDT_SYSIGT, SEL_UPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(3, &IDTVEC(bpt), SDT_SYS386IGT, SEL_UPL,
+ setidt(4, &IDTVEC(ofl), SDT_SYSTGT, SEL_UPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(4, &IDTVEC(ofl), SDT_SYS386TGT, SEL_UPL,
+ setidt(5, &IDTVEC(bnd), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(5, &IDTVEC(bnd), SDT_SYS386TGT, SEL_KPL,
+ setidt(6, &IDTVEC(ill), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(6, &IDTVEC(ill), SDT_SYS386TGT, SEL_KPL,
+ setidt(7, &IDTVEC(dna), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(7, &IDTVEC(dna), SDT_SYS386TGT, SEL_KPL
- , GSEL(GCODE_SEL, SEL_KPL));
+#if 0
setidt(8, 0, SDT_SYSTASKGT, SEL_KPL, GSEL(GPANIC_SEL, SEL_KPL));
- setidt(9, &IDTVEC(fpusegm), SDT_SYS386TGT, SEL_KPL,
+#endif
+ setidt(9, &IDTVEC(fpusegm), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(10, &IDTVEC(tss), SDT_SYS386TGT, SEL_KPL,
+ setidt(10, &IDTVEC(tss), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(11, &IDTVEC(missing), SDT_SYS386TGT, SEL_KPL,
+ setidt(11, &IDTVEC(missing), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(12, &IDTVEC(stk), SDT_SYS386TGT, SEL_KPL,
+ setidt(12, &IDTVEC(stk), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(13, &IDTVEC(prot), SDT_SYS386TGT, SEL_KPL,
+ setidt(13, &IDTVEC(prot), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(14, &IDTVEC(page), SDT_SYS386TGT, SEL_KPL,
+ setidt(14, &IDTVEC(page), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(15, &IDTVEC(rsvd), SDT_SYS386TGT, SEL_KPL,
+ setidt(15, &IDTVEC(rsvd), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(16, &IDTVEC(fpu), SDT_SYS386TGT, SEL_KPL,
+ setidt(16, &IDTVEC(fpu), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(17, &IDTVEC(align), SDT_SYS386TGT, SEL_KPL,
+ setidt(17, &IDTVEC(align), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(18, &IDTVEC(mchk), SDT_SYS386TGT, SEL_KPL,
+ setidt(18, &IDTVEC(mchk), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(19, &IDTVEC(xmm), SDT_SYS386TGT, SEL_KPL,
+ setidt(19, &IDTVEC(xmm), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(0x80, &IDTVEC(int0x80_syscall), SDT_SYS386TGT, SEL_UPL,
+ setidt(0x80, &IDTVEC(int0x80_syscall), SDT_SYSTGT, SEL_UPL,
GSEL(GCODE_SEL, SEL_KPL));
r_idt.rd_limit = sizeof(idt0) - 1;
- r_idt.rd_base = (int) idt;
+ r_idt.rd_base = (long) idt;
lidt(&r_idt);
/*
@@ -1117,23 +1164,21 @@
#endif
finishidentcpu(); /* Final stage of CPU initialization */
- setidt(6, &IDTVEC(ill), SDT_SYS386TGT, SEL_KPL,
+ setidt(6, &IDTVEC(ill), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
- setidt(13, &IDTVEC(prot), SDT_SYS386TGT, SEL_KPL,
+ setidt(13, &IDTVEC(prot), SDT_SYSTGT, SEL_KPL,
GSEL(GCODE_SEL, SEL_KPL));
initializecpu(); /* Initialize CPU registers */
/* make an initial tss so cpu can get interrupt stack on syscall! */
+#if 0
PCPU_SET(common_tss.tss_esp0, thread0.td_kstack +
KSTACK_PAGES * PAGE_SIZE - sizeof(struct pcb));
- PCPU_SET(common_tss.tss_ss0, GSEL(GDATA_SEL, SEL_KPL));
+#endif
gsel_tss = GSEL(GPROC0_SEL, SEL_KPL);
- private_tss = 0;
- PCPU_SET(tss_gdt, &gdt[GPROC0_SEL].sd);
- PCPU_SET(common_tssd, *PCPU_GET(tss_gdt));
- PCPU_SET(common_tss.tss_ioopt, (sizeof (struct i386tss)) << 16);
ltr(gsel_tss);
+#if 0
dblfault_tss.tss_esp = dblfault_tss.tss_esp0 = dblfault_tss.tss_esp1 =
dblfault_tss.tss_esp2 = (int)&dblfault_stack[sizeof(dblfault_stack)];
dblfault_tss.tss_ss = dblfault_tss.tss_ss0 = dblfault_tss.tss_ss1 =
@@ -1148,6 +1193,7 @@
dblfault_tss.tss_ds = dblfault_tss.tss_es = dblfault_tss.tss_fs =
dblfault_tss.tss_gs = GSEL(GDATA_SEL, SEL_KPL);
dblfault_tss.tss_cs = GSEL(GCODE_SEL, SEL_KPL);
+#endif
getmemsize(first);
init_param2(physmem);
@@ -1162,11 +1208,7 @@
/* setup proc 0's pcb */
thread0.td_pcb->pcb_flags = 0; /* XXXKSE */
-#ifdef PAE
- thread0.td_pcb->pcb_cr3 = (int)IdlePDPT;
-#else
- thread0.td_pcb->pcb_cr3 = (int)IdlePTD;
-#endif
+ thread0.td_pcb->pcb_cr3 = (long)IdlePML4;
thread0.td_frame = &proc0_tf;
}
==== //depot/projects/hammer/sys/x86_64/x86_64/trap.c#20 (text+ko) ====
@@ -600,7 +600,7 @@
code = frame->tf_err;
type = frame->tf_trapno;
- sdtossd(&gdt[IDXSEL(frame->tf_cs & 0xffff)].sd, &softseg);
+ sdtossd(&gdt[IDXSEL(frame->tf_cs & 0xffff)], &softseg);
if (type <= MAX_TRAP_MSG)
printf("\n\nFatal trap %d: %s while in %s mode\n",
@@ -626,8 +626,8 @@
printf("frame pointer = 0x%x:0x%x\n", ss, frame->tf_rbp);
printf("code segment = base 0x%x, limit 0x%x, type 0x%x\n",
softseg.ssd_base, softseg.ssd_limit, softseg.ssd_type);
- printf(" = DPL %d, pres %d, def32 %d, gran %d\n",
- softseg.ssd_dpl, softseg.ssd_p, softseg.ssd_def32,
+ printf(" = DPL %d, pres %d, long %d, def32 %d, gran %d\n",
+ softseg.ssd_dpl, softseg.ssd_p, softseg.ssd_long, softseg.ssd_def32,
softseg.ssd_gran);
printf("processor eflags = ");
if (frame->tf_rflags & PSL_T)
@@ -663,6 +663,7 @@
panic("unknown/reserved trap");
}
+#if 0
/*
* Double fault handler. Called when a fault occurs while writing
* a frame for a trap/exception onto the stack. This usually occurs
@@ -679,11 +680,12 @@
dblfault_handler()
{
printf("\nFatal double fault:\n");
- printf("eip = 0x%x\n", PCPU_GET(common_tss.tss_eip));
- printf("esp = 0x%x\n", PCPU_GET(common_tss.tss_esp));
- printf("ebp = 0x%x\n", PCPU_GET(common_tss.tss_ebp));
+ printf("eip = 0x%x\n", common_tss.tss_rip);
+ printf("esp = 0x%x\n", common_tss.tss_rsp);
+ printf("ebp = 0x%x\n", common_tss.tss_rbp);
panic("double fault");
}
+#endif
/*
* syscall - system call request C handler
More information about the p4-projects
mailing list