aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2013-02-18 21:57:26 -0500
committerKevin O'Connor <kevin@koconnor.net>2013-02-18 22:00:31 -0500
commitbbd04589279e8ebd4df6a928e06d1cf495fd0d9e (patch)
treec38c36c1cee4ed37130ef41286e53af5eb51d36c
parent3e86d6bb2c97626f238e42bb2a2abab2807b8c21 (diff)
downloadseabios-bbd04589279e8ebd4df6a928e06d1cf495fd0d9e.tar.gz
Minor assembler enhancements to __csm_return.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
-rw-r--r--src/romlayout.S17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/romlayout.S b/src/romlayout.S
index 42f8761..b1628ef 100644
--- a/src/romlayout.S
+++ b/src/romlayout.S
@@ -384,6 +384,7 @@ entry_elf:
.code16gcc
+// UEFI Compatibility Support Module (CSM) entry point
EXPORTFUNC entry_csm
entry_csm:
// Backup register state
@@ -408,22 +409,20 @@ entry_csm:
movl $_cfunc32flat_handle_csm, %edx
jmp transition32
- .code32
-
DECLFUNC __csm_return
+ .code32
__csm_return:
- movl %eax, %ebx
- movl $2f, %edx
+ movl $1f, %edx
jmp transition16big
.code16gcc
// Switch back to original stack
-2: movzwl BREGS_code+2(%ebx), %eax
- movl %eax, %ecx
+1: movzwl BREGS_code+2(%eax), %edx
+ movl %edx, %ecx
shll $4, %ecx
- subl %ecx, %ebx
- movl %eax, %ss
- movl %ebx, %esp
+ subl %ecx, %eax
+ movl %edx, %ss
+ movl %eax, %esp
// Restore register state and return.
POPBREGS