@@ -15,6 +15,8 @@
static bool i440fx;
+DECLARE_GLOBAL_DATA_PTR;
+
static void qemu_chipset_init(void)
{
u16 device, xbcs;
@@ -93,6 +95,8 @@ int arch_early_init_r(void)
{
qemu_chipset_init();
+ qemu_fwcfg_fdt_fixup((void *)gd->fdt_blob, qemu_fwcfg_online_cpus());
+
return 0;
}
@@ -26,24 +26,7 @@
stdout-path = "/serial";
};
- cpus {
- #address-cells = <1>;
- #size-cells = <0>;
-
- cpu@0 {
- device_type = "cpu";
- compatible = "cpu-qemu";
- reg = <0>;
- intel,apic-id = <0>;
- };
-
- cpu@1 {
- device_type = "cpu";
- compatible = "cpu-qemu";
- reg = <1>;
- intel,apic-id = <1>;
- };
- };
+ /* cpu node will be dynamically filled by U-Boot */
tsc-timer {
clock-frequency = <1000000000>;
@@ -37,24 +37,7 @@
stdout-path = "/serial";
};
- cpus {
- #address-cells = <1>;
- #size-cells = <0>;
-
- cpu@0 {
- device_type = "cpu";
- compatible = "cpu-qemu";
- reg = <0>;
- intel,apic-id = <0>;
- };
-
- cpu@1 {
- device_type = "cpu";
- compatible = "cpu-qemu";
- reg = <1>;
- intel,apic-id = <1>;
- };
- };
+ /* cpu node will be dynamically filled by U-Boot */
tsc-timer {
clock-frequency = <1000000000>;
Remove 'cpus' node in dts files for QEMU targets, retrieve cpu number through 'fw_cfg' interface and fix up device tree blob at runtime. Signed-off-by: Miao Yan <yanmiaobest@gmail.com> --- arch/x86/cpu/qemu/qemu.c | 4 ++++ arch/x86/dts/qemu-x86_i440fx.dts | 19 +------------------ arch/x86/dts/qemu-x86_q35.dts | 19 +------------------ 3 files changed, 6 insertions(+), 36 deletions(-)