emulation/qemu-x86: Fix romstage stack alignment

Also tidy up some register usage.

Change-Id: I5b4b4a29c854f4ca165cede4e9b6755a6c577e76
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/34975
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Kyösti Mälkki 2019-08-18 08:30:30 +03:00
parent 2dba2949fa
commit a7cac0a681
1 changed files with 10 additions and 10 deletions

View File

@ -28,22 +28,22 @@ cache_as_ram:
* initialization.
*/
post_code(0x21)
movl $_car_stack_end, %esp
/* Align the stack and keep aligned for call to bootblock_c_entry() */
and $0xfffffff0, %esp
sub $12, %esp
/* Clear the cache memory region. This will also clear CAR GLOBAL */
movl $_car_region_start, %esi
movl %esi, %edi
movl $_car_region_start, %edi
movl $_car_region_end, %ecx
sub $_car_region_start, %ecx
sub %edi, %ecx
shr $2, %ecx
xorl %eax, %eax
rep stosl
post_code(0x21)
movl $_car_stack_end, %esp
/* Align the stack and keep aligned for call to bootblock_c_entry() */
and $0xfffffff0, %esp
sub $4, %esp
/* Restore the BIST result and timestamps. */
movd %mm0, %ebx
movd %mm1, %eax