[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH v3 3/8] prep_pci: Update I/O to MemoryRegion ops
From: |
Avi Kivity |
Subject: |
Re: [Qemu-ppc] [PATCH v3 3/8] prep_pci: Update I/O to MemoryRegion ops |
Date: |
Mon, 16 Jan 2012 17:15:15 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111222 Thunderbird/9.0 |
On 01/16/2012 05:08 PM, Andreas Färber wrote:
> Am 15.01.2012 10:19, schrieb Avi Kivity:
> > On 01/13/2012 05:09 AM, Andreas Färber wrote:
> >> Convert to new-style read/write callbacks.
> >>
> >>
> >> -static uint32_t PPC_PCIIO_readl (void *opaque, target_phys_addr_t addr)
> >> +static uint64_t ppc_pci_io_read(void *opaque, target_phys_addr_t addr,
> >> + unsigned int size)
> >> {
> >> PREPPCIState *s = opaque;
> >> - uint32_t val;
> >> - val = pci_data_read(s->bus, PPC_PCIIO_config(addr), 4);
> >> - return val;
> >> + switch (size) {
> >> + case 1:
> >> + case 2:
> >> + case 4:
> >> + return pci_data_read(s->bus, PPC_PCIIO_config(addr), size);
> >> + default:
> >> + abort();
> >> + }
> >> }
> >
> > Huh? just call pci_data_read() unconditionally.
>
> Just so that I understand, is that because PReP is 32-bit ppc? In the
> above mechanical conversion, size 8 would abort.
The memory core never issues size 8 transactions, since the code is
unprepared for it. When we will support it, you'll have to explicitly
declare it with .impl.max_access_size = 8 or something.
> BTW did we agree on an indentation style for switch?
What you wrote conforms to the de facto standard.
--
error compiling committee.c: too many arguments to function
- [Qemu-ppc] [PATCH v2 3/3] MAINTAINERS: Add PCI host bridge files to PReP machine, (continued)
- [Qemu-ppc] [PATCH v3 8/8] prep: Use i82378 PCI->ISA bridge for 'prep' machine, Andreas Färber, 2012/01/12
- Re: [Qemu-ppc] [PATCH v3 8/8] prep: Use i82378 PCI->ISA bridge for 'prep' machine, Jan Kiszka, 2012/01/13
- Re: [Qemu-ppc] [PATCH v3 8/8] prep: Use i82378 PCI->ISA bridge for 'prep' machine, Andreas Färber, 2012/01/13
- Re: [Qemu-ppc] [PATCH v3 8/8] prep: Use i82378 PCI->ISA bridge for 'prep' machine, Jan Kiszka, 2012/01/13
- Re: [Qemu-ppc] [PATCH v3 8/8] prep: Use i82378 PCI->ISA bridge for 'prep' machine, Alexander Graf, 2012/01/13
- Re: [Qemu-ppc] [PATCH v3 8/8] prep: Use i82378 PCI->ISA bridge for 'prep' machine, Jan Kiszka, 2012/01/13
[Qemu-ppc] [PATCH v3 4/8] prep: qdev'ify Raven host bridge (SysBus), Andreas Färber, 2012/01/12
[Qemu-ppc] [PATCH v3 1/8] prep: qdev'ify Raven host bridge (PCIDevice), Andreas Färber, 2012/01/12
[Qemu-ppc] [PATCH v3 2/8] prep_pci: Simplify I/O endianness, Andreas Färber, 2012/01/12
[Qemu-ppc] [PATCH v3 7/8] prep: Add i82378 PCI-to-ISA bridge emulation, Andreas Färber, 2012/01/12