Commit 683b09d7837a71fb4c5dd53919c6afa4d800e60e

Authored by Bin Meng
Committed by Simon Glass
1 parent 65cdd9be3e

x86: qemu: Create separate i440fx and q35 device trees

Although the two qemu-x86 targets (i440fx and q35) share a lot in
common, they still have something that cannot easily handled in one
single device tree). Split to create two dedicated device tree files
and make the i440fx be the default build target.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>

Showing 7 changed files with 81 additions and 39 deletions Side-by-side Diff

arch/x86/dts/Makefile
... ... @@ -3,7 +3,8 @@
3 3 crownbay.dtb \
4 4 galileo.dtb \
5 5 minnowmax.dtb \
6   - qemu-x86.dtb
  6 + qemu-x86_i440fx.dtb \
  7 + qemu-x86_q35.dtb
7 8  
8 9 targets += $(dtb-y)
9 10  
arch/x86/dts/qemu-x86.dts
1   -/*
2   - * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
3   - *
4   - * SPDX-License-Identifier: GPL-2.0+
5   - */
6   -
7   -/dts-v1/;
8   -
9   -/include/ "skeleton.dtsi"
10   -/include/ "serial.dtsi"
11   -
12   -/ {
13   - model = "QEMU x86";
14   - compatible = "qemu,x86";
15   -
16   - config {
17   - silent_console = <0>;
18   - };
19   -
20   - chosen {
21   - stdout-path = "/serial";
22   - };
23   -
24   - pci {
25   - compatible = "pci-x86";
26   - #address-cells = <3>;
27   - #size-cells = <2>;
28   - u-boot,dm-pre-reloc;
29   - ranges = <0x02000000 0x0 0xc0000000 0xc0000000 0 0x10000000
30   - 0x42000000 0x0 0xd0000000 0xd0000000 0 0x10000000
31   - 0x01000000 0x0 0x2000 0x2000 0 0xe000>;
32   - };
33   -
34   -};
arch/x86/dts/qemu-x86_i440fx.dts
  1 +/*
  2 + * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
  3 + *
  4 + * SPDX-License-Identifier: GPL-2.0+
  5 + */
  6 +
  7 +/dts-v1/;
  8 +
  9 +/include/ "skeleton.dtsi"
  10 +/include/ "serial.dtsi"
  11 +
  12 +/ {
  13 + model = "QEMU x86 (I440FX)";
  14 + compatible = "qemu,x86";
  15 +
  16 + config {
  17 + silent_console = <0>;
  18 + };
  19 +
  20 + chosen {
  21 + stdout-path = "/serial";
  22 + };
  23 +
  24 + pci {
  25 + compatible = "pci-x86";
  26 + #address-cells = <3>;
  27 + #size-cells = <2>;
  28 + u-boot,dm-pre-reloc;
  29 + ranges = <0x02000000 0x0 0xc0000000 0xc0000000 0 0x10000000
  30 + 0x42000000 0x0 0xd0000000 0xd0000000 0 0x10000000
  31 + 0x01000000 0x0 0x2000 0x2000 0 0xe000>;
  32 + };
  33 +
  34 +};
arch/x86/dts/qemu-x86_q35.dts
  1 +/*
  2 + * Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
  3 + *
  4 + * SPDX-License-Identifier: GPL-2.0+
  5 + */
  6 +
  7 +/dts-v1/;
  8 +
  9 +/include/ "skeleton.dtsi"
  10 +/include/ "serial.dtsi"
  11 +
  12 +/ {
  13 + model = "QEMU x86 (Q35)";
  14 + compatible = "qemu,x86";
  15 +
  16 + config {
  17 + silent_console = <0>;
  18 + };
  19 +
  20 + chosen {
  21 + stdout-path = "/serial";
  22 + };
  23 +
  24 + pci {
  25 + compatible = "pci-x86";
  26 + #address-cells = <3>;
  27 + #size-cells = <2>;
  28 + u-boot,dm-pre-reloc;
  29 + ranges = <0x02000000 0x0 0xc0000000 0xc0000000 0 0x10000000
  30 + 0x42000000 0x0 0xd0000000 0xd0000000 0 0x10000000
  31 + 0x01000000 0x0 0x2000 0x2000 0 0xe000>;
  32 + };
  33 +
  34 +};
board/coreboot/coreboot/Kconfig
... ... @@ -23,7 +23,7 @@
23 23  
24 24 config DEFAULT_DEVICE_TREE
25 25 string "Board Device Tree Source (dts) file"
26   - default "qemu-x86"
  26 + default "qemu-x86_i440fx"
27 27 help
28 28 This option selects the board Device Tree Source (dts) file in
29 29 arch/x86/dts/ directory to be used to build U-Boot for coreboot.
configs/qemu-x86_defconfig
1 1 CONFIG_X86=y
2 2 CONFIG_VENDOR_EMULATION=y
  3 +CONFIG_DEFAULT_DEVICE_TREE="qemu-x86_i440fx"
3 4 CONFIG_TARGET_QEMU_X86=y
4 5 CONFIG_CMD_NET=y
5 6 CONFIG_OF_CONTROL=y
6   -CONFIG_OF_SEPARATE=y
7   -CONFIG_DEFAULT_DEVICE_TREE="qemu-x86"
8 7 CONFIG_VIDEO_VESA=y
9 8 CONFIG_FRAMEBUFFER_SET_VESA_MODE=y
10 9 CONFIG_FRAMEBUFFER_VESA_MODE_111=y
... ... @@ -40,7 +40,7 @@
40 40 x86 architecture --->
41 41 ...
42 42 (qemu-x86) Board configuration file
43   - (qemu-x86) Board Device Tree Source (dts) file
  43 + (qemu-x86_i440fx) Board Device Tree Source (dts) file
44 44 (0x01920000) Board specific Cache-As-RAM (CAR) address
45 45 (0x4000) Board specific Cache-As-RAM (CAR) size
46 46  
... ... @@ -185,6 +185,14 @@
185 185  
186 186 $ make qemu-x86_defconfig
187 187 $ make all
  188 +
  189 +Note this default configuration will build a U-Boot for the QEMU x86 i440FX
  190 +board. To build a U-Boot against QEMU x86 Q35 board, you can change the build
  191 +configuration during the 'make menuconfig' process like below:
  192 +
  193 +Device Tree Control --->
  194 + ...
  195 + (qemu-x86_q35) Default Device Tree for DT control
188 196  
189 197 Test with coreboot
190 198 ------------------