[coreboot-gerrit] Patch set updated for coreboot: agesawrapper: Fix endless loop on bettong
Ricardo Ribalda Delgado (ricardo.ribalda@gmail.com)
gerrit at coreboot.org
Wed Dec 21 12:24:13 CET 2016
Ricardo Ribalda Delgado (ricardo.ribalda at gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/17924
-gerrit
commit e12095ff877b8a059cbc7d800934e6d022ebf84e
Author: Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com>
Date: Tue Dec 20 10:08:45 2016 +0100
agesawrapper: Fix endless loop on bettong
AGESA AmdInitEarly() reconfigures the lapic timer in a way that
conflicts with lapic/apic_timer.
This results in an endless loop when printk() is called after
AmdInitEarly() and before the apic_timer is initialized.
This patch forces a reconfiguration of the timer after
AmdInitEarly() is called.
Codepath of the endless loop:
printk()->
(...)->
uart_tx_byte->
uart8250_mem_tx_byte->
udelay()->
start = lapic_read(LAPIC_TMCCT);
do {
value = lapic_read(LAPIC_TMCCT);
} while ((start - value) < ticks);
[lapic_read returns the same value after AmdInitEarly()]
Change-Id: I1a08789c89401b2bf6d11846ad7c376bfc68801b
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda at gmail.com>
---
src/northbridge/amd/pi/agesawrapper.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/northbridge/amd/pi/agesawrapper.c b/src/northbridge/amd/pi/agesawrapper.c
index 8e16e75..0edfc13 100644
--- a/src/northbridge/amd/pi/agesawrapper.c
+++ b/src/northbridge/amd/pi/agesawrapper.c
@@ -15,6 +15,7 @@
#include <AGESA.h>
#include <cbfs.h>
+#include <delay.h>
#include <cpu/amd/pi/s3_resume.h>
#include <cpu/x86/mtrr.h>
#include <cpuRegisters.h>
@@ -107,6 +108,13 @@ AGESA_STATUS agesawrapper_amdinitearly(void)
AmdEarlyParamsPtr->GnbConfig.PsppPolicy = PsppDisabled;
status = AmdInitEarly ((AMD_EARLY_PARAMS *)AmdParamStruct.NewStructPtr);
+#if CONFIG_BOARD_AMD_BETTONG
+ /*
+ * init_timer() needs to be called on CZ PI, because AGESA resets the LAPIC reload value
+ * on the AMD_INIT_EARLY call
+ */
+ init_timer();
+#endif
if (status != AGESA_SUCCESS) agesawrapper_amdreadeventlog(AmdParamStruct.StdHeader.HeapStatus);
AmdReleaseStruct (&AmdParamStruct);
More information about the coreboot-gerrit
mailing list