aboutsummaryrefslogtreecommitdiffstats
path: root/extras/mini-os/arch
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-02-02 15:30:49 +0000
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2007-02-02 15:30:49 +0000
commit502043ef9001010fc8f6390a15b50d584d1e088f (patch)
tree6c235901a15e12597b11dd9ad944af44353bb372 /extras/mini-os/arch
parent8ae342b80bfa616e1e25287a4d496139a7ab88cf (diff)
downloadxen-502043ef9001010fc8f6390a15b50d584d1e088f.tar.gz
xen-502043ef9001010fc8f6390a15b50d584d1e088f.tar.bz2
xen-502043ef9001010fc8f6390a15b50d584d1e088f.zip
minios: Fix ret_from_exception routine. Stack consistency is now preserved.
Signed-off-by: Grzegorz Milos <gm281@cam.ac.uk>
Diffstat (limited to 'extras/mini-os/arch')
-rw-r--r--extras/mini-os/arch/x86/x86_32.S9
1 files changed, 4 insertions, 5 deletions
diff --git a/extras/mini-os/arch/x86/x86_32.S b/extras/mini-os/arch/x86/x86_32.S
index 46fce169ca..b10bc23401 100644
--- a/extras/mini-os/arch/x86/x86_32.S
+++ b/extras/mini-os/arch/x86/x86_32.S
@@ -69,7 +69,7 @@ CS = 0x2C
popl %ds; \
popl %es; \
addl $4,%esp; \
- iret; \
+ iret;
ENTRY(divide_error)
pushl $0 # no error code
@@ -101,10 +101,9 @@ do_exception:
jmp ret_from_exception
ret_from_exception:
- movb CS(%esp),%cl
- test $2,%cl # slow return to ring 2 or 3
- jne safesti
- RESTORE_ALL
+ movb CS(%esp),%cl
+ addl $8,%esp
+ RESTORE_ALL
# A note on the "critical region" in our callback handler.
# We want to avoid stacking callback handlers due to events occurring