Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30875
Change subject: drivers/intel/fsp1.1: Read stack guards later ......................................................................
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 --- M src/drivers/intel/fsp1_1/car.c 1 file changed, 5 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/75/30875/1
diff --git a/src/drivers/intel/fsp1_1/car.c b/src/drivers/intel/fsp1_1/car.c index 63c5042..79dd368 100644 --- a/src/drivers/intel/fsp1_1/car.c +++ b/src/drivers/intel/fsp1_1/car.c @@ -39,6 +39,7 @@ 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 @@
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 @@ 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. */
Kyösti Mälkki has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/30875 )
Change subject: drivers/intel/fsp1.1: Read stack guards later ......................................................................
Patch Set 1: Code-Review+2
Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/30875 )
Change subject: drivers/intel/fsp1.1: Read stack guards later ......................................................................
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 --- M src/drivers/intel/fsp1_1/car.c 1 file changed, 5 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Kyösti Mälkki: Looks good to me, approved
diff --git a/src/drivers/intel/fsp1_1/car.c b/src/drivers/intel/fsp1_1/car.c index 63c5042..79dd368 100644 --- a/src/drivers/intel/fsp1_1/car.c +++ b/src/drivers/intel/fsp1_1/car.c @@ -39,6 +39,7 @@ 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 @@
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 @@ 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. */