binaryPI: Disable CAR with empty stack

Hardware / Coreboot - Kyösti Mälkki [gmail.com] - 17 July 2017 15:31 EDT

Calling disable_cache_as_ram() with valuables in stack is not a stable solution, as per documentation AMD_DISABLE_STACK should destroy stack in cache.

While we still preserve cache contents (there is wbinvd deep inside AMD_DISABLE_STACK macro), we now actually do a stack switch and much more closely meet the specification of CAR teardown sequence in AGESA specifications.

We now somewhat incorrectly include files from agesa/ tree, but the whole agesawrapper.c file removal will address the issue of overall directory layout.

Change-Id: I2bac098099c1caffea181356c63924f4b5a93b54

bebd766 binaryPI: Disable CAR with empty stack
src/cpu/amd/pi/Makefile.inc | 3 +-
src/cpu/amd/pi/cache_as_ram.inc | 170 -----------------------------
src/cpu/amd/pi/romstage.c | 48 ++++++++
src/mainboard/amd/bettong/romstage.c | 15 +--
src/mainboard/amd/db-ft3b-lc/romstage.c | 19 +---
src/mainboard/amd/lamar/romstage.c | 16 +--
src/mainboard/amd/olivehillplus/romstage.c | 16 +--
src/mainboard/bap/ode_e21XX/romstage.c | 16 +--
src/mainboard/pcengines/apu2/romstage.c | 16 +--
9 files changed, 76 insertions(+), 243 deletions(-)

Upstream: review.coreboot.org


  • Share