aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2025-01-15 11:50:08 +1000
committerReza Arbab <arbab@linux.ibm.com>2025-01-15 15:14:37 -0600
commit673de707c203a6e21c91b36a44c707d9b3f7b822 (patch)
tree68a23d624622c4fbe01743c12a37bb3649a55d7a
parent670af4255632b413ea1683799ae392da4957fe7d (diff)
downloadskiboot-673de707c203a6e21c91b36a44c707d9b3f7b822.zip
skiboot-673de707c203a6e21c91b36a44c707d9b3f7b822.tar.gz
skiboot-673de707c203a6e21c91b36a44c707d9b3f7b822.tar.bz2
hw/sbe: Add SBE quirk for mambo and awan
There appears to be no device-tree test for the P9 SBE presence like there is for P8. The P9 device tree test looks for the "primary" property, but this doesn't really test SBE presence because all chips have an SBE. It just happens to work because mambo must not add that property. So add a platform quirk, and mark mambo and awan as not having SBE. This is needed for a later change that runs a health check on every SBE in the system. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> [arbab: Add #include <chip.h>] Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
-rw-r--r--core/chip.c4
-rw-r--r--hw/sbe-p8.c4
-rw-r--r--hw/sbe-p9.c5
-rw-r--r--include/chip.h1
4 files changed, 11 insertions, 3 deletions
diff --git a/core/chip.c b/core/chip.c
index 73c6f30..e20370b 100644
--- a/core/chip.c
+++ b/core/chip.c
@@ -148,7 +148,7 @@ void init_chips(void)
if (dt_find_by_path(dt_root, "/mambo")) {
proc_chip_quirks |= QUIRK_NO_CHIPTOD | QUIRK_MAMBO_CALLOUTS
| QUIRK_NO_F000F | QUIRK_NO_PBA | QUIRK_NO_OCC_IRQ
- | QUIRK_NO_RNG | QUIRK_NO_DIRECT_CTL;
+ | QUIRK_NO_RNG | QUIRK_NO_DIRECT_CTL | QUIRK_NO_SBE;
enable_mambo_console();
@@ -176,7 +176,7 @@ void init_chips(void)
model_type = dt_prop_get_def(xn, "device_type", (void *)"core");
if (strcmp(model_type, "core") == 0) {
proc_chip_quirks |= QUIRK_NO_RNG | QUIRK_NO_CHIPTOD
- | QUIRK_NO_F000F;
+ | QUIRK_NO_F000F | QUIRK_NO_SBE;
}
prlog(PR_NOTICE, "CHIP: Detected Awan emulator %s model\n",
model_type);
diff --git a/hw/sbe-p8.c b/hw/sbe-p8.c
index 70edec6..c2cf5d2 100644
--- a/hw/sbe-p8.c
+++ b/hw/sbe-p8.c
@@ -5,6 +5,7 @@
* Copyright 2013-2018 IBM Corp.
*/
+#include <chip.h>
#include <device.h>
#include <sbe.h>
#include <sbe-p8.h>
@@ -168,6 +169,9 @@ void p8_sbe_init_timer(void)
int64_t rc;
uint32_t tick_us;
+ if (proc_gen != proc_gen_p8 || chip_quirk(QUIRK_NO_SBE))
+ return;
+
np = dt_find_compatible_node(dt_root, NULL, "ibm,power8-sbe-timer");
if (!np)
return;
diff --git a/hw/sbe-p9.c b/hw/sbe-p9.c
index 3b0f8b0..7a5f539 100644
--- a/hw/sbe-p9.c
+++ b/hw/sbe-p9.c
@@ -928,7 +928,7 @@ void p9_sbe_init(void)
struct proc_chip *chip;
struct p9_sbe *sbe;
- if (proc_gen < proc_gen_p9)
+ if (proc_gen < proc_gen_p9 || chip_quirk(QUIRK_NO_SBE))
return;
dt_for_each_compatible(dt_root, xn, "ibm,xscom") {
@@ -970,6 +970,9 @@ void p9_sbe_terminate(void)
u64 wait_tb;
struct proc_chip *chip;
+ if (proc_gen < proc_gen_p9 || chip_quirk(QUIRK_NO_SBE))
+ return;
+
/* Return if MPIPL is not supported */
if (!is_mpipl_enabled())
return;
diff --git a/include/chip.h b/include/chip.h
index c90b8a7..92e0265 100644
--- a/include/chip.h
+++ b/include/chip.h
@@ -188,6 +188,7 @@ enum proc_chip_quirks {
QUIRK_QEMU = 0x00000200,
QUIRK_AWAN = 0x00000400,
QUIRK_BML = 0x00000800,
+ QUIRK_NO_SBE = 0x00001000,
};
extern enum proc_chip_quirks proc_chip_quirks;