]> xenbits.xensource.com Git - seabios.git/commitdiff
Minor assembler enhancements to __csm_return.
authorKevin O'Connor <kevin@koconnor.net>
Tue, 19 Feb 2013 02:57:26 +0000 (21:57 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Tue, 19 Feb 2013 03:00:31 +0000 (22:00 -0500)
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/romlayout.S

index 42f87614022286d2bf2efc63995e9e4b43d6886a..b1628eff710bf92e6dcbbd6a224ef81a819a10af 100644 (file)
@@ -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