src/drivers/intel/fsp1_1/cache_as_ram.S: Clear _bss area only

Whole car region is cleared, while only small part needs to be done.

Clear .bss area only

Tested on Facebook FBG1701

Change-Id: I021c2f7d3531c553015fde98d155915f897b434d
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47760
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Frans Hendriks 2020-11-19 15:45:43 +01:00 committed by Patrick Georgi
parent f752fc6546
commit 335eb1219c
1 changed files with 5 additions and 6 deletions

View File

@ -145,14 +145,13 @@ CAR_init_done:
* mm1: high 32-bits of TSC value * mm1: high 32-bits of TSC value
*/ */
/* coreboot assumes stack/heap region will be zero */ /* clear .bss section */
cld cld
movl %ecx, %edi xor %eax, %eax
neg %ecx movl $(_ebss), %ecx
/* Clear up to Temp Ram top. */ movl $(_bss), %edi
add %edx, %ecx sub %edi, %ecx
shrl $2, %ecx shrl $2, %ecx
xorl %eax, %eax
rep stosl rep stosl
/* Need to align stack to 16 bytes at call instruction. Account for /* Need to align stack to 16 bytes at call instruction. Account for