From: Kevin O'Connor Date: Tue, 21 Oct 2014 07:19:55 +0000 (-0400) Subject: Don't clobber %ax on ENTRY_INTO32 macro X-Git-Tag: rel-1.8.0~66 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=283ae1f07949c463cbba0b8cd20f703a8c1389b6;p=people%2Fandrewcoop%2Fseabios.git Don't clobber %ax on ENTRY_INTO32 macro There's no need to clobber %ax in ENTRY_INTO32. Now that %eax isn't clobbered, use ENTRY_INTO32 in entry_csm. Signed-off-by: Kevin O'Connor --- diff --git a/src/entryfuncs.S b/src/entryfuncs.S index 679b1fc..8438604 100644 --- a/src/entryfuncs.S +++ b/src/entryfuncs.S @@ -135,10 +135,9 @@ .endm // Reset stack, transition to 32bit mode, and call a C function. - // Clobbers %ax .macro ENTRY_INTO32 cfunc - xorw %ax, %ax - movw %ax, %ss + xorw %dx, %dx + movw %dx, %ss movl $ BUILD_STACK_ADDR , %esp movl $ \cfunc , %edx jmp transition32 diff --git a/src/romlayout.S b/src/romlayout.S index cca4e43..4ebbdee 100644 --- a/src/romlayout.S +++ b/src/romlayout.S @@ -431,14 +431,8 @@ entry_csm: shll $4, %eax addl %esp, %eax - // Change to BUILD_STACK_ADDR stack - xorl %ebx, %ebx - movw %bx, %ss - movl $BUILD_STACK_ADDR, %esp - - // Jump to 32bit mode and call handle_csm(bregs) - movl $_cfunc32flat_handle_csm, %edx - jmp transition32 + // Change to BUILD_STACK_ADDR stack and call handle_csm(bregs) + ENTRY_INTO32 _cfunc32flat_handle_csm DECLFUNC __csm_return .code32