aboutsummaryrefslogtreecommitdiffstats
path: root/src/romlayout.S
diff options
context:
space:
mode:
authorDavid Woodhouse <David.Woodhouse@intel.com>2013-02-10 00:51:56 +0000
committerKevin O'Connor <kevin@koconnor.net>2013-02-12 21:16:02 -0500
commit4b1d2be6e1c73d1fc9a984ca7fe6c14d433171cc (patch)
treecf4bad9efdd13823460a639d614e2dc342046c04 /src/romlayout.S
parentdbdb773f73b1191975ed777c9d06de27cb4477a9 (diff)
downloadseabios-4b1d2be6e1c73d1fc9a984ca7fe6c14d433171cc.tar.gz
Unify return path for CSM to go via csm_return()
This allows us to keep the entry_csm code simple, and ensures that we consistently do things like saving the PIC mask (and later setting UmbStart) on the way back to UEFI. Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'src/romlayout.S')
-rw-r--r--src/romlayout.S23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/romlayout.S b/src/romlayout.S
index cbe6b1c6..2a2984cc 100644
--- a/src/romlayout.S
+++ b/src/romlayout.S
@@ -394,27 +394,24 @@ entry_csm:
PUSHBREGS
// Backup stack location and convert to a "flat pointer"
- movl %ss, %ebx
- movw %bx, BREGS_code+2(%esp) // Store %ss in bregs->code.seg
- shll $4, %ebx
- addl %esp, %ebx
+ movl %ss, %eax
+ movw %ax, BREGS_code+2(%esp) // Store %ss in bregs->code.seg
+ shll $4, %eax
+ addl %esp, %eax
// Change to BUILD_STACK_ADDR stack
- xorl %eax, %eax
- movw %ax, %ss
+ xorl %ebx, %ebx
+ movw %bx, %ss
movl $BUILD_STACK_ADDR, %esp
// Jump to 32bit mode and call handle_csm(bregs)
- movl $(1f + BUILD_BIOS_ADDR), %edx
+ movl $_cfunc32flat_handle_csm, %edx
jmp transition32
+
.code32
-1: movl %ebx, %eax
- calll _cfunc32flat_handle_csm - BUILD_BIOS_ADDR
- movl $2f, %edx
- jmp transition16big
- .global csm_return
-csm_return:
+ EXPORTFUNC __csm_return
+__csm_return:
movl %eax, %ebx
movl $2f, %edx
jmp transition16big