diff options
author | Ian Moffett <ian@osmora.org> | 2023-12-17 20:24:15 -0500 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2023-12-17 20:24:15 -0500 |
commit | 8bfb0c8da5b224ebfd4118aad94a68a4c240e344 (patch) | |
tree | b7e02ddd733215df9a9c0cf8072b1a1bc9d18757 /sys/arch/amd64/trap.S | |
parent | a7aac6787783f3f5920aec00245141834b859d69 (diff) |
kernel/amd64: trap: Fix stack issues
This fixes a bug relating to a lack of error code (pushed by hardware)
misaligning the stack.
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/arch/amd64/trap.S')
-rw-r--r-- | sys/arch/amd64/trap.S | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/sys/arch/amd64/trap.S b/sys/arch/amd64/trap.S index 46e36bb..9dc1f6a 100644 --- a/sys/arch/amd64/trap.S +++ b/sys/arch/amd64/trap.S @@ -37,8 +37,7 @@ __KERNEL_META "$Hyra$: trap.S, Ian Marco Moffett, \ .text .globl breakpoint_handler breakpoint_handler: - push $0 - push_trapframe $TRAP_BREAKPOINT + push_trapframe_ec $TRAP_BREAKPOINT handle_trap @@ -48,8 +47,7 @@ breakpoint_handler: .globl arith_err arith_err: - push $0 - push_trapframe $TRAP_ARITH_ERR + push_trapframe_ec $TRAP_ARITH_ERR handle_trap @@ -59,8 +57,7 @@ arith_err: .globl overflow overflow: - push $0 - push_trapframe $TRAP_OVERFLOW + push_trapframe_ec $TRAP_OVERFLOW handle_trap @@ -70,8 +67,7 @@ overflow: .globl bound_range bound_range: - push $0 - push_trapframe $TRAP_BOUND_RANGE + push_trapframe_ec $TRAP_BOUND_RANGE handle_trap @@ -81,8 +77,7 @@ bound_range: .globl invl_op invl_op: - push $0 - push_trapframe $TRAP_INVLOP + push_trapframe_ec $TRAP_INVLOP handle_trap @@ -142,8 +137,7 @@ page_fault: .globl nmi nmi: - push $0 - push_trapframe $TRAP_NMI + push_trapframe_ec $TRAP_NMI handle_trap |