summaryrefslogtreecommitdiffstats
path: root/src/arch/x86/assembly_entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/assembly_entry.S')
-rw-r--r--src/arch/x86/assembly_entry.S10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/arch/x86/assembly_entry.S b/src/arch/x86/assembly_entry.S
index 869acc84e2fc..9a9a0465dc1d 100644
--- a/src/arch/x86/assembly_entry.S
+++ b/src/arch/x86/assembly_entry.S
@@ -33,8 +33,8 @@ _start:
/* reset stack pointer to CAR/EARLYRAM stack */
mov $_STACK_TOP, %esp
+#if ENV_SEPARATE_DATA_AND_BSS
/* clear .bss section as it is not shared */
-#if ENV_SEPARATE_BSS
cld
xor %eax, %eax
movl $(_ebss), %ecx
@@ -42,6 +42,14 @@ _start:
sub %edi, %ecx
shrl $2, %ecx
rep stosl
+
+ /* Copy .data section content to Cache-As-Ram */
+ movl $(_edata), %ecx
+ movl $(_data), %edi
+ sub %edi, %ecx
+ shrl $2, %ecx
+ movl $(_data_load),%esi
+ rep movsl
#endif
#if ((ENV_SEPARATE_VERSTAGE && CONFIG(VERSTAGE_DEBUG_SPINLOOP)) \