diff options
author | Ryan Grimm <grimm@linux.ibm.com> | 2021-09-08 11:57:59 -0500 |
---|---|---|
committer | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2021-10-19 12:14:20 +0530 |
commit | 70bf92ae7e4fd9a114d25fa7b1f55151b5835e53 (patch) | |
tree | d37017f6a4dc0321d466ebfa33cef6571d73b55a /core | |
parent | c496563de915cb00c6e99586568743ea890af2f2 (diff) | |
download | skiboot-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')
-rw-r--r-- | core/chip.c | 17 | ||||
-rw-r--r-- | core/cpu.c | 5 | ||||
-rw-r--r-- | core/init.c | 2 |
3 files changed, 18 insertions, 6 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") || @@ -637,6 +637,9 @@ static void cpu_pm_disable(void) void cpu_set_sreset_enable(bool enabled) { + if (proc_chip_quirks & QUIRK_AWAN) + return; + if (sreset_enabled == enabled) return; @@ -688,7 +691,7 @@ void cpu_set_ipi_enable(bool enabled) sync(); if (!enabled) cpu_pm_disable(); - else + else if (!chip_quirk(QUIRK_AWAN)) pm_enabled = true; } } diff --git a/core/init.c b/core/init.c index 235f905..0247a0a 100644 --- a/core/init.c +++ b/core/init.c @@ -999,7 +999,7 @@ static void mask_pc_system_xstop(void) if (proc_gen != proc_gen_p10) return; - if (chip_quirk(QUIRK_MAMBO_CALLOUTS)) + if (chip_quirk(QUIRK_MAMBO_CALLOUTS) || chip_quirk(QUIRK_AWAN)) return; /* |