diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2016-06-25 08:47:35 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-07-06 19:30:48 +1000 |
commit | 7e4d14b364956b6756b62fc5e6ae4b1487e1bc3c (patch) | |
tree | 822c2d8da19528bbb0ded69234cce0e4655b84dd /core/chip.c | |
parent | fb43f202ddd86131acf14542c34fbcb9adab45f2 (diff) | |
download | skiboot-7e4d14b364956b6756b62fc5e6ae4b1487e1bc3c.zip skiboot-7e4d14b364956b6756b62fc5e6ae4b1487e1bc3c.tar.gz skiboot-7e4d14b364956b6756b62fc5e6ae4b1487e1bc3c.tar.bz2 |
Timebase quirk for slow simulators like AWAN and SIMICS
This will internally pretend the timebase is running 1000 times
slower, which reduces some otherwise really terrible delays in
some simulators.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Michael Neuling <mikey@neuling.org>
[stewart@linux.vnet.ibm.com: move cfam_chipid cleanup into own patch]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/chip.c')
-rw-r--r-- | core/chip.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/core/chip.c b/core/chip.c index b9297e1..2651ad4 100644 --- a/core/chip.c +++ b/core/chip.c @@ -18,6 +18,7 @@ #include <skiboot.h> #include <chip.h> #include <device.h> +#include <timebase.h> static struct proc_chip *chips[MAX_CHIPS]; enum proc_chip_quirks proc_chip_quirks; @@ -81,11 +82,21 @@ void init_chips(void) | QUIRK_NO_F000F | QUIRK_NO_PBA | QUIRK_NO_OCC_IRQ; prlog(PR_NOTICE, "CHIP: Detected Mambo simulator\n"); } + /* Detect simics */ if (dt_find_by_path(dt_root, "/simics")) { proc_chip_quirks |= QUIRK_SIMICS | QUIRK_NO_CHIPTOD - | QUIRK_NO_PBA | QUIRK_NO_OCC_IRQ; + | QUIRK_NO_PBA | QUIRK_NO_OCC_IRQ | QUIRK_SLOW_SIM; + tb_hz = 512000; 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; + tb_hz = 512000; + prlog(PR_NOTICE, "CHIP: Detected Awan emulator\n"); + } + /* Detect Qemu */ if (dt_node_is_compatible(dt_root, "qemu,powernv")) { proc_chip_quirks |= QUIRK_NO_CHIPTOD | QUIRK_NO_PBA; prlog(PR_NOTICE, "CHIP: Detected Qemu simulator\n"); |