]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
x86: qemu: Add MP initialization
authorBin Meng <bmeng.cn@gmail.com>
Mon, 27 Jul 2015 11:16:08 +0000 (19:16 +0800)
committerSimon Glass <sjg@chromium.org>
Wed, 5 Aug 2015 14:42:38 +0000 (08:42 -0600)
Add a cpu1 node to the device tree and enable the MP initialization
on QEMU targets (i440fx and q35).

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
arch/x86/dts/qemu-x86_i440fx.dts
arch/x86/dts/qemu-x86_q35.dts
configs/qemu-x86_defconfig
doc/README.x86

index c26c71bcf7368d250e67c90055ddff41c19b65c7..fc74cd0f01415fa6fe04b781cd90942caaef9daa 100644 (file)
                        reg = <0>;
                        intel,apic-id = <0>;
                };
+
+               cpu@1 {
+                       device_type = "cpu";
+                       compatible = "cpu-x86";
+                       reg = <1>;
+                       intel,apic-id = <1>;
+               };
        };
 
        pci {
index 2e785fa4bf507ed38f6d92d472c0f2f7b81195e4..7f16971783bf647670bdc71c9400dde2cd178ba1 100644 (file)
                        reg = <0>;
                        intel,apic-id = <0>;
                };
+
+               cpu@1 {
+                       device_type = "cpu";
+                       compatible = "cpu-x86";
+                       reg = <1>;
+                       intel,apic-id = <1>;
+               };
        };
 
        pci {
index 4b18d5173864e42b55d6ae1a77e85bccb78d6166..e579c36200c17fa12f2f29c88b7a09b8b73fd544 100644 (file)
@@ -1,5 +1,7 @@
 CONFIG_X86=y
 CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_i440fx"
+CONFIG_SMP=y
+CONFIG_MAX_CPUS=2
 CONFIG_GENERATE_PIRQ_TABLE=y
 CONFIG_GENERATE_MP_TABLE=y
 CONFIG_CMD_CPU=y
index 5d712445df5c6222106898713074eda5394cb5ed..1cab42cc41f7386be3ec7c1b223ca72c433b5ae8 100644 (file)
@@ -281,6 +281,11 @@ QEMU emulates a graphic card which U-Boot supports. Removing '-nographic' will
 show QEMU's VGA console window. Note this will disable QEMU's serial output.
 If you want to check both consoles, use '-serial stdio'.
 
+Multicore is also supported by QEMU via '-smp n' where n is the number of cores
+to instantiate. Currently the default U-Boot built for QEMU supports 2 cores.
+In order to support more cores, you need add additional cpu nodes in the device
+tree and change CONFIG_MAX_CPUS accordingly.
+
 CPU Microcode
 -------------
 Modern CPUs usually require a special bit stream called microcode [8] to be