[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/26] hw/i386: Add the possibility to use i440fx and isapc withou
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 11/26] hw/i386: Add the possibility to use i440fx and isapc without FDC |
Date: |
Wed, 8 May 2024 19:44:55 +0200 |
From: Thomas Huth <thuth@redhat.com>
The i440fx and the isapc machines can be used in binaries without
FDC, too. We just have to make sure that they don't try to instantiate
the FDC when it is not available.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Acked-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20240425184315.553329-4-thuth@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/i386/pc_piix.c | 6 ++++--
hw/i386/Kconfig | 2 --
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 8850c49c66..99efb3c45c 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -317,8 +317,8 @@ static void pc_init1(MachineState *machine, const char
*pci_type)
}
/* init basic PC hardware */
- pc_basic_device_init(pcms, isa_bus, x86ms->gsi, x86ms->rtc, true,
- 0x4);
+ pc_basic_device_init(pcms, isa_bus, x86ms->gsi, x86ms->rtc,
+ !MACHINE_CLASS(pcmc)->no_floppy, 0x4);
pc_nic_init(pcmc, isa_bus, pcms->pcibus);
@@ -501,6 +501,7 @@ static void pc_i440fx_machine_options(MachineClass *m)
m->default_machine_opts = "firmware=bios-256k.bin";
m->default_display = "std";
m->default_nic = "e1000";
+ m->no_floppy = !module_object_class_by_name(TYPE_ISA_FDC);
m->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL);
machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE);
@@ -931,6 +932,7 @@ static void isapc_machine_options(MachineClass *m)
pcmc->has_reserved_memory = false;
m->default_nic = "ne2k_isa";
m->default_cpu_type = X86_CPU_TYPE_NAME("486");
+ m->no_floppy = !module_object_class_by_name(TYPE_ISA_FDC);
m->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL);
}
diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig
index 58ca8f246d..40b1e44580 100644
--- a/hw/i386/Kconfig
+++ b/hw/i386/Kconfig
@@ -72,7 +72,6 @@ config I440FX
imply VMPORT
imply VMMOUSE
select ACPI_PIIX4
- select FDC_ISA
select PC_PCI
select PC_ACPI
select PCI_I440FX
@@ -88,7 +87,6 @@ config ISAPC
depends on I386
imply VGA_ISA
select ISA_BUS
- select FDC_ISA
select PC
select IDE_ISA
# FIXME: it is in the same file as i440fx, and does not compile
--
2.41.0
- [PULL 13/26] hw/i386: Have x86_bios_rom_init() take X86MachineState rather than MachineState, (continued)
- [PULL 13/26] hw/i386: Have x86_bios_rom_init() take X86MachineState rather than MachineState, Philippe Mathieu-Daudé, 2024/05/08
- [PULL 09/26] hw/i386/pc: Allow to compile without CONFIG_FDC_ISA, Philippe Mathieu-Daudé, 2024/05/08
- [PULL 04/26] hw/ppc/spapr_pci: Replace g_memdup() by g_memdup2(), Philippe Mathieu-Daudé, 2024/05/08
- [PULL 05/26] hw/remote/vfio-user: Fix config space access byte order, Philippe Mathieu-Daudé, 2024/05/08
- [PULL 12/26] hw/i386/x86: Eliminate two if statements in x86_bios_rom_init(), Philippe Mathieu-Daudé, 2024/05/08
- [PULL 14/26] hw/i386/x86: Don't leak "isa-bios" memory regions, Philippe Mathieu-Daudé, 2024/05/08
- [PULL 10/26] hw/i386/Kconfig: Allow to compile Q35 without FDC_ISA, Philippe Mathieu-Daudé, 2024/05/08
- [PULL 08/26] system/physmem: Per-AddressSpace bounce buffering, Philippe Mathieu-Daudé, 2024/05/08
- [PULL 11/26] hw/i386: Add the possibility to use i440fx and isapc without FDC,
Philippe Mathieu-Daudé <=
- [PULL 15/26] hw/usb/dev-network: Remove unused struct 'rndis_config_parameter', Philippe Mathieu-Daudé, 2024/05/08
- [PULL 16/26] hw/gpio: Handle clock migration in STM32L4x5 gpios, Philippe Mathieu-Daudé, 2024/05/08
- [PULL 17/26] hw/ppc: Deprecate 'ref405ep' machine and 405 CPUs, Philippe Mathieu-Daudé, 2024/05/08
- [PULL 18/26] hw/loongarch: move memory map to boot.c, Philippe Mathieu-Daudé, 2024/05/08
- [PULL 19/26] hw/loongarch/virt: Fix memory leak, Philippe Mathieu-Daudé, 2024/05/08
- [PULL 20/26] hw/loongarch: Rename LOONGARCH_MACHINE with LOONGARCH_VIRT_MACHINE, Philippe Mathieu-Daudé, 2024/05/08
- [PULL 23/26] hw/intc/loongarch_ipi: Remove pointless MAX_CPU check, Philippe Mathieu-Daudé, 2024/05/08
- [PULL 22/26] hw/mips/loongson3_virt: Emulate suspend function, Philippe Mathieu-Daudé, 2024/05/08
- [PULL 24/26] hw/intc/loongarch_ipi: Rename as loongson_ipi, Philippe Mathieu-Daudé, 2024/05/08
- [PULL 21/26] hw/loongarch: Rename LoongArchMachineState with LoongArchVirtMachineState, Philippe Mathieu-Daudé, 2024/05/08