aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorRyan Grimm <grimm@linux.ibm.com>2023-08-14 15:02:50 -0400
committerRyan Grimm <grimm@linux.ibm.com>2023-11-27 11:41:13 -0500
commit48265d110bba2493c503f1090e969dbd53c4e264 (patch)
tree4e7386719e5a7d089fa581800e0ed61e5a7ee578 /core
parent5c1dc620a01d1d488f1cc77c0431d54c8461818e (diff)
downloadskiboot-48265d110bba2493c503f1090e969dbd53c4e264.zip
skiboot-48265d110bba2493c503f1090e969dbd53c4e264.tar.gz
skiboot-48265d110bba2493c503f1090e969dbd53c4e264.tar.bz2
hw/imc: Detect BML and fix core counters
On systems running BML we started noticing this in the skiboot log: [ 409.088819302,3] XSCOM: write error gcid=0x0 pcb_addr=0x20000060 stat=0x4 [ 409.088823446,3] ELOG: Error getting buffer to log error [ 409.088824806,3] XSCOM: Write failed, ret = -26 [ 409.088825797,3] IMC: error in xscom_write for pdbar [ 0.468976][ T19] core_imc memory allocation for cpu 0 failed [ 0.468993][ T1] IMC PMU core_imc Register failed I tracked down that bad pcb_addr to this line in the code: pdbar_addr = get_imc_scom_addr_for_quad(phys_core_id, pdbar_scom_index[port_id]); I found that pdbar_scom_index was not initialized because, like mambo, we don't have the IMC catalog in memory. So, in imc_init we error out and never initialize it in setup_imc_scoms. This patch adds a chip quirk QUIRK_BML because it seems like a reasonable thing to do and it's easy to put a BML {}; in the device tree like Mambo, Awan, etc. It is tested on a Rainier and errors are gone and /sys/devices/core_imc shows up as expected. Signed-off-by: Ryan Grimm <grimm@linux.ibm.com> Reviewed-By: Madhavan Srinivasan <maddy@linux.ibm.com>
Diffstat (limited to 'core')
-rw-r--r--core/chip.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/chip.c b/core/chip.c
index cee6582..0e96e62 100644
--- a/core/chip.c
+++ b/core/chip.c
@@ -190,6 +190,10 @@ void init_chips(void)
proc_chip_quirks |= QUIRK_QEMU | QUIRK_NO_DIRECT_CTL | QUIRK_NO_RNG;
prlog(PR_NOTICE, "CHIP: Detected QEMU simulator\n");
}
+ if (dt_find_by_path(dt_root, "/bml")) {
+ proc_chip_quirks |= QUIRK_BML;
+ prlog(PR_NOTICE, "CHIP: Detected BML\n");
+ }
/* We walk the chips based on xscom nodes in the tree */
dt_for_each_compatible(dt_root, xn, "ibm,xscom") {