aboutsummaryrefslogtreecommitdiff
path: root/src/stacks.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2010-11-25 08:52:50 -0500
committerKevin O'Connor <kevin@koconnor.net>2010-11-25 08:52:50 -0500
commit4057f9847e94147aaa9799b92ba4561506333a57 (patch)
tree240e28b8ffa057b5716c3378e7623d23870e7033 /src/stacks.c
parente2623fc6bce2a332d58fa00b00787432102fb089 (diff)
downloadseabios-hppa-4057f9847e94147aaa9799b92ba4561506333a57.zip
seabios-hppa-4057f9847e94147aaa9799b92ba4561506333a57.tar.gz
seabios-hppa-4057f9847e94147aaa9799b92ba4561506333a57.tar.bz2
Don't pass return address to transition(32,16,16big) on stack.
It's difficult to have a uniform view of the stack when transition modes, so pass the return address in a register. As a result, the transition functions only access memory via the %cs selector now.
Diffstat (limited to 'src/stacks.c')
-rw-r--r--src/stacks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stacks.c b/src/stacks.c
index 14f6f8a..a68d37c 100644
--- a/src/stacks.c
+++ b/src/stacks.c
@@ -66,11 +66,11 @@ call32(void *func)
" movl %%ss, %0\n"
// Transition to 32bit mode, call func, return to 16bit
- " pushl $(" __stringify(BUILD_BIOS_ADDR) " + 1f)\n"
+ " movl $(" __stringify(BUILD_BIOS_ADDR) " + 1f), %%edx\n"
" jmp transition32\n"
" .code32\n"
"1:calll *%2\n"
- " pushl $2f\n"
+ " movl $2f, %%edx\n"
" jmp transition16big\n"
// Restore ds/ss/esp