diff options
author | Ian Moffett <ian@osmora.org> | 2024-07-16 18:06:08 -0400 |
---|---|---|
committer | Ian Moffett <ian@osmora.org> | 2024-07-16 18:06:08 -0400 |
commit | c0d44802625617af6b00cb3f2ad46fd0224229f4 (patch) | |
tree | df224913327bed75ea762cba8e8a0e87bf4ffc63 /sys/include/arch/amd64/frameasm.h | |
parent | 9308d25702d3b855376cacc9e7c5f5baa505ecd0 (diff) |
kernel/amd64: trap: Fix TRAPENTRY %CS offset
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'sys/include/arch/amd64/frameasm.h')
-rw-r--r-- | sys/include/arch/amd64/frameasm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/include/arch/amd64/frameasm.h b/sys/include/arch/amd64/frameasm.h index 8983d36..41c9ebe 100644 --- a/sys/include/arch/amd64/frameasm.h +++ b/sys/include/arch/amd64/frameasm.h @@ -126,7 +126,7 @@ */ #define TRAPENTRY(ENTLABEL, TRAPNO) \ ENTLABEL: \ - testq $0x3, 8(%rsp) ; \ + testq $0x3, 16(%rsp) ; \ jz 1f ; \ lfence ; \ swapgs ; \ @@ -134,7 +134,7 @@ mov %rsp, %rdi ; \ call trap_handler ; \ pop_trapframe_ec ; \ - testq $0x3, 8(%rsp) ; \ + testq $0x3, 16(%rsp) ; \ jz 2f ; \ lfence ; \ swapgs ; \ |