[U-Boot] [PATCH 6/7] x86: qemu: fixup cpu node in device tree
Bin Meng
bmeng.cn at gmail.com
Tue Dec 29 07:19:26 CET 2015
Hi Miao,
nits: fixup -> fix up in the commit title
On Mon, Dec 28, 2015 at 5:18 PM, Miao Yan <yanmiaobest at gmail.com> wrote:
> Remove 'cpus' node in dts files for QEMU targets,
> retrieve cpu number through 'fw_cfg' interface and
> fixup device tree blob at runtime.
nits: fixup -> fix up
>
> Signed-off-by: Miao Yan <yanmiaobest at gmail.com>
> ---
> arch/x86/cpu/qemu/qemu.c | 4 ++++
> arch/x86/dts/qemu-x86_i440fx.dts | 18 +-----------------
> arch/x86/dts/qemu-x86_q35.dts | 19 +------------------
> 3 files changed, 6 insertions(+), 35 deletions(-)
>
> diff --git a/arch/x86/cpu/qemu/qemu.c b/arch/x86/cpu/qemu/qemu.c
> index c0a79d2..e643e04 100644
> --- a/arch/x86/cpu/qemu/qemu.c
> +++ b/arch/x86/cpu/qemu/qemu.c
> @@ -15,6 +15,8 @@
>
> static bool i440fx;
>
> +DECLARE_GLOBAL_DATA_PTR;
> +
> static void qemu_chipset_init(void)
> {
> u16 device, xbcs;
> @@ -96,6 +98,8 @@ int arch_early_init_r(void)
> {
> qemu_chipset_init();
>
> + qemu_fwcfg_fdt_fixup((void *)gd->fdt_blob, qemu_fwcfg_online_cpus());
> +
> return 0;
> }
>
> diff --git a/arch/x86/dts/qemu-x86_i440fx.dts b/arch/x86/dts/qemu-x86_i440fx.dts
> index 8c9d35a..3f32ec9 100644
> --- a/arch/x86/dts/qemu-x86_i440fx.dts
> +++ b/arch/x86/dts/qemu-x86_i440fx.dts
> @@ -25,24 +25,8 @@
> stdout-path = "/serial";
> };
>
> - cpus {
> - #address-cells = <1>;
> - #size-cells = <0>;
>
> - cpu at 0 {
> - device_type = "cpu";
> - compatible = "cpu-qemu";
> - reg = <0>;
> - intel,apic-id = <0>;
> - };
> -
> - cpu at 1 {
> - device_type = "cpu";
> - compatible = "cpu-qemu";
> - reg = <1>;
> - intel,apic-id = <1>;
> - };
> - };
> + /* cpu node will be dynamically filled by qemu */
by U-Boot
>
> pci {
> compatible = "pci-x86";
> diff --git a/arch/x86/dts/qemu-x86_q35.dts b/arch/x86/dts/qemu-x86_q35.dts
> index c980f45..c1c6a9a 100644
> --- a/arch/x86/dts/qemu-x86_q35.dts
> +++ b/arch/x86/dts/qemu-x86_q35.dts
> @@ -36,24 +36,7 @@
> stdout-path = "/serial";
> };
>
> - cpus {
> - #address-cells = <1>;
> - #size-cells = <0>;
> -
> - cpu at 0 {
> - device_type = "cpu";
> - compatible = "cpu-qemu";
> - reg = <0>;
> - intel,apic-id = <0>;
> - };
> -
> - cpu at 1 {
> - device_type = "cpu";
> - compatible = "cpu-qemu";
> - reg = <1>;
> - intel,apic-id = <1>;
> - };
> - };
> + /* cpu node will be dynamically filled by qemu */
by U-Boot
>
> pci {
> compatible = "pci-x86";
> --
Also, this patch does not apply on top of u-boot-x86/next. Please
rebase your series on top of u-boot-x86/next.
Regards,
Bin
More information about the U-Boot
mailing list