Marshall Dawson has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/52982 )
Change subject: soc/amd/cezanne: Force resets to be cold ......................................................................
soc/amd/cezanne: Force resets to be cold
Cezanne must use cold resets. Change the warm reset request to always use cold. Set the ToggleAllPwrGoodOnCf9 after AGESA has cleared it in FSP-S.
BUG=b:184281092 TEST=Majolica successfully resets using 0xcf9
Signed-off-by: Marshall Dawson marshalldawson3rd@gmail.com Change-Id: I7d4ca5665335b20100a5c802d12d79c0d0597ad9 --- M src/soc/amd/cezanne/chip.c M src/soc/amd/cezanne/reset.c 2 files changed, 12 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/52982/1
diff --git a/src/soc/amd/cezanne/chip.c b/src/soc/amd/cezanne/chip.c index 625f46c..22f53bf 100644 --- a/src/soc/amd/cezanne/chip.c +++ b/src/soc/amd/cezanne/chip.c @@ -1,5 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */
+#include <amdblocks/acpimmio.h> #include <console/console.h> #include <device/device.h> #include <device/pci.h> @@ -78,11 +79,19 @@ } }
+static void force_resets_cold(void) +{ + /* TODO: Modify AGESA to not clear this bit. b/184281092 */ + pm_write16(PWR_RESET_CFG, pm_read16(PWR_RESET_CFG) | + TOGGLE_ALL_PWR_GOOD); +} + static void soc_init(void *chip_info) { default_dev_ops_root.write_acpi_tables = agesa_write_acpi_tables;
fsp_silicon_init(); + force_resets_cold();
data_fabric_set_mmio_np();
diff --git a/src/soc/amd/cezanne/reset.c b/src/soc/amd/cezanne/reset.c index aae76bf..a49d1ad 100644 --- a/src/soc/amd/cezanne/reset.c +++ b/src/soc/amd/cezanne/reset.c @@ -7,6 +7,7 @@ #include <amdblocks/acpimmio.h> #include <amdblocks/reset.h>
+/* TODO: is NCP_ERR still valid? It appears reserved and always 0xff. b/184281092 */ void set_warm_reset_flag(void) { uint8_t ncp = inw(NCP_ERR); @@ -29,14 +30,11 @@
void do_warm_reset(void) { - set_warm_reset_flag(); - - /* Assert reset signals only. */ - outb(RST_CPU | SYS_RST, RST_CNT); + /* Cold reset is required and warm reset not supported */ + do_cold_reset(); }
void do_board_reset(void) { - /* TODO: Would a warm_reset() suffice? */ do_cold_reset(); }