soc/intel/quark: Add TempRamInit support

Successfully invoke TempRamInit from the FSP binary:
*  Don't relocate the FSP binary image
*  Copy the FSP binary into ESRAM
*  Specify Kconfig values to easily debug ESRAM and TempRamInit code
*  Specify the FSP binary file location
*  Specify the FSP binary image ID
*  Specify where in the flash image the FSP image must reside
*  Specify the FSP data file location
*  Specify where to place the FSP data file in the flash image
*  Specify where in the ESRAM the FSP image must reside

Test 1 on Galileo:
*  Edit the src/mainboard/intel/galileo/Makefile.inc file
   *  Add "select ADD_FSP_PDAT_FILE"
   *  Add "select ADD_FSP_RAW_BIN"
   *  Add "select ADD_RMU_FILE"
   *  Add "select ENABLE_DEBUG_LED_FINDFSP"
*  Place the FSP.bin file in the location specified by CONFIG_FSP_FILE
*  Place the rmu.bin file in the location specified by CONFIG_RMU_FILE
*  Testing is successful if the SD LED is on indicating that the FSP.bin
file was properly located,  The test fails if the SD LED is flashing.

Test 2 on Galileo:
*  Edit the src/mainboard/intel/galileo/Makefile.inc file
   *  Remove "select ENABLE_DEBUG_LED_FINDFSP"
   *  Add "select ENABLE_DEBUG_LED_TEMPRAMINIT"
*  Testing is successful if the SD LED is on indicating that the FSP.bin
   file was properly located,  The test fails if the SD LED is flashing.

Change-Id: I1e2e413a8573f750c611b0f9df101b2c869a789e
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/13443
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
diff --git a/src/soc/intel/quark/romstage/esram_init.inc b/src/soc/intel/quark/romstage/esram_init.inc
index 1b83c13..b899741 100644
--- a/src/soc/intel/quark/romstage/esram_init.inc
+++ b/src/soc/intel/quark/romstage/esram_init.inc
@@ -452,6 +452,21 @@
 
 esram_init_done:
 
+#if IS_ENABLED(CONFIG_PLATFORM_USES_FSP1_1)
+
+	/* Copy FSP image to eSRAM and call it. */
+	/* TODO: FSP location/size could be got in a routine. */
+	cld
+	movl	$(0x00040000), %ecx               /* 256K DWORDs = 64K */
+	shrl	$2, %ecx
+	movl	$CONFIG_FSP_LOC, %esi   /* The source address. */
+	movl	$CONFIG_FSP_ESRAM_LOC, %edi   /* FSP destination in ESRAM */
+	rep	movsl
+#endif /* CONFIG_PLATFORM_USES_FSP1_1 */
+
+#if IS_ENABLED(CONFIG_ENABLE_DEBUG_LED)
+sd_led:
+
 .equ  SD_PFA, (0x14 << 11)    		/* B0:D20:F0 - SDIO controller */
 .equ  SD_CFG_BASE, (PCI_CFG | SD_PFA)	/* SD cntrl base in PCI config space */
 .equ  SD_CFG_CMD, (SD_CFG_BASE+0x04)	/* Command reg in PCI config space */
@@ -488,6 +503,7 @@
 	jmp	stackless_PCIConfig_Read
 
 L44:
+#if IS_ENABLED(CONFIG_ENABLE_DEBUG_LED_ESRAM)
 	/* Turn on SD LED to indicate ESRAM successfully initialized */
 	movl	$SD_HOST_CTRL, %ebx
 	movb	0(%ebx), %al
@@ -496,3 +512,5 @@
 
 	/* Loop forever */
 	jmp	.
+#endif /* CONFIG_ENABLE_DEBUG_LED_ESRAM */
+#endif /* CONFIG_ENABLE_DEBUG_LED */