aboutsummaryrefslogtreecommitdiff
path: root/core/chip.c
diff options
context:
space:
mode:
authorRyan Grimm <grimm@linux.ibm.com>2021-09-08 11:57:59 -0500
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2021-10-19 12:14:20 +0530
commit70bf92ae7e4fd9a114d25fa7b1f55151b5835e53 (patch)
treed37017f6a4dc0321d466ebfa33cef6571d73b55a /core/chip.c
parentc496563de915cb00c6e99586568743ea890af2f2 (diff)
downloadskiboot-70bf92ae7e4fd9a114d25fa7b1f55151b5835e53.zip
skiboot-70bf92ae7e4fd9a114d25fa7b1f55151b5835e53.tar.gz
skiboot-70bf92ae7e4fd9a114d25fa7b1f55151b5835e53.tar.bz2
AWAN simulator support for P10
This patch enables Skiboot to initialize and Linux to boot to user space on the AWAN core and chip models. We need the distinction between core and chip models because the core models do not have an XSCOM unit, CHIPTOD, nor RNG. The chip model does have them and they work. So, add a device_type property to the awan node to distinguish core from chip. Sample DTS are provided for the core and chip models in external/awan. Just like Mambo, we need to return in slw_init before trying to initialize SLW. Without an XSCOM unit in the device tree for the core model, the SLW code path eventually fails an assert due to lack of chips. This commit defines a QUIRK_AWAN where previously Mambo used QUIRK_MAMBO_CALLOUTS so now Mambo and AWAN core both work. Also, fix up chip quirks so the core model and chip model boot and initialize the appropriate units. Disable sreset and power management in a couple spots because the chip model does not support stop with EC=1 and enter_p9_pm_state spins in the branch-to-self after stop. Provide an external/awan/README.md with a high-level view of booting in the environment. Signed-off-by: Ryan Grimm <grimm@linux.ibm.com> Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'core/chip.c')
-rw-r--r--core/chip.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/core/chip.c b/core/chip.c
index 2d95b2e..6fc5d42 100644
--- a/core/chip.c
+++ b/core/chip.c
@@ -166,11 +166,20 @@ void init_chips(void)
prlog(PR_NOTICE, "CHIP: Detected Simics simulator\n");
}
/* Detect Awan emulator */
- if (dt_find_by_path(dt_root, "/awan")) {
- proc_chip_quirks |= QUIRK_NO_CHIPTOD | QUIRK_NO_F000F
- | QUIRK_NO_PBA | QUIRK_NO_OCC_IRQ | QUIRK_SLOW_SIM;
+ xn = dt_find_by_path(dt_root, "/awan");
+ if (xn) {
+ const char *model_type;
+ proc_chip_quirks |= QUIRK_AWAN | QUIRK_SLOW_SIM | QUIRK_NO_PBA
+ | QUIRK_NO_OCC_IRQ;
tb_hz = 512000;
- prlog(PR_NOTICE, "CHIP: Detected Awan emulator\n");
+
+ 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;
+ }
+ prlog(PR_NOTICE, "CHIP: Detected Awan emulator %s model\n",
+ model_type);
}
/* Detect Qemu */
if (dt_node_is_compatible(dt_root, "qemu,powernv") ||