kgpe-d16: expand double-reset condition to completely fix boot-hangs

This commit adds a one-line coreboot patch which has finally solved
100% of my got-stuck-while-booting problems.

Upstream coreboot contains the following code:

  /* Reset for HT, FIDVID, PLL and errata changes to take effect. */
  if (!warm_reset_detect(0)) {
    printk(BIOS_INFO, "...WARM RESET...\n\n\n");
    soft_reset();

However `warm_reset_detect(0)` is *not* the complement of "cold
reset" (i.e. power supply was disconnected and reconnected).
Apparently there is a whole other category of "other resets" which
are neither warm nor cold.  These conditions are detected by
`other_reset_detected()`.

The patch being added expands the condition above to include these:

  if (other_reset_detected() || !warm_reset_detect(0)) {

After including this patch I have experienced zero of the infamous
"Assigning resources...<hang>" problems.  Hooray!
master
Adam Joseph 1 year ago
parent d217c4eff4
commit 8736520bb3

@ -106,6 +106,7 @@ stdenv.mkDerivation {
./patches/0001-romstage-print-out-dimm-voltages.patch ./patches/0001-romstage-print-out-dimm-voltages.patch
./patches/0002-kgpe-d16-do-not-enable-hw-monitor-until-kernel-boots.patch ./patches/0002-kgpe-d16-do-not-enable-hw-monitor-until-kernel-boots.patch
./patches/0026-kgpe-d16-start-w83667hg-a-watchdog-during-romstage.patch ./patches/0026-kgpe-d16-start-w83667hg-a-watchdog-during-romstage.patch
./patches/0004-kgpe-d16-romstage.c-do-a-double-reset-on-other_reset.patch
# am1i patches # am1i patches
./patches/0021-am1i-omit-amdfw.rom-completely-it-has-broken-address.patch ./patches/0021-am1i-omit-amdfw.rom-completely-it-has-broken-address.patch

@ -0,0 +1,32 @@
From 741b79e1bbaa6a1b7518a75b4875cdb52958ea9c Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: Tue, 13 Jun 2023 01:20:01 -0700
Subject: [PATCH 4/4] kgpe-d16/romstage.c: do a double-reset on
other_reset_detected()
cache_as_ram_main() includes code to do a warm reset if coming from
a cold reset. This is supposedly in order to allow various PLLs
more time to lock.
This commit extends that behavior to all other kinds of resets
(neither warm nor cold).
---
src/mainboard/asus/kgpe-d16/romstage.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/mainboard/asus/kgpe-d16/romstage.c b/src/mainboard/asus/kgpe-d16/romstage.c
index 81a5bf5d67d..1a300753a8e 100644
--- a/src/mainboard/asus/kgpe-d16/romstage.c
+++ b/src/mainboard/asus/kgpe-d16/romstage.c
@@ -638,7 +638,7 @@ void cache_as_ram_main(unsigned long bist, unsigned long cpu_init_detectedx)
sr5650_htinit();
/* Reset for HT, FIDVID, PLL and errata changes to take effect. */
- if (!warm_reset_detect(0)) {
+ if (other_reset_detected() || !warm_reset_detect(0)) {
printk(BIOS_INFO, "...WARM RESET...\n\n\n");
soft_reset();
die("After soft_reset - shouldn't see this message!!!\n");
--
2.39.1
Loading…
Cancel
Save