qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 2/3] e500: Adding CCSR memory region


From: Bhushan Bharat-R65777
Subject: Re: [Qemu-devel] [PATCH 2/3] e500: Adding CCSR memory region
Date: Tue, 9 Oct 2012 16:57:49 +0000


> -----Original Message-----
> From: Avi Kivity [mailto:address@hidden
> Sent: Tuesday, October 09, 2012 10:24 PM
> To: Bhushan Bharat-R65777
> Cc: Andreas Färber; address@hidden; address@hidden; address@hidden
> Subject: Re: [PATCH 2/3] e500: Adding CCSR memory region
> 
> On 10/09/2012 06:45 PM, Bhushan Bharat-R65777 wrote:
> >
> > What about adding a API:
> > void sysbus_mmio_map_to_mr(SysBusDevice *dev, int n, target_phys_addr_t 
> > addr,
> >                            MemoryRegion *mr) {
> >     assert(n >= 0 && n < dev->num_mmio);
> >
> >     if (dev->mmio[n].addr == addr) {
> >         /* ??? region already mapped here.  */
> >         return;
> >     }
> >     if (dev->mmio[n].addr != (target_phys_addr_t)-1) {
> >         /* Unregister previous mapping.  */
> >         memory_region_del_subregion(mr, dev->mmio[n].memory);
> >     }
> >     dev->mmio[n].addr = addr;
> >     memory_region_add_subregion(mr, addr, dev->mmio[n].memory); }
> >
> 
> I think you can just use sysbus_mmio_get_region().  There are plenty of other
> users, so there's precedent.

You mean something like this : memory_region_add_subregion(mr, addr, 
sysbus_mmio_get_region(dev, 0);

Ok, but this will still not resolve the issue of not setting the 
"dev->mmio[n].addr", no ?

Thanks
-Bharat

> 
> 
> --
> error compiling committee.c: too many arguments to function





reply via email to

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