diff options
author | dzwdz | 2021-07-24 18:53:34 +0200 |
---|---|---|
committer | dzwdz | 2021-07-24 18:53:34 +0200 |
commit | ae9c1d1b16061242068353ff9064c8c9ef63b577 (patch) | |
tree | 59c91ac4d15d8231cab1174b7402128ce895fb0f /src/kernel/arch/i386/sysenter.s | |
parent | b0690678bef7d51bbdadce6b606c835ce76d4d92 (diff) |
sysexit() now overrides all registers
when doing anything more complex than starting a new program, you pretty
much need to pass a full register dump. otherwise stuff will break
Diffstat (limited to 'src/kernel/arch/i386/sysenter.s')
-rw-r--r-- | src/kernel/arch/i386/sysenter.s | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/kernel/arch/i386/sysenter.s b/src/kernel/arch/i386/sysenter.s index a982dd8..24cbc89 100644 --- a/src/kernel/arch/i386/sysenter.s +++ b/src/kernel/arch/i386/sysenter.s @@ -8,12 +8,9 @@ .set IA32_SYSENTER_EIP, 0x176 .section .text -.global sysexit -.type sysexit, @function -sysexit: - mov 4(%esp), %edx - mov 8(%esp), %ecx - +.global _sysexit_real +.type _sysexit_real, @function +_sysexit_real: mov $(SEG_r3data << 3 | 3), %ax mov %ax, %ds mov %ax, %es @@ -25,6 +22,9 @@ sysexit: or $0x80000000, %eax mov %eax, %cr0 + // restore the registers + mov $_sysexit_regs, %esp + popal // probably a bad idea sysexit |