aboutsummaryrefslogtreecommitdiff
path: root/src/cpu/qemu-x86/cache_as_ram_bootblock.S
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/qemu-x86/cache_as_ram_bootblock.S')
-rw-r--r--src/cpu/qemu-x86/cache_as_ram_bootblock.S20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/cpu/qemu-x86/cache_as_ram_bootblock.S b/src/cpu/qemu-x86/cache_as_ram_bootblock.S
index 8e78aaaf96..f8dab1a728 100644
--- a/src/cpu/qemu-x86/cache_as_ram_bootblock.S
+++ b/src/cpu/qemu-x86/cache_as_ram_bootblock.S
@@ -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