From 9cd155334baa28331f2cf2e6e7bf57c912d7a731 Mon Sep 17 00:00:00 2001 From: Martin Roth Date: Sun, 11 Jan 2015 14:58:47 -0700 Subject: FSP platforms: Clear area in CAR for cbmem MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: http://review.coreboot.org/8195 Reviewed-by: Aaron Durbin Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/drivers/intel/fsp/cache_as_ram.inc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/drivers/intel/fsp/cache_as_ram.inc b/src/drivers/intel/fsp/cache_as_ram.inc index 9e8b2a2e6f..8604c3b0b0 100644 --- a/src/drivers/intel/fsp/cache_as_ram.inc +++ b/src/drivers/intel/fsp/cache_as_ram.inc @@ -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 -- cgit v1.2.3