[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryP
From: |
Avi Kivity |
Subject: |
Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation |
Date: |
Sun, 07 Oct 2012 12:13:53 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 |
On 10/05/2012 06:24 PM, Blue Swirl wrote:
>
> I'd suppose addressing devices in the bus could be implemented more
> efficiently with better use of memory API, now some of it is
> reimplemented. Maybe Avi can propose something?
Luckily the low-order bits are used for offsets, and the high-order bits
are used for selecting the sub-device.
So you could easily have
struct IPackDevice {
DeviceState qdev;
int32_t slot;
/* IRQ objects for the IndustryPack INT0# and INT1# */
qemu_irq *irq;
MemoryRegion io_space;
MemoryRegion id_space;
MemoryRegion int_space;
MemoryRegion mem8_space; /* for las3 */
MemoryRegion mem16_space; /* for las2 */
};
The PCI device would then just map each space (with
memory_region_add_subregion()) into las1/las2/las3 such that the high
bits select the device/space. The low bits would automatically become
the offset into the space.
--
error compiling committee.c: too many arguments to function
- Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation, Alberto Garcia, 2012/10/05
- Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation, Paolo Bonzini, 2012/10/05
- Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation, Anthony Liguori, 2012/10/05
- Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation, Blue Swirl, 2012/10/05
- Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation, Alberto Garcia, 2012/10/10
- Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation, Avi Kivity, 2012/10/10
- Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation, Alberto Garcia, 2012/10/10
Re: [Qemu-devel] Ping [PATCH 0/2] Add TPCI200 and IP-Octal 232 IndustryPack emulation, Andreas Färber, 2012/10/05