summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-10-09 19:54:52 +0000
committeriedowse <iedowse@FreeBSD.org>2001-10-09 19:54:52 +0000
commit478926021cd002b82ec79025079ea1f70b890534 (patch)
treecad4d7a6717602ee2648b1e931f37e2c9f3104ad
parentffdeb5e0d78f9082409a5fc26f40eb5cf3344d60 (diff)
downloadFreeBSD-src-478926021cd002b82ec79025079ea1f70b890534.zip
FreeBSD-src-478926021cd002b82ec79025079ea1f70b890534.tar.gz
Remove the Xresume* labels from the i386 interrupt handlers; the
code in ipl.s and icu_ipl.s that used them was removed when the interrupt thread system was committed. Debuggers also knew about Xresume* because these labels hide the real names of the interrupt handlers (Xintr*), and debuggers need to special-case interrupt handlers to get the interrupt frame. Both gdb and ddb will now use the Xintr* and Xfastintr* symbols to detect interrupt frames. Fast interrupt frames were never identified correctly before, so this fixes the problem of the running stack frame getting lost in a ddb or gdb trace generated from a fast interrupt - e.g. when debugging a simple infinite loop in the kernel using a serial console, the frame containing the loop would never appear in a gdb or ddb trace. Reviewed by: jhb, bde
-rw-r--r--gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c7
-rw-r--r--gnu/usr.bin/binutils/gdb/kvm-fbsd.c7
-rw-r--r--sys/amd64/amd64/apic_vector.S2
-rw-r--r--sys/amd64/amd64/db_trace.c3
-rw-r--r--sys/amd64/isa/atpic_vector.S1
-rw-r--r--sys/amd64/isa/icu_vector.S1
-rw-r--r--sys/amd64/isa/icu_vector.s1
-rw-r--r--sys/i386/i386/apic_vector.s2
-rw-r--r--sys/i386/i386/db_trace.c3
-rw-r--r--sys/i386/isa/apic_vector.s2
-rw-r--r--sys/i386/isa/atpic_vector.s1
-rw-r--r--sys/i386/isa/icu_vector.s1
12 files changed, 14 insertions, 17 deletions
diff --git a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
index f2815bb..209732e 100644
--- a/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
+++ b/gnu/usr.bin/binutils/gdb/i386/kvm-fbsd.c
@@ -125,7 +125,8 @@ static CORE_ADDR pcpu;
* Symbol names of kernel entry points. Use special frames.
*/
#define KSYM_TRAP "calltrap"
-#define KSYM_INTERRUPT "Xresume"
+#define KSYM_INTR "Xintr"
+#define KSYM_FASTINTR "Xfastintr"
#define KSYM_SYSCALL "Xsyscall"
/*
@@ -160,7 +161,9 @@ struct frame_info *fr;
if (sym != NULL) {
if (strcmp (SYMBOL_NAME(sym), KSYM_TRAP) == 0)
frametype = tf_trap;
- else if (strncmp (SYMBOL_NAME(sym), KSYM_INTERRUPT, 7) == 0)
+ else if (strncmp (SYMBOL_NAME(sym), KSYM_INTR,
+ strlen(KSYM_INTR)) == 0 || strncmp (SYMBOL_NAME(sym),
+ KSYM_FASTINTR, strlen(KSYM_FASTINTR)) == 0)
frametype = tf_interrupt;
else if (strcmp (SYMBOL_NAME(sym), KSYM_SYSCALL) == 0)
frametype = tf_syscall;
diff --git a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
index f2815bb..209732e 100644
--- a/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
+++ b/gnu/usr.bin/binutils/gdb/kvm-fbsd.c
@@ -125,7 +125,8 @@ static CORE_ADDR pcpu;
* Symbol names of kernel entry points. Use special frames.
*/
#define KSYM_TRAP "calltrap"
-#define KSYM_INTERRUPT "Xresume"
+#define KSYM_INTR "Xintr"
+#define KSYM_FASTINTR "Xfastintr"
#define KSYM_SYSCALL "Xsyscall"
/*
@@ -160,7 +161,9 @@ struct frame_info *fr;
if (sym != NULL) {
if (strcmp (SYMBOL_NAME(sym), KSYM_TRAP) == 0)
frametype = tf_trap;
- else if (strncmp (SYMBOL_NAME(sym), KSYM_INTERRUPT, 7) == 0)
+ else if (strncmp (SYMBOL_NAME(sym), KSYM_INTR,
+ strlen(KSYM_INTR)) == 0 || strncmp (SYMBOL_NAME(sym),
+ KSYM_FASTINTR, strlen(KSYM_FASTINTR)) == 0)
frametype = tf_interrupt;
else if (strcmp (SYMBOL_NAME(sym), KSYM_SYSCALL) == 0)
frametype = tf_syscall;
diff --git a/sys/amd64/amd64/apic_vector.S b/sys/amd64/amd64/apic_vector.S
index 8096d3c..3d7a687 100644
--- a/sys/amd64/amd64/apic_vector.S
+++ b/sys/amd64/amd64/apic_vector.S
@@ -155,8 +155,6 @@ IDTVEC(vec_name) ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
; \
- /* entry point used by doreti_unpend for HWIs. */ \
-__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX avoid dbl cnt */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \
diff --git a/sys/amd64/amd64/db_trace.c b/sys/amd64/amd64/db_trace.c
index 3a07050..a4539a0 100644
--- a/sys/amd64/amd64/db_trace.c
+++ b/sys/amd64/amd64/db_trace.c
@@ -223,7 +223,8 @@ db_nextframe(fp, ip, p)
if (name != NULL) {
if (!strcmp(name, "calltrap")) {
frame_type = TRAP;
- } else if (!strncmp(name, "Xresume", 7)) {
+ } else if (!strncmp(name, "Xintr", 5) ||
+ !strncmp(name, "Xfastintr", 9)) {
frame_type = INTERRUPT;
} else if (!strcmp(name, "syscall_with_err_pushed")) {
frame_type = SYSCALL;
diff --git a/sys/amd64/isa/atpic_vector.S b/sys/amd64/isa/atpic_vector.S
index 3a42af4..bd38dda 100644
--- a/sys/amd64/isa/atpic_vector.S
+++ b/sys/amd64/isa/atpic_vector.S
@@ -106,7 +106,6 @@ IDTVEC(vec_name) ; \
enable_icus ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
-__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX late to avoid double count */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \
diff --git a/sys/amd64/isa/icu_vector.S b/sys/amd64/isa/icu_vector.S
index 3a42af4..bd38dda 100644
--- a/sys/amd64/isa/icu_vector.S
+++ b/sys/amd64/isa/icu_vector.S
@@ -106,7 +106,6 @@ IDTVEC(vec_name) ; \
enable_icus ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
-__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX late to avoid double count */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \
diff --git a/sys/amd64/isa/icu_vector.s b/sys/amd64/isa/icu_vector.s
index 3a42af4..bd38dda 100644
--- a/sys/amd64/isa/icu_vector.s
+++ b/sys/amd64/isa/icu_vector.s
@@ -106,7 +106,6 @@ IDTVEC(vec_name) ; \
enable_icus ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
-__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX late to avoid double count */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \
diff --git a/sys/i386/i386/apic_vector.s b/sys/i386/i386/apic_vector.s
index 8096d3c..3d7a687 100644
--- a/sys/i386/i386/apic_vector.s
+++ b/sys/i386/i386/apic_vector.s
@@ -155,8 +155,6 @@ IDTVEC(vec_name) ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
; \
- /* entry point used by doreti_unpend for HWIs. */ \
-__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX avoid dbl cnt */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \
diff --git a/sys/i386/i386/db_trace.c b/sys/i386/i386/db_trace.c
index 3a07050..a4539a0 100644
--- a/sys/i386/i386/db_trace.c
+++ b/sys/i386/i386/db_trace.c
@@ -223,7 +223,8 @@ db_nextframe(fp, ip, p)
if (name != NULL) {
if (!strcmp(name, "calltrap")) {
frame_type = TRAP;
- } else if (!strncmp(name, "Xresume", 7)) {
+ } else if (!strncmp(name, "Xintr", 5) ||
+ !strncmp(name, "Xfastintr", 9)) {
frame_type = INTERRUPT;
} else if (!strcmp(name, "syscall_with_err_pushed")) {
frame_type = SYSCALL;
diff --git a/sys/i386/isa/apic_vector.s b/sys/i386/isa/apic_vector.s
index 8096d3c..3d7a687 100644
--- a/sys/i386/isa/apic_vector.s
+++ b/sys/i386/isa/apic_vector.s
@@ -155,8 +155,6 @@ IDTVEC(vec_name) ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
; \
- /* entry point used by doreti_unpend for HWIs. */ \
-__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX avoid dbl cnt */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \
diff --git a/sys/i386/isa/atpic_vector.s b/sys/i386/isa/atpic_vector.s
index 3a42af4..bd38dda 100644
--- a/sys/i386/isa/atpic_vector.s
+++ b/sys/i386/isa/atpic_vector.s
@@ -106,7 +106,6 @@ IDTVEC(vec_name) ; \
enable_icus ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
-__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX late to avoid double count */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \
diff --git a/sys/i386/isa/icu_vector.s b/sys/i386/isa/icu_vector.s
index 3a42af4..bd38dda 100644
--- a/sys/i386/isa/icu_vector.s
+++ b/sys/i386/isa/icu_vector.s
@@ -106,7 +106,6 @@ IDTVEC(vec_name) ; \
enable_icus ; \
movl PCPU(CURTHREAD),%ebx ; \
incl TD_INTR_NESTING_LEVEL(%ebx) ; \
-__CONCAT(Xresume,irq_num): ; \
FAKE_MCOUNT(13*4(%esp)) ; /* XXX late to avoid double count */ \
pushl $irq_num; /* pass the IRQ */ \
call sched_ithd ; \
OpenPOWER on IntegriCloud