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>
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 @@
 	 * 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