qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: PCI address question


From: Lennart Sorensen
Subject: Re: [Qemu-devel] Re: PCI address question
Date: Tue, 27 Oct 2009 11:16:40 -0400
User-agent: Mutt/1.5.18 (2008-05-17)

On Tue, Oct 27, 2009 at 04:05:25PM +0100, Màrius Montón wrote:
> Màrius Montón wrote:
> > Hello,
> >
> > For my PCI device to QEMU, I need the real address the PCI bus is using
> > to access my device. For a IO BAR (PCI_ADDRESS_SPACE_IO), I receive the
> > real address (like 0xc200 or similar), but when registering a
> > PCI_ADDRESS_SPACE_MEM I only receive the offset to the BAR.
> >
> > How I can receive or obtaint the real address on each access to my device?
> >
> > Cjeers,
> >
> > Màrius
> >   
> nobody can tell me anything? :(

Add the offset to the address in the bar?

After all the OS is allowed to change your BAR if it wants to.
So internally the only thing that makes sense to a PCI device is the
offset from it's base address.

You listen to addresses at your IO range, and at your memory BAR range.
What you do when you see a request for your range then depends on the
offset that address had from the current base.  This would also be true
for the IO.

-- 
Len Sorensen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]