summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/include
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2018-07-03 20:15:58 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2018-07-03 20:15:58 +0000
commit9decf10757b69d8f3d9fc71615993eb79208ce45 (patch)
treede265a7348142ac58cceb9d87e046550489612c8 /sys/arch/amd64/include
parentbf5fb2f6bf3a718abb81ea9ea8df203780dabd82 (diff)
Make intrframe the exact same size as trapframe: instead of pushing
the PPL on top, store it where trapframe puts the trap number. This makes interrupt handlers get called with the correct stack alignment. Also, document the use of if_err to differentiate resumed/recursed interrupts from 'real' ones. tested in snaps ok deraadt@
Diffstat (limited to 'sys/arch/amd64/include')
-rw-r--r--sys/arch/amd64/include/frame.h7
-rw-r--r--sys/arch/amd64/include/i82093reg.h4
2 files changed, 5 insertions, 6 deletions
diff --git a/sys/arch/amd64/include/frame.h b/sys/arch/amd64/include/frame.h
index c6a152398eb..68b72ec04db 100644
--- a/sys/arch/amd64/include/frame.h
+++ b/sys/arch/amd64/include/frame.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: frame.h,v 1.8 2018/04/26 12:47:02 guenther Exp $ */
+/* $OpenBSD: frame.h,v 1.9 2018/07/03 20:15:57 guenther Exp $ */
/* $NetBSD: frame.h,v 1.1 2003/04/26 18:39:40 fvdl Exp $ */
/*-
@@ -116,7 +116,6 @@ struct trapframe {
* Interrupt stack frame
*/
struct intrframe {
- int64_t if_ppl;
int64_t if_rdi;
int64_t if_rsi;
int64_t if_rdx;
@@ -129,14 +128,14 @@ struct intrframe {
int64_t if_r13;
int64_t if_r14;
int64_t if_r15;
- u_int64_t __if_err; /* for compat with trap frame - err */
+ int64_t if_err; /* IREENT_MAGIC if resume/recurse */
int64_t if_rbx;
int64_t if_rax;
int64_t tf_gs;
int64_t tf_fs;
int64_t tf_es;
int64_t tf_ds;
- u_int64_t __if_trapno; /* for compat with trap frame - trapno */
+ int64_t if_ppl; /* previous priority level */
int64_t if_rbp;
/* below portion defined in hardware */
int64_t if_rip;
diff --git a/sys/arch/amd64/include/i82093reg.h b/sys/arch/amd64/include/i82093reg.h
index e1fcfc9cd45..6f80d399a34 100644
--- a/sys/arch/amd64/include/i82093reg.h
+++ b/sys/arch/amd64/include/i82093reg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82093reg.h,v 1.6 2016/06/29 06:05:15 mlarkin Exp $ */
+/* $OpenBSD: i82093reg.h,v 1.7 2018/07/03 20:15:57 guenther Exp $ */
/* $NetBSD: i82093reg.h,v 1.1 2003/02/26 21:26:10 fvdl Exp $ */
/*-
@@ -160,7 +160,7 @@
ioapic_asm_unlock(num)
#define ioapic_unmask(num) \
- cmpq $IREENT_MAGIC,(TF_ERR+8)(%rsp) ;\
+ cmpq $IREENT_MAGIC,IF_ERR(%rsp) ;\
jne 79f ;\
movq IS_PIC(%r14),%rdi ;\
ioapic_asm_lock(num) ;\