diff options
author | Michał Żygowski <michal.zygowski@3mdeb.com> | 2019-11-24 16:32:05 +0100 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2019-11-30 08:13:33 +0000 |
commit | 3aa17f76044f92dd772cd2833fa8f30031e17f35 (patch) | |
tree | eb2c3d6fcdfb7dd67d0678c688fc904030f54015 /src/drivers/amd/agesa/romstage.c | |
parent | 2fa1cb15de4b03155277ae96c389753690a5e517 (diff) |
AGESA,binaryPI: Fix stack location on entry to romstage
For BSP CPU, set up stack location to match the symbol from car.ld.
For AP CPUs the stack is located outside _car_region and is currently
not accounted for in the linker scripts.
Change-Id: I0ec84ae4e73ecca5034f799cdc2a5c1056ad8b74
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37351
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/drivers/amd/agesa/romstage.c')
-rw-r--r-- | src/drivers/amd/agesa/romstage.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/drivers/amd/agesa/romstage.c b/src/drivers/amd/agesa/romstage.c index 8460035de4..571397fdb3 100644 --- a/src/drivers/amd/agesa/romstage.c +++ b/src/drivers/amd/agesa/romstage.c @@ -39,7 +39,7 @@ static void fill_sysinfo(struct sysinfo *cb) agesa_set_interface(cb); } -static void bsp_romstage_main(void) +asmlinkage void romstage_main(unsigned long bist) { struct postcar_frame pcf; struct sysinfo romstage_state; @@ -99,7 +99,7 @@ static void bsp_romstage_main(void) /* We do not return. */ } -static void __noreturn ap_romstage_main(void) +asmlinkage void ap_romstage_main(void) { struct sysinfo romstage_state; struct sysinfo *cb = &romstage_state; @@ -116,11 +116,3 @@ static void __noreturn ap_romstage_main(void) /* Not reached. */ halt(); } - -asmlinkage void romstage_main(unsigned long bist) -{ - if (boot_cpu()) - bsp_romstage_main(); - else - ap_romstage_main(); -} |