Skip to content

Commit

Permalink
hw/char/parallel-isa: Implement relocation and enabling/disabling for…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
shentok authored and mstsirkin committed Feb 14, 2024
1 parent 7812dbc commit 1d1afd9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions hw/char/parallel-isa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
3 changes: 3 additions & 0 deletions include/hw/char/parallel-isa.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

0 comments on commit 1d1afd9

Please sign in to comment.