From 5a6633491158c919a5f9e0e8cf627facb3fe890e Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Wed, 28 Oct 2020 14:03:14 +0100 Subject: drivers/intel/fsp2_0: Add function to report FSP-T output This allows to compare the FSP-T output in %ecx and %edx to coreboot's CAR symbols: Change-Id: I8d79f97f8c12c63ce215935353717855442a8290 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/46884 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/soc/intel/common/block/cpu/car/cache_as_ram_fsp.S | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/soc/intel') diff --git a/src/soc/intel/common/block/cpu/car/cache_as_ram_fsp.S b/src/soc/intel/common/block/cpu/car/cache_as_ram_fsp.S index b9daf08b2f..e77b841612 100644 --- a/src/soc/intel/common/block/cpu/car/cache_as_ram_fsp.S +++ b/src/soc/intel/common/block/cpu/car/cache_as_ram_fsp.S @@ -72,6 +72,13 @@ CAR_init_done: /* Setup bootblock stack */ mov %edx, %esp + /* + * temp_memory_start/end reside in the .bss section, which gets cleared + * below. Save the FSP return value to the stack before writing those + * variables. + */ + push %ecx + push %edx /* clear .bss section as it is not shared */ cld @@ -82,6 +89,11 @@ CAR_init_done: shrl $2, %ecx rep stosl + pop %edx + movl %edx, temp_memory_end + pop %ecx + movl %ecx, temp_memory_start + /* Restore the timestamp from bootblock_crt0.S (ebp:mm1) */ push %ebp movd %mm1, %eax -- cgit v1.2.3