(1) Ifdef the new dr6 variable for KDB.
While here, avoid using the old variable 'code' and remove it in trap(). ('code' was meant for holding things like %dr6, but is too small to hold %dr6 on amd64 and was reduced to an obfuscation of tf_err, with early truncation on amd64.) Submitted by: Michael Butler (imb@...)
This commit is contained in:
parent
0fcf43f6f3
commit
c2d4aad4e0
@ -176,8 +176,10 @@ trap(struct trapframe *frame)
|
||||
#endif
|
||||
struct thread *td = curthread;
|
||||
struct proc *p = td->td_proc;
|
||||
#ifdef KDB
|
||||
register_t dr6;
|
||||
int i = 0, ucode = 0, code;
|
||||
#endif
|
||||
int i = 0, ucode = 0;
|
||||
u_int type;
|
||||
register_t addr = 0;
|
||||
ksiginfo_t ksi;
|
||||
@ -259,8 +261,6 @@ trap(struct trapframe *frame)
|
||||
}
|
||||
}
|
||||
|
||||
code = frame->tf_err;
|
||||
|
||||
if (TRAPF_USERMODE(frame)) {
|
||||
/* user trap */
|
||||
|
||||
@ -378,7 +378,7 @@ trap(struct trapframe *frame)
|
||||
#ifdef DEV_ISA
|
||||
case T_NMI:
|
||||
/* machine/parity/power fail/"kitchen sink" faults */
|
||||
if (isa_nmi(code) == 0) {
|
||||
if (isa_nmi(frame->tf_err) == 0) {
|
||||
#ifdef KDB
|
||||
/*
|
||||
* NMI can be hooked up to a pushbutton
|
||||
@ -564,7 +564,7 @@ trap(struct trapframe *frame)
|
||||
#ifdef DEV_ISA
|
||||
case T_NMI:
|
||||
/* machine/parity/power fail/"kitchen sink" faults */
|
||||
if (isa_nmi(code) == 0) {
|
||||
if (isa_nmi(frame->tf_err) == 0) {
|
||||
#ifdef KDB
|
||||
/*
|
||||
* NMI can be hooked up to a pushbutton
|
||||
|
@ -189,8 +189,10 @@ trap(struct trapframe *frame)
|
||||
#endif
|
||||
struct thread *td = curthread;
|
||||
struct proc *p = td->td_proc;
|
||||
#ifdef KDB
|
||||
register_t dr6;
|
||||
int i = 0, ucode = 0, code;
|
||||
#endif
|
||||
int i = 0, ucode = 0;
|
||||
u_int type;
|
||||
register_t addr = 0;
|
||||
vm_offset_t eva;
|
||||
@ -293,7 +295,6 @@ trap(struct trapframe *frame)
|
||||
}
|
||||
}
|
||||
eva = 0;
|
||||
code = frame->tf_err;
|
||||
if (type == T_PAGEFLT) {
|
||||
/*
|
||||
* For some Cyrix CPUs, %cr2 is clobbered by
|
||||
@ -467,7 +468,7 @@ trap(struct trapframe *frame)
|
||||
goto userout;
|
||||
#else /* !POWERFAIL_NMI */
|
||||
/* machine/parity/power fail/"kitchen sink" faults */
|
||||
if (isa_nmi(code) == 0) {
|
||||
if (isa_nmi(frame->tf_err) == 0) {
|
||||
#ifdef KDB
|
||||
/*
|
||||
* NMI can be hooked up to a pushbutton
|
||||
@ -730,7 +731,7 @@ trap(struct trapframe *frame)
|
||||
goto out;
|
||||
#else /* !POWERFAIL_NMI */
|
||||
/* machine/parity/power fail/"kitchen sink" faults */
|
||||
if (isa_nmi(code) == 0) {
|
||||
if (isa_nmi(frame->tf_err) == 0) {
|
||||
#ifdef KDB
|
||||
/*
|
||||
* NMI can be hooked up to a pushbutton
|
||||
|
Loading…
Reference in New Issue
Block a user