summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2004-05-23 16:50:55 +0000
committerbde <bde@FreeBSD.org>2004-05-23 16:50:55 +0000
commitf4c70ac59dd47ee285a43f028dceba9f40026e1c (patch)
tree8293106aafbe0dd3929ca37cf740e1a851a0797d
parent870705e025a2aaa79359b9c3a0559efbecde2435 (diff)
downloadFreeBSD-src-f4c70ac59dd47ee285a43f028dceba9f40026e1c.zip
FreeBSD-src-f4c70ac59dd47ee285a43f028dceba9f40026e1c.tar.gz
MFamd64 (put TF_EIP in assym.s and use it instead of a magic offset in
FAKE_MCOUNT()s).
-rw-r--r--sys/i386/i386/apic_vector.s6
-rw-r--r--sys/i386/i386/exception.s6
-rw-r--r--sys/i386/i386/genassym.c1
-rw-r--r--sys/i386/isa/atpic_vector.s2
4 files changed, 8 insertions, 7 deletions
diff --git a/sys/i386/i386/apic_vector.s b/sys/i386/i386/apic_vector.s
index f68119d..a4c5452 100644
--- a/sys/i386/i386/apic_vector.s
+++ b/sys/i386/i386/apic_vector.s
@@ -77,7 +77,7 @@ IDTVEC(vec_name) ; \
movl %eax, %es ; \
movl $KPSEL, %eax ; /* reload with per-CPU data segment */ \
movl %eax, %fs ; \
- FAKE_MCOUNT(13*4(%esp)) ; \
+ FAKE_MCOUNT(TF_EIP(%esp)) ; \
movl lapic, %edx ; /* pointer to local APIC */ \
movl LA_ISR + 16 * (index)(%edx), %eax ; /* load ISR */ \
bsrl %eax, %eax ; /* index of highset set bit in ISR */ \
@@ -263,7 +263,7 @@ IDTVEC(statclock)
movl lapic, %edx
movl $0, LA_EOI(%edx) /* End Of Interrupt to APIC */
- FAKE_MCOUNT(13*4(%esp))
+ FAKE_MCOUNT(TF_EIP(%esp))
pushl $0 /* XXX convert trapframe to clockframe */
call forwarded_statclock
@@ -292,7 +292,7 @@ IDTVEC(cpuast)
movl lapic, %edx
movl $0, LA_EOI(%edx) /* End Of Interrupt to APIC */
- FAKE_MCOUNT(13*4(%esp))
+ FAKE_MCOUNT(TF_EIP(%esp))
MEXITCOUNT
jmp doreti
diff --git a/sys/i386/i386/exception.s b/sys/i386/i386/exception.s
index b8fbfa3..7f3f44d 100644
--- a/sys/i386/i386/exception.s
+++ b/sys/i386/i386/exception.s
@@ -134,7 +134,7 @@ alltraps_with_regs_pushed:
movl %eax,%es
movl $KPSEL,%eax
movl %eax,%fs
- FAKE_MCOUNT(13*4(%esp))
+ FAKE_MCOUNT(TF_EIP(%esp))
calltrap:
FAKE_MCOUNT(btrap) /* init "from" btrap -> calltrap */
call trap
@@ -172,7 +172,7 @@ IDTVEC(lcall_syscall)
movl %eax,%es
movl $KPSEL,%eax
movl %eax,%fs
- FAKE_MCOUNT(13*4(%esp))
+ FAKE_MCOUNT(TF_EIP(%esp))
call syscall
MEXITCOUNT
jmp doreti
@@ -197,7 +197,7 @@ IDTVEC(int0x80_syscall)
movl %eax,%es
movl $KPSEL,%eax
movl %eax,%fs
- FAKE_MCOUNT(13*4(%esp))
+ FAKE_MCOUNT(TF_EIP(%esp))
call syscall
MEXITCOUNT
jmp doreti
diff --git a/sys/i386/i386/genassym.c b/sys/i386/i386/genassym.c
index 62226aa..65b1dc0 100644
--- a/sys/i386/i386/genassym.c
+++ b/sys/i386/i386/genassym.c
@@ -148,6 +148,7 @@ ASSYM(PCB_VM86CALL, PCB_VM86CALL);
ASSYM(TF_TRAPNO, offsetof(struct trapframe, tf_trapno));
ASSYM(TF_ERR, offsetof(struct trapframe, tf_err));
+ASSYM(TF_EIP, offsetof(struct trapframe, tf_eip));
ASSYM(TF_CS, offsetof(struct trapframe, tf_cs));
ASSYM(TF_EFLAGS, offsetof(struct trapframe, tf_eflags));
ASSYM(SIGF_HANDLER, offsetof(struct sigframe, sf_ahu.sf_handler));
diff --git a/sys/i386/isa/atpic_vector.s b/sys/i386/isa/atpic_vector.s
index 008335d..c1fe463 100644
--- a/sys/i386/isa/atpic_vector.s
+++ b/sys/i386/isa/atpic_vector.s
@@ -59,7 +59,7 @@ IDTVEC(vec_name) ; \
movl $KPSEL, %eax ; /* reload with per-CPU data segment */ \
movl %eax, %fs ; \
; \
- FAKE_MCOUNT(13*4(%esp)) ; \
+ FAKE_MCOUNT(TF_EIP(%esp)) ; \
pushl $irq_num; /* pass the IRQ */ \
call atpic_handle_intr ; \
addl $4, %esp ; /* discard the parameter */ \
OpenPOWER on IntegriCloud