[coreboot-gerrit] Patch set updated for coreboot: 88cd30c FSP platforms: Clear area in CAR for cbmem

Martin Roth (gaumless@gmail.com) gerrit at coreboot.org
Fri Jan 30 22:46:02 CET 2015


Martin Roth (gaumless at gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8195

-gerrit

commit 88cd30cb727fa86426bfc73fac688ac2e2b15515
Author: Martin Roth <gaumless at gmail.com>
Date:   Sun Jan 11 14:58:47 2015 -0700

    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 at gmail.com>
---
 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 9e8b2a2..8604c3b 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



More information about the coreboot-gerrit mailing list