aboutsummaryrefslogtreecommitdiff
path: root/hw/char
diff options
context:
space:
mode:
authorBernhard Beschow <shentey@gmail.com>2024-01-14 13:39:09 +0100
committerMichael S. Tsirkin <mst@redhat.com>2024-02-14 06:09:32 -0500
commit1d1afd9ff7264c7ed35f3ca25cc4bf9dd82a6b06 (patch)
tree9e69e5cea3e818eb456283ee143e15d7b9b5f880 /hw/char
parent7812dbc54c72f71df2644d0cec52a1e8d6b19584 (diff)
hw/char/parallel-isa: Implement relocation and enabling/disabling for TYPE_ISA_PARALLEL
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>
Diffstat (limited to 'hw/char')
-rw-r--r--hw/char/parallel-isa.c14
1 files changed, 14 insertions, 0 deletions
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);
+}