summaryrefslogtreecommitdiffstats
path: root/sys/amd64/isa
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2005-12-08 18:33:30 +0000
committerjhb <jhb@FreeBSD.org>2005-12-08 18:33:30 +0000
commite2841d2b9faa3ba4a8dd511d77c48633acbccfb6 (patch)
tree9efe6d68c2b5019d44a2d7f710ee497dfef09db5 /sys/amd64/isa
parentd42177951b2a604d3cafce3433ecc900e90d3a5f (diff)
downloadFreeBSD-src-e2841d2b9faa3ba4a8dd511d77c48633acbccfb6.zip
FreeBSD-src-e2841d2b9faa3ba4a8dd511d77c48633acbccfb6.tar.gz
MFi386:
- Move PUSH_FRAME and POP_FRAME to asmacros.h and use PUSH_FRAME in atpic entry points. - Move PCPU_* asm macros out of the middle of the asm profiling macros. - Pass IRQ vector argument as an int rather than void * to reduce diffs with i386. - EOI the lapic in C for the lapic timer handler. - GC unused Xcpuast function. - Split IPI_STOP handling code of ipi_nmi_handler() out into a cpustop_handler() function and call it from Xcpustop rather than duplicating all the logic in assembly. - Fixup the list of symbols with interrupt frames in ddb traces. Xatpic_fastintr* have never existed on amd64, and the lapic timer handler and various IPI handlers were missing. - Use trapframe instead of intrframe for interrupt entry points (on amd64 the interrupt vector was already a separate argument, so the two frames were already identical) and GC intrframe. Submitted by: peter (3)
Diffstat (limited to 'sys/amd64/isa')
-rw-r--r--sys/amd64/isa/atpic.c12
-rw-r--r--sys/amd64/isa/atpic_vector.S22
-rw-r--r--sys/amd64/isa/icu.h2
3 files changed, 8 insertions, 28 deletions
diff --git a/sys/amd64/isa/atpic.c b/sys/amd64/isa/atpic.c
index 88d461f..906edda 100644
--- a/sys/amd64/isa/atpic.c
+++ b/sys/amd64/isa/atpic.c
@@ -45,7 +45,6 @@ __FBSDID("$FreeBSD$");
#include <sys/lock.h>
#include <sys/module.h>
#include <sys/mutex.h>
-#include <sys/proc.h>
#include <machine/cpufunc.h>
#include <machine/frame.h>
@@ -478,19 +477,18 @@ atpic_init(void *dummy __unused)
SYSINIT(atpic_init, SI_SUB_INTR, SI_ORDER_SECOND + 1, atpic_init, NULL)
void
-atpic_handle_intr(void *cookie, struct intrframe iframe)
+atpic_handle_intr(u_int vector, struct trapframe frame)
{
struct intsrc *isrc;
- int vec = (uintptr_t)cookie;
- KASSERT(vec < NUM_ISA_IRQS, ("unknown int %d\n", vec));
- isrc = &atintrs[vec].at_intsrc;
+ KASSERT(vector < NUM_ISA_IRQS, ("unknown int %u\n", vector));
+ isrc = &atintrs[vector].at_intsrc;
/*
* If we don't have an event, see if this is a spurious
* interrupt.
*/
- if (isrc->is_event == NULL && (vec == 7 || vec == 15)) {
+ if (isrc->is_event == NULL && (vector == 7 || vector == 15)) {
int port, isr;
/*
@@ -506,7 +504,7 @@ atpic_handle_intr(void *cookie, struct intrframe iframe)
if ((isr & IRQ_MASK(7)) == 0)
return;
}
- intr_execute_handlers(isrc, &iframe);
+ intr_execute_handlers(isrc, &frame);
}
#ifdef DEV_ISA
diff --git a/sys/amd64/isa/atpic_vector.S b/sys/amd64/isa/atpic_vector.S
index 37390a0..45027d8 100644
--- a/sys/amd64/isa/atpic_vector.S
+++ b/sys/amd64/isa/atpic_vector.S
@@ -47,27 +47,9 @@
.text ; \
SUPERALIGN_TEXT ; \
IDTVEC(vec_name) ; \
- subq $TF_RIP,%rsp ; /* skip dummy tf_err and tf_trapno */ \
- testb $SEL_RPL_MASK,TF_CS(%rsp) ; /* come from kernel? */ \
- jz 1f ; /* Yes, dont swapgs again */ \
- swapgs ; \
-1: movq %rdi,TF_RDI(%rsp) ; \
- movq %rsi,TF_RSI(%rsp) ; \
- movq %rdx,TF_RDX(%rsp) ; \
- movq %rcx,TF_RCX(%rsp) ; \
- movq %r8,TF_R8(%rsp) ; \
- movq %r9,TF_R9(%rsp) ; \
- movq %rax,TF_RAX(%rsp) ; \
- movq %rbx,TF_RBX(%rsp) ; \
- movq %rbp,TF_RBP(%rsp) ; \
- movq %r10,TF_R10(%rsp) ; \
- movq %r11,TF_R11(%rsp) ; \
- movq %r12,TF_R12(%rsp) ; \
- movq %r13,TF_R13(%rsp) ; \
- movq %r14,TF_R14(%rsp) ; \
- movq %r15,TF_R15(%rsp) ; \
+ PUSH_FRAME ; \
FAKE_MCOUNT(TF_RIP(%rsp)) ; \
- movq $irq_num, %rdi; /* pass the IRQ */ \
+ movl $irq_num, %edi; /* pass the IRQ */ \
call atpic_handle_intr ; \
MEXITCOUNT ; \
jmp doreti
diff --git a/sys/amd64/isa/icu.h b/sys/amd64/isa/icu.h
index f25fac6..ce01253 100644
--- a/sys/amd64/isa/icu.h
+++ b/sys/amd64/isa/icu.h
@@ -43,7 +43,7 @@
#define ICU_IMR_OFFSET 1
-void atpic_handle_intr(void *cookie, struct intrframe iframe);
+void atpic_handle_intr(u_int vector, struct trapframe frame);
void atpic_startup(void);
#endif /* !_AMD64_ISA_ICU_H_ */
OpenPOWER on IntegriCloud