summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2019-01-12 11:44:08 +0100
committerPatrick Georgi <pgeorgi@google.com>2019-01-14 12:10:51 +0000
commitec3c8b552dc5334208e7579076afe1a45753363d (patch)
treede0130f3411b38b19e4d8e22cfac79572b312fe8 /src/drivers
parentda44e34743a758aaf9cfa3eac5cf1278297e27e4 (diff)
drivers/intel/fsp1.1: Read stack guards later
Read back the stack guards after most of the romstage took place. Change-Id: Ia7dc26c7ed1750d4ebbe7514ed87da57f9e34a89 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/30875 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/intel/fsp1_1/car.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/drivers/intel/fsp1_1/car.c b/src/drivers/intel/fsp1_1/car.c
index 63c5042776..79dd3681c3 100644
--- a/src/drivers/intel/fsp1_1/car.c
+++ b/src/drivers/intel/fsp1_1/car.c
@@ -39,6 +39,7 @@ asmlinkage void *cache_as_ram_main(struct cache_as_ram_params *car_params)
const int num_guards = 4;
const u32 stack_guard = 0xdeadbeef;
u32 *stack_base;
+ void *ram_stack;
u32 size;
/* Size of unallocated CAR. */
@@ -78,6 +79,9 @@ asmlinkage void *cache_as_ram_main(struct cache_as_ram_params *car_params)
set_fih_car(car_params->fih);
+ /* Return new stack value in RAM back to assembly stub. */
+ ram_stack = cache_as_ram_stage_main(car_params->fih);
+
/* Check the stack. */
for (i = 0; i < num_guards; i++) {
if (stack_base[i] == stack_guard)
@@ -85,8 +89,7 @@ asmlinkage void *cache_as_ram_main(struct cache_as_ram_params *car_params)
printk(BIOS_DEBUG, "Smashed stack detected in romstage!\n");
}
- /* Return new stack value in RAM back to assembly stub. */
- return cache_as_ram_stage_main(car_params->fih);
+ return ram_stack;
}
/* Entry point taken when romstage is called after a separate verstage. */