FSP platforms: Clear area in CAR for cbmem

This patch clears the CAR area. The FSP loads the entire CAR area with a
pattern instead of clearing it.  At least the cbmem area needs to be
cleared or cbmem will not use it.

Change-Id: I829ddc26133353a784dfc01729af9b3bf427e889
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: http://review.coreboot.org/8195
Reviewed-by: Aaron Durbin <adurbin@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
Martin Roth 2015-01-11 14:58:47 -07:00
parent 4e6f0c289b
commit 9cd155334b
1 changed files with 10 additions and 2 deletions

View File

@ -91,14 +91,22 @@ CAR_init_done:
* ecx: stack base
* edx: stack top
*/
lea -4(%edx), %esp
mov %edx, %esp
movl %esp, %ebp
pushl %ebx
/* Clear the cbmem CAR memory region. */
movl %ecx, %edi
movl %edx, %ecx
sub %edi, %ecx
shr $2, %ecx
xorl %eax, %eax
rep stosl
before_romstage:
post_code(0x23)
/* Call romstage.c main function. */
pushl %ebx /* main takes FSP_INFO_HEADER as its argument */
call main /* does not return */
movb $0xB8, %ah
jmp .Lhlt