[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 30/60] hw/char/parallel-isa: Implement relocation and enabling/dis
From: |
Michael S. Tsirkin |
Subject: |
[PULL 30/60] hw/char/parallel-isa: Implement relocation and enabling/disabling for TYPE_ISA_PARALLEL |
Date: |
Wed, 14 Feb 2024 06:14:49 -0500 |
From: Bernhard Beschow <shentey@gmail.com>
The real SuperI/O chips emulated by QEMU allow for relocating and enabling or
disabling their SuperI/O functions via software. So far this is not implemented.
Prepare for that by adding isa_parallel_set_{enabled,iobase}.
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Message-Id: <20240114123911.4877-10-shentey@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/hw/char/parallel-isa.h | 3 +++
hw/char/parallel-isa.c | 14 ++++++++++++++
2 files changed, 17 insertions(+)
diff --git a/include/hw/char/parallel-isa.h b/include/hw/char/parallel-isa.h
index 3b783bd08d..5284b2ffec 100644
--- a/include/hw/char/parallel-isa.h
+++ b/include/hw/char/parallel-isa.h
@@ -29,4 +29,7 @@ struct ISAParallelState {
PortioList portio_list;
};
+void isa_parallel_set_iobase(ISADevice *parallel, hwaddr iobase);
+void isa_parallel_set_enabled(ISADevice *parallel, bool enabled);
+
#endif /* HW_PARALLEL_ISA_H */
diff --git a/hw/char/parallel-isa.c b/hw/char/parallel-isa.c
index ab0f879998..a5ce6ee13a 100644
--- a/hw/char/parallel-isa.c
+++ b/hw/char/parallel-isa.c
@@ -41,3 +41,17 @@ void parallel_hds_isa_init(ISABus *bus, int n)
}
}
}
+
+void isa_parallel_set_iobase(ISADevice *parallel, hwaddr iobase)
+{
+ ISAParallelState *s = ISA_PARALLEL(parallel);
+
+ parallel->ioport_id = iobase;
+ s->iobase = iobase;
+ portio_list_set_address(&s->portio_list, s->iobase);
+}
+
+void isa_parallel_set_enabled(ISADevice *parallel, bool enabled)
+{
+ portio_list_set_enabled(&ISA_PARALLEL(parallel)->portio_list, enabled);
+}
--
MST
- [PULL 19/60] hw/i386/x86: Reverse if statement, (continued)
- [PULL 19/60] hw/i386/x86: Reverse if statement, Michael S. Tsirkin, 2024/02/14
- [PULL 20/60] hw/i386/x86: Fix PIC interrupt handling if APIC is globally disabled, Michael S. Tsirkin, 2024/02/14
- [PULL 21/60] target/i386/cpu: Fix typo in comment, Michael S. Tsirkin, 2024/02/14
- [PULL 23/60] hw/block/fdc-sysbus: Move iomem from FDCtrl to FDCtrlSysBus, Michael S. Tsirkin, 2024/02/14
- [PULL 24/60] hw/char/parallel: Move portio_list from ParallelState to ISAParallelState, Michael S. Tsirkin, 2024/02/14
- [PULL 25/60] exec/ioport: Resolve redundant .base attribute in struct MemoryRegionPortio, Michael S. Tsirkin, 2024/02/14
- [PULL 26/60] exec/ioport: Add portio_list_set_address(), Michael S. Tsirkin, 2024/02/14
- [PULL 27/60] exec/ioport: Add portio_list_set_enabled(), Michael S. Tsirkin, 2024/02/14
- [PULL 28/60] hw/block/fdc-isa: Implement relocation and enabling/disabling for TYPE_ISA_FDC, Michael S. Tsirkin, 2024/02/14
- [PULL 29/60] hw/char/serial-isa: Implement relocation and enabling/disabling for TYPE_ISA_SERIAL, Michael S. Tsirkin, 2024/02/14
- [PULL 30/60] hw/char/parallel-isa: Implement relocation and enabling/disabling for TYPE_ISA_PARALLEL,
Michael S. Tsirkin <=
- [PULL 31/60] hw/ppc/pegasos2: Let pegasos2 machine configure SuperI/O functions, Michael S. Tsirkin, 2024/02/14
- [PULL 32/60] hw/isa/vt82c686: Implement relocation and toggling of SuperI/O functions, Michael S. Tsirkin, 2024/02/14
- [PULL 33/60] vhost-user.rst: Fix vring address description, Michael S. Tsirkin, 2024/02/14
- [PULL 35/60] virtio_iommu: Clear IOMMUPciBus pointer cache when system reset, Michael S. Tsirkin, 2024/02/14
- [PULL 36/60] smmu: Clear SMMUPciBus pointer cache when system reset, Michael S. Tsirkin, 2024/02/14
- [PULL 34/60] MAINTAINERS: Drop myself as VT-d maintainers, Michael S. Tsirkin, 2024/02/14
- [PULL 40/60] cxl/cdat: Fix header sum value in CDAT checksum, Michael S. Tsirkin, 2024/02/14
- [PULL 39/60] hw/pci-bridge/cxl_upstream: Drop g_malloc() failure handling, Michael S. Tsirkin, 2024/02/14
- [PULL 41/60] hw/cxl/mbox: Remove dead code, Michael S. Tsirkin, 2024/02/14
- [PULL 42/60] hw/cxl/device: read from register values in mdev_reg_read(), Michael S. Tsirkin, 2024/02/14