[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 4/6] prep: move int-ack register f
From: |
Andreas Färber |
Subject: |
Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 4/6] prep: move int-ack register from PReP to Raven PCI emulation |
Date: |
Sat, 28 Apr 2012 20:46:57 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120328 Thunderbird/11.0.1 |
Am 14.04.2012 22:48, schrieb Hervé Poussineau:
> Register is one byte-wide (as per specification), so there is no need to
> specify endianness.
The region was 4 bytes before, now it's 1. What happens when a 4-byte
read is attempted at that address? Do we need to specify the valid
widths for the MemoryRegion? Or is such a read constructed from this
region and (assuming) the return value of an unassigned read?
> diff --git a/hw/prep_pci.c b/hw/prep_pci.c
> index 8b29da9..43847f5 100644
> --- a/hw/prep_pci.c
> +++ b/hw/prep_pci.c
> @@ -25,10 +25,12 @@
> #include "hw.h"
> #include "pci.h"
> #include "pci_host.h"
> +#include "pc.h"
Is that for pic_read_irq()?
Andreas
> #include "exec-memory.h"
>
> typedef struct PRePPCIState {
> PCIHostState host_state;
> + MemoryRegion intack;
> qemu_irq irq[4];
> } PREPPCIState;
>
> @@ -67,6 +69,16 @@ static const MemoryRegionOps PPC_PCIIO_ops = {
> .endianness = DEVICE_LITTLE_ENDIAN,
> };
>
> +static uint64_t ppc_intack_read(void *opaque, target_phys_addr_t addr,
> + unsigned int size)
> +{
> + return pic_read_irq(isa_pic);
> +}
> +
> +static const MemoryRegionOps PPC_intack_ops = {
> + .read = ppc_intack_read,
> +};
> +
> static int prep_map_irq(PCIDevice *pci_dev, int irq_num)
> {
> return (irq_num + (pci_dev->devfn >> 3)) & 1;
> @@ -110,6 +122,8 @@ static int raven_pcihost_init(SysBusDevice *dev)
> memory_region_init_io(&h->mmcfg, &PPC_PCIIO_ops, s, "pciio", 0x00400000);
> memory_region_add_subregion(address_space_mem, 0x80800000, &h->mmcfg);
>
> + memory_region_init_io(&s->intack, &PPC_intack_ops, s, "pci-intack", 1);
> + memory_region_add_subregion(address_space_mem, 0xbffffff0, &s->intack);
> pci_create_simple(bus, 0, "raven");
>
> return 0;
- [Qemu-ppc] [PATCH v2 0/6] prep: some fixes and Super I/O emulation, Hervé Poussineau, 2012/04/14
- [Qemu-ppc] [PATCH v2 1/6] isa: add isa_bus_from_device() method, Hervé Poussineau, 2012/04/14
- [Qemu-ppc] [PATCH v2 2/6] prep: add pc87312 Super I/O emulation, Hervé Poussineau, 2012/04/14
- [Qemu-ppc] [PATCH v2 3/6] prep: use pc87312 Super I/O chip instead of collection of random ISA devices, Hervé Poussineau, 2012/04/14
- [Qemu-ppc] [PATCH v2 4/6] prep: move int-ack register from PReP to Raven PCI emulation, Hervé Poussineau, 2012/04/14
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 4/6] prep: move int-ack register from PReP to Raven PCI emulation,
Andreas Färber <=
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 4/6] prep: move int-ack register from PReP to Raven PCI emulation, Hervé Poussineau, 2012/04/28
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 4/6] prep: move int-ack register from PReP to Raven PCI emulation, Avi Kivity, 2012/04/29
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 4/6] prep: move int-ack register from PReP to Raven PCI emulation, Andreas Färber, 2012/04/29
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 4/6] prep: move int-ack register from PReP to Raven PCI emulation, Avi Kivity, 2012/04/30
- Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 4/6] prep: move int-ack register from PReP to Raven PCI emulation, Andreas Färber, 2012/04/30
[Qemu-ppc] [PATCH v2 5/6] pcspk: initialize PC speaker if compiled in, Hervé Poussineau, 2012/04/14
[Qemu-ppc] [PATCH v2 6/6] prep: initialize pc speaker, Hervé Poussineau, 2012/04/14
Re: [Qemu-ppc] [Qemu-devel] [PATCH v2 0/6] prep: some fixes and Super I/O emulation, Artyom Tarasenko, 2012/04/15