summaryrefslogtreecommitdiffstats
path: root/board/freescale/qemu-ppce500
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2014-04-30 19:21:10 +0200
committerYork Sun <yorksun@freescale.com>2014-05-13 08:26:55 -0700
commitb539534d120c3f017965b25aa36fcfb75db8383c (patch)
tree6a5b8766ea4c7b643f279f1fe3a46eb547008029 /board/freescale/qemu-ppce500
parent522641a78862d2ecf9b89cc29dfb4429ee1b4103 (diff)
downloadblackbird-obmc-uboot-b539534d120c3f017965b25aa36fcfb75db8383c.tar.gz
blackbird-obmc-uboot-b539534d120c3f017965b25aa36fcfb75db8383c.zip
PPC 85xx QEMU: Always assume 1 core
We only need u-boot to bother about a single core in the QEMU machine. Everything that would require additional knowledge of more cores gets handled by QEMU and passed straight into the payload we execute. Because of this setup, it would be counterproductive to enable SMP support in u-boot. We would have to rip CPUs out of already existing spin tables and respin them from u-boot. It would be a pretty big mess. So only assume we have a single core. This fixes errors about CONFIG_MP being disabled. Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'board/freescale/qemu-ppce500')
-rw-r--r--board/freescale/qemu-ppce500/qemu-ppce500.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/board/freescale/qemu-ppce500/qemu-ppce500.c b/board/freescale/qemu-ppce500/qemu-ppce500.c
index 3dbb0cf43b..230870d90e 100644
--- a/board/freescale/qemu-ppce500/qemu-ppce500.c
+++ b/board/freescale/qemu-ppce500/qemu-ppce500.c
@@ -346,3 +346,23 @@ ulong get_bus_freq (ulong dummy)
get_sys_info(&sys_info);
return sys_info.freq_systembus;
}
+
+/*
+ * Return the number of cores on this SOC.
+ */
+int cpu_numcores(void)
+{
+ /*
+ * The QEMU u-boot target only needs to drive the first core,
+ * spinning and device tree nodes get driven by QEMU itself
+ */
+ return 1;
+}
+
+/*
+ * Return a 32-bit mask indicating which cores are present on this SOC.
+ */
+u32 cpu_mask(void)
+{
+ return (1 << cpu_numcores()) - 1;
+}
OpenPOWER on IntegriCloud