[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC][PATCH 08/15] isa: implement isa_is_ioport_assigne
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [RFC][PATCH 08/15] isa: implement isa_is_ioport_assigned via memory_region_find |
Date: |
Mon, 06 May 2013 16:55:01 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 |
Am 06.05.2013 16:26, schrieb Jan Kiszka:
> Move isa_is_ioport_assigned to the ISA core and implement it via a
> memory region lookup. As all IO ports are now directly or indirectly
> registered via the memory API, this becomes possible and will finally
> allow us to drop the ioport tables.
>
> Signed-off-by: Jan Kiszka <address@hidden>
> ---
> hw/acpi/piix4.c | 6 +++---
> hw/isa/isa-bus.c | 11 +++++++++++
> hw/isa/lpc_ich9.c | 8 ++++----
> include/exec/ioport.h | 1 -
> include/hw/isa/isa.h | 2 ++
> ioport.c | 7 -------
> 6 files changed, 20 insertions(+), 15 deletions(-)
>
> diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
> index c4af1cc..5955217 100644
> --- a/hw/acpi/piix4.c
> +++ b/hw/acpi/piix4.c
> @@ -386,10 +386,10 @@ static void piix4_pm_machine_ready(Notifier *n, void
> *opaque)
> uint8_t *pci_conf;
>
> pci_conf = s->dev.config;
> - pci_conf[0x5f] = (isa_is_ioport_assigned(0x378) ? 0x80 : 0) | 0x10;
> + pci_conf[0x5f] = (isa_is_ioport_assigned(NULL, 0x378) ? 0x80 : 0) | 0x10;
> pci_conf[0x63] = 0x60;
> - pci_conf[0x67] = (isa_is_ioport_assigned(0x3f8) ? 0x08 : 0) |
> - (isa_is_ioport_assigned(0x2f8) ? 0x90 : 0);
> + pci_conf[0x67] = (isa_is_ioport_assigned(NULL, 0x3f8) ? 0x08 : 0) |
> + (isa_is_ioport_assigned(NULL, 0x2f8) ? 0x90 : 0);
>
> }
>
Is there really no way to access the ISABus from this device? Would be
nice to get rid of global ISA variables and not introduce more
dependencies. :)
Andreas
[...]
> diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
> index 667e882..641227a 100644
> --- a/hw/isa/lpc_ich9.c
> +++ b/hw/isa/lpc_ich9.c
> @@ -480,19 +480,19 @@ static void ich9_lpc_machine_ready(Notifier *n, void
> *opaque)
> uint8_t *pci_conf;
>
> pci_conf = s->d.config;
> - if (isa_is_ioport_assigned(0x3f8)) {
> + if (isa_is_ioport_assigned(s->isa_bus, 0x3f8)) {
> /* com1 */
> pci_conf[0x82] |= 0x01;
> }
> - if (isa_is_ioport_assigned(0x2f8)) {
> + if (isa_is_ioport_assigned(s->isa_bus, 0x2f8)) {
> /* com2 */
> pci_conf[0x82] |= 0x02;
> }
> - if (isa_is_ioport_assigned(0x378)) {
> + if (isa_is_ioport_assigned(s->isa_bus, 0x378)) {
> /* lpt */
> pci_conf[0x82] |= 0x04;
> }
> - if (isa_is_ioport_assigned(0x3f0)) {
> + if (isa_is_ioport_assigned(s->isa_bus, 0x3f0)) {
> /* floppy */
> pci_conf[0x82] |= 0x08;
> }
[snip]
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [RFC][PATCH 02/15] applesmc: replace register_ioport*, (continued)
- [Qemu-devel] [RFC][PATCH 02/15] applesmc: replace register_ioport*, Jan Kiszka, 2013/05/06
- [Qemu-devel] [RFC][PATCH 10/15] memory: Rework sub-page handling, Jan Kiszka, 2013/05/06
- Re: [Qemu-devel] [RFC][PATCH 10/15] memory: Rework sub-page handling, Paolo Bonzini, 2013/05/06
- Re: [Qemu-devel] [RFC][PATCH 10/15] memory: Rework sub-page handling, Peter Maydell, 2013/05/06
- Re: [Qemu-devel] [RFC][PATCH 10/15] memory: Rework sub-page handling, Paolo Bonzini, 2013/05/07
- Re: [Qemu-devel] [RFC][PATCH 10/15] memory: Rework sub-page handling, Paolo Bonzini, 2013/05/07
- Re: [Qemu-devel] [RFC][PATCH 10/15] memory: Rework sub-page handling, Jan Kiszka, 2013/05/07
- Re: [Qemu-devel] [RFC][PATCH 10/15] memory: Rework sub-page handling, Jan Kiszka, 2013/05/07
- Re: [Qemu-devel] [RFC][PATCH 10/15] memory: Rework sub-page handling, Paolo Bonzini, 2013/05/08
[Qemu-devel] [RFC][PATCH 08/15] isa: implement isa_is_ioport_assigned via memory_region_find, Jan Kiszka, 2013/05/06
- Re: [Qemu-devel] [RFC][PATCH 08/15] isa: implement isa_is_ioport_assigned via memory_region_find,
Andreas Färber <=
[Qemu-devel] [RFC][PATCH 11/15] memory: Allow unaligned address_space_rw, Jan Kiszka, 2013/05/06
[Qemu-devel] [RFC][PATCH 09/15] memory: Introduce address_space_lookup_region, Jan Kiszka, 2013/05/06