From 00cc7f4355ca1bdd621d4618f24f3336b29463cb Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Fri, 7 Jun 2013 15:46:23 +0200 Subject: [PATCH] qemu: move i440fx bits Prepare tree for adding q35 support: Move emulation/qemu-x86 to emulation/qemu-i440fx. Rename some stuff to include 'i440fx'. Change-Id: Ib8c58175c5734cfcda1b22404ef52c09d38f0462 Signed-off-by: Gerd Hoffmann Reviewed-on: http://review.coreboot.org/3429 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/mainboard/emulation/Kconfig | 11 ++++++++--- .../emulation/{qemu-x86 => qemu-i440fx}/Kconfig | 6 +++--- src/mainboard/emulation/qemu-i440fx/Makefile.inc | 3 +++ .../{qemu-x86 => qemu-i440fx}/acpi/cpu-hotplug.asl | 0 .../emulation/{qemu-x86 => qemu-i440fx}/acpi/dbug.asl | 0 .../emulation/{qemu-x86 => qemu-i440fx}/acpi/hpet.asl | 0 .../emulation/{qemu-x86 => qemu-i440fx}/acpi/isa.asl | 0 .../{qemu-x86 => qemu-i440fx}/acpi/pci-crs.asl | 0 .../emulation/{qemu-x86 => qemu-i440fx}/acpi_tables.c | 0 .../{qemu-x86 => qemu-i440fx}/cache_as_ram.inc | 0 .../emulation/{qemu-x86 => qemu-i440fx}/cmos.layout | 0 .../emulation/{qemu-x86 => qemu-i440fx}/devicetree.cb | 2 +- .../emulation/{qemu-x86 => qemu-i440fx}/dsdt.asl | 0 .../emulation/{qemu-x86 => qemu-i440fx}/fw_cfg.c | 0 .../emulation/{qemu-x86 => qemu-i440fx}/fw_cfg.h | 0 .../emulation/{qemu-x86 => qemu-i440fx}/fw_cfg_if.h | 0 .../emulation/{qemu-x86 => qemu-i440fx}/irq_tables.c | 0 .../emulation/{qemu-x86 => qemu-i440fx}/mainboard.c | 0 .../emulation/{qemu-x86 => qemu-i440fx}/memory.c | 0 .../emulation/{qemu-x86 => qemu-i440fx}/northbridge.c | 4 ++-- .../emulation/{qemu-x86 => qemu-i440fx}/romstage.c | 0 src/mainboard/emulation/qemu-x86/Makefile.inc | 3 --- 22 files changed, 17 insertions(+), 12 deletions(-) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/Kconfig (84%) create mode 100644 src/mainboard/emulation/qemu-i440fx/Makefile.inc rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/acpi/cpu-hotplug.asl (100%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/acpi/dbug.asl (100%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/acpi/hpet.asl (100%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/acpi/isa.asl (100%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/acpi/pci-crs.asl (100%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/acpi_tables.c (100%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/cache_as_ram.inc (100%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/cmos.layout (100%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/devicetree.cb (91%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/dsdt.asl (100%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/fw_cfg.c (100%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/fw_cfg.h (100%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/fw_cfg_if.h (100%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/irq_tables.c (100%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/mainboard.c (100%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/memory.c (100%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/northbridge.c (98%) rename src/mainboard/emulation/{qemu-x86 => qemu-i440fx}/romstage.c (100%) delete mode 100644 src/mainboard/emulation/qemu-x86/Makefile.inc diff --git a/src/mainboard/emulation/Kconfig b/src/mainboard/emulation/Kconfig index ea6b18077b..72b70af6da 100644 --- a/src/mainboard/emulation/Kconfig +++ b/src/mainboard/emulation/Kconfig @@ -3,15 +3,20 @@ if VENDOR_EMULATION choice prompt "Mainboard model" -config BOARD_EMULATION_QEMU_X86 - bool "QEMU x86" +config BOARD_EMULATION_QEMU_X86_I440FX + bool "QEMU x86 i440fx/piix4 (aka qemu -M pc)" config BOARD_EMULATION_QEMU_ARMV7 bool "QEMU armv7 (vexpress-a9)" endchoice -source "src/mainboard/emulation/qemu-x86/Kconfig" +config BOARD_EMULATION_QEMU_X86 + bool + default y + depends on BOARD_EMULATION_QEMU_X86_I440FX + +source "src/mainboard/emulation/qemu-i440fx/Kconfig" source "src/mainboard/emulation/qemu-armv7/Kconfig" config MAINBOARD_VENDOR diff --git a/src/mainboard/emulation/qemu-x86/Kconfig b/src/mainboard/emulation/qemu-i440fx/Kconfig similarity index 84% rename from src/mainboard/emulation/qemu-x86/Kconfig rename to src/mainboard/emulation/qemu-i440fx/Kconfig index f8167941fd..a61050a755 100644 --- a/src/mainboard/emulation/qemu-x86/Kconfig +++ b/src/mainboard/emulation/qemu-i440fx/Kconfig @@ -1,4 +1,4 @@ -if BOARD_EMULATION_QEMU_X86 +if BOARD_EMULATION_QEMU_X86_I440FX config BOARD_SPECIFIC_OPTIONS # dummy def_bool y @@ -15,11 +15,11 @@ config BOARD_SPECIFIC_OPTIONS # dummy config MAINBOARD_DIR string - default emulation/qemu-x86 + default emulation/qemu-i440fx config MAINBOARD_PART_NUMBER string - default "QEMU x86" + default "QEMU x86 i440fx/piix4" config IRQ_SLOT_COUNT int diff --git a/src/mainboard/emulation/qemu-i440fx/Makefile.inc b/src/mainboard/emulation/qemu-i440fx/Makefile.inc new file mode 100644 index 0000000000..7423b2b84b --- /dev/null +++ b/src/mainboard/emulation/qemu-i440fx/Makefile.inc @@ -0,0 +1,3 @@ +cpu_incs += $(src)/mainboard/emulation/qemu-i440fx/cache_as_ram.inc +ramstage-y += northbridge.c +ramstage-y += fw_cfg.c diff --git a/src/mainboard/emulation/qemu-x86/acpi/cpu-hotplug.asl b/src/mainboard/emulation/qemu-i440fx/acpi/cpu-hotplug.asl similarity index 100% rename from src/mainboard/emulation/qemu-x86/acpi/cpu-hotplug.asl rename to src/mainboard/emulation/qemu-i440fx/acpi/cpu-hotplug.asl diff --git a/src/mainboard/emulation/qemu-x86/acpi/dbug.asl b/src/mainboard/emulation/qemu-i440fx/acpi/dbug.asl similarity index 100% rename from src/mainboard/emulation/qemu-x86/acpi/dbug.asl rename to src/mainboard/emulation/qemu-i440fx/acpi/dbug.asl diff --git a/src/mainboard/emulation/qemu-x86/acpi/hpet.asl b/src/mainboard/emulation/qemu-i440fx/acpi/hpet.asl similarity index 100% rename from src/mainboard/emulation/qemu-x86/acpi/hpet.asl rename to src/mainboard/emulation/qemu-i440fx/acpi/hpet.asl diff --git a/src/mainboard/emulation/qemu-x86/acpi/isa.asl b/src/mainboard/emulation/qemu-i440fx/acpi/isa.asl similarity index 100% rename from src/mainboard/emulation/qemu-x86/acpi/isa.asl rename to src/mainboard/emulation/qemu-i440fx/acpi/isa.asl diff --git a/src/mainboard/emulation/qemu-x86/acpi/pci-crs.asl b/src/mainboard/emulation/qemu-i440fx/acpi/pci-crs.asl similarity index 100% rename from src/mainboard/emulation/qemu-x86/acpi/pci-crs.asl rename to src/mainboard/emulation/qemu-i440fx/acpi/pci-crs.asl diff --git a/src/mainboard/emulation/qemu-x86/acpi_tables.c b/src/mainboard/emulation/qemu-i440fx/acpi_tables.c similarity index 100% rename from src/mainboard/emulation/qemu-x86/acpi_tables.c rename to src/mainboard/emulation/qemu-i440fx/acpi_tables.c diff --git a/src/mainboard/emulation/qemu-x86/cache_as_ram.inc b/src/mainboard/emulation/qemu-i440fx/cache_as_ram.inc similarity index 100% rename from src/mainboard/emulation/qemu-x86/cache_as_ram.inc rename to src/mainboard/emulation/qemu-i440fx/cache_as_ram.inc diff --git a/src/mainboard/emulation/qemu-x86/cmos.layout b/src/mainboard/emulation/qemu-i440fx/cmos.layout similarity index 100% rename from src/mainboard/emulation/qemu-x86/cmos.layout rename to src/mainboard/emulation/qemu-i440fx/cmos.layout diff --git a/src/mainboard/emulation/qemu-x86/devicetree.cb b/src/mainboard/emulation/qemu-i440fx/devicetree.cb similarity index 91% rename from src/mainboard/emulation/qemu-x86/devicetree.cb rename to src/mainboard/emulation/qemu-i440fx/devicetree.cb index f37454be09..a4fcef1fd9 100644 --- a/src/mainboard/emulation/qemu-x86/devicetree.cb +++ b/src/mainboard/emulation/qemu-i440fx/devicetree.cb @@ -1,4 +1,4 @@ -chip mainboard/emulation/qemu-x86 +chip mainboard/emulation/qemu-i440fx device cpu_cluster 0 on chip cpu/qemu-x86 device lapic 0 on end diff --git a/src/mainboard/emulation/qemu-x86/dsdt.asl b/src/mainboard/emulation/qemu-i440fx/dsdt.asl similarity index 100% rename from src/mainboard/emulation/qemu-x86/dsdt.asl rename to src/mainboard/emulation/qemu-i440fx/dsdt.asl diff --git a/src/mainboard/emulation/qemu-x86/fw_cfg.c b/src/mainboard/emulation/qemu-i440fx/fw_cfg.c similarity index 100% rename from src/mainboard/emulation/qemu-x86/fw_cfg.c rename to src/mainboard/emulation/qemu-i440fx/fw_cfg.c diff --git a/src/mainboard/emulation/qemu-x86/fw_cfg.h b/src/mainboard/emulation/qemu-i440fx/fw_cfg.h similarity index 100% rename from src/mainboard/emulation/qemu-x86/fw_cfg.h rename to src/mainboard/emulation/qemu-i440fx/fw_cfg.h diff --git a/src/mainboard/emulation/qemu-x86/fw_cfg_if.h b/src/mainboard/emulation/qemu-i440fx/fw_cfg_if.h similarity index 100% rename from src/mainboard/emulation/qemu-x86/fw_cfg_if.h rename to src/mainboard/emulation/qemu-i440fx/fw_cfg_if.h diff --git a/src/mainboard/emulation/qemu-x86/irq_tables.c b/src/mainboard/emulation/qemu-i440fx/irq_tables.c similarity index 100% rename from src/mainboard/emulation/qemu-x86/irq_tables.c rename to src/mainboard/emulation/qemu-i440fx/irq_tables.c diff --git a/src/mainboard/emulation/qemu-x86/mainboard.c b/src/mainboard/emulation/qemu-i440fx/mainboard.c similarity index 100% rename from src/mainboard/emulation/qemu-x86/mainboard.c rename to src/mainboard/emulation/qemu-i440fx/mainboard.c diff --git a/src/mainboard/emulation/qemu-x86/memory.c b/src/mainboard/emulation/qemu-i440fx/memory.c similarity index 100% rename from src/mainboard/emulation/qemu-x86/memory.c rename to src/mainboard/emulation/qemu-i440fx/memory.c diff --git a/src/mainboard/emulation/qemu-x86/northbridge.c b/src/mainboard/emulation/qemu-i440fx/northbridge.c similarity index 98% rename from src/mainboard/emulation/qemu-x86/northbridge.c rename to src/mainboard/emulation/qemu-i440fx/northbridge.c index 992a39e673..c2e4ba22b3 100644 --- a/src/mainboard/emulation/qemu-x86/northbridge.c +++ b/src/mainboard/emulation/qemu-i440fx/northbridge.c @@ -185,7 +185,7 @@ static void northbridge_enable(struct device *dev) } } -struct chip_operations mainboard_emulation_qemu_x86_ops = { - CHIP_NAME("QEMU Northbridge") +struct chip_operations mainboard_emulation_qemu_i440fx_ops = { + CHIP_NAME("QEMU Northbridge i440fx") .enable_dev = northbridge_enable, }; diff --git a/src/mainboard/emulation/qemu-x86/romstage.c b/src/mainboard/emulation/qemu-i440fx/romstage.c similarity index 100% rename from src/mainboard/emulation/qemu-x86/romstage.c rename to src/mainboard/emulation/qemu-i440fx/romstage.c diff --git a/src/mainboard/emulation/qemu-x86/Makefile.inc b/src/mainboard/emulation/qemu-x86/Makefile.inc deleted file mode 100644 index 21d73442ca..0000000000 --- a/src/mainboard/emulation/qemu-x86/Makefile.inc +++ /dev/null @@ -1,3 +0,0 @@ -cpu_incs += $(src)/mainboard/emulation/qemu-x86/cache_as_ram.inc -ramstage-y += northbridge.c -ramstage-y += fw_cfg.c