[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v8 21/29] hw/isa/piix: Allow for optional PIT creation in PIIX3
From: |
Bernhard Beschow |
Subject: |
[PATCH v8 21/29] hw/isa/piix: Allow for optional PIT creation in PIIX3 |
Date: |
Sat, 7 Oct 2023 14:38:29 +0200 |
In the PC machine, the PIT is created in board code to allow it to be
virtualized with various virtualization techniques. So explicitly disable its
creation in the PC machine via a property which defaults to enabled. Once the
PIIX implementations are consolidated this default will keep Malta working
without further ado.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
---
include/hw/southbridge/piix.h | 1 +
hw/i386/pc_piix.c | 2 ++
hw/isa/piix.c | 6 ++++++
3 files changed, 9 insertions(+)
diff --git a/include/hw/southbridge/piix.h b/include/hw/southbridge/piix.h
index 08491693b4..86709ba2e4 100644
--- a/include/hw/southbridge/piix.h
+++ b/include/hw/southbridge/piix.h
@@ -70,6 +70,7 @@ struct PIIXState {
bool has_acpi;
bool has_pic;
+ bool has_pit;
bool has_usb;
bool smm_enabled;
};
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index fa39afd891..e38942a3c3 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -270,6 +270,8 @@ static void pc_init1(MachineState *machine,
&error_abort);
object_property_set_bool(OBJECT(pci_dev), "has-pic", false,
&error_abort);
+ object_property_set_bool(OBJECT(pci_dev), "has-pit", false,
+ &error_abort);
qdev_prop_set_uint32(DEVICE(pci_dev), "smb_io_base", 0xb100);
object_property_set_bool(OBJECT(pci_dev), "smm-enabled",
x86_machine_is_smm_enabled(x86ms),
diff --git a/hw/isa/piix.c b/hw/isa/piix.c
index d6d9ac6473..270b8eb1f7 100644
--- a/hw/isa/piix.c
+++ b/hw/isa/piix.c
@@ -361,6 +361,11 @@ static void pci_piix3_realize(PCIDevice *dev, Error **errp)
isa_bus_register_input_irqs(isa_bus, d->isa_irqs_in);
+ /* PIT */
+ if (d->has_pit) {
+ i8254_pit_init(isa_bus, 0x40, 0, NULL);
+ }
+
i8257_dma_init(isa_bus, 0);
/* RTC */
@@ -436,6 +441,7 @@ static Property pci_piix3_props[] = {
DEFINE_PROP_UINT32("smb_io_base", PIIXState, smb_io_base, 0),
DEFINE_PROP_BOOL("has-acpi", PIIXState, has_acpi, true),
DEFINE_PROP_BOOL("has-pic", PIIXState, has_pic, true),
+ DEFINE_PROP_BOOL("has-pit", PIIXState, has_pit, true),
DEFINE_PROP_BOOL("has-usb", PIIXState, has_usb, true),
DEFINE_PROP_BOOL("smm-enabled", PIIXState, smm_enabled, false),
DEFINE_PROP_END_OF_LIST(),
--
2.42.0
- [PATCH v8 06/29] hw/i386/pc_piix: Remove redundant "piix3" variable, (continued)
- [PATCH v8 06/29] hw/i386/pc_piix: Remove redundant "piix3" variable, Bernhard Beschow, 2023/10/07
- [PATCH v8 07/29] hw/isa/piix3: Rename "pic" attribute to "isa_irqs_in", Bernhard Beschow, 2023/10/07
- [PATCH v8 08/29] hw/i386/pc_q35: Wire ICH9 LPC function's interrupts before its realize(), Bernhard Beschow, 2023/10/07
- [PATCH v8 09/29] hw/isa/piix3: Wire PIC IRQs to ISA bus in host device, Bernhard Beschow, 2023/10/07
- [PATCH v8 11/29] hw/isa/piix3: Create IDE controller in host device, Bernhard Beschow, 2023/10/07
- [PATCH v8 10/29] hw/i386/pc: Wire RTC ISA IRQs in south bridges, Bernhard Beschow, 2023/10/07
- [PATCH v8 04/29] hw/isa/piix3: Resolve redundant PIIX_NUM_PIC_IRQS, Bernhard Beschow, 2023/10/07
- [PATCH v8 18/29] hw/isa/piix4: Reuse struct PIIXState from PIIX3, Bernhard Beschow, 2023/10/07
- [PATCH v8 14/29] hw/isa/piix3: Drop the "3" from PIIX base class name, Bernhard Beschow, 2023/10/07
- [PATCH v8 13/29] hw/isa/piix3: Create power management controller in host device, Bernhard Beschow, 2023/10/07
- [PATCH v8 21/29] hw/isa/piix: Allow for optional PIT creation in PIIX3,
Bernhard Beschow <=
- [PATCH v8 16/29] hw/isa/piix4: Rename "isa" attribute to "isa_irqs_in", Bernhard Beschow, 2023/10/07
- [PATCH v8 23/29] hw/isa/piix: Share PIIX3's base class with PIIX4, Bernhard Beschow, 2023/10/07
- [PATCH v8 24/29] hw/isa/piix: Reuse PIIX3 base class' realize method in PIIX4, Bernhard Beschow, 2023/10/07
- [PATCH v8 25/29] hw/isa/piix: Rename functions to be shared for PCI interrupt triggering, Bernhard Beschow, 2023/10/07
- [PATCH v8 12/29] hw/isa/piix3: Create USB controller in host device, Bernhard Beschow, 2023/10/07
- [PATCH v8 26/29] hw/isa/piix: Reuse PIIX3's PCI interrupt triggering in PIIX4, Bernhard Beschow, 2023/10/07
- [PATCH v8 22/29] hw/isa/piix: Harmonize names of reset control memory regions, Bernhard Beschow, 2023/10/07
- [PATCH v8 28/29] hw/isa/piix: Implement multi-process QEMU support also for PIIX4, Bernhard Beschow, 2023/10/07
- [PATCH v8 19/29] hw/isa/piix3: Merge hw/isa/piix4.c, Bernhard Beschow, 2023/10/07
- [PATCH v8 20/29] hw/isa/piix: Allow for optional PIC creation in PIIX3, Bernhard Beschow, 2023/10/07