WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] Re: [Qemu-devel] [PATCH RFC V3 04/12] xen: Add the Xen platf

To: anthony.perard@xxxxxxxxxx
Subject: [Xen-devel] Re: [Qemu-devel] [PATCH RFC V3 04/12] xen: Add the Xen platform pci device
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Fri, 24 Sep 2010 14:52:13 +0900
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, qemu-devel@xxxxxxxxxx, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Thu, 23 Sep 2010 22:52:51 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1284722107-28550-5-git-send-email-anthony.perard@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <1284722107-28550-1-git-send-email-anthony.perard@xxxxxxxxxx> <1284722107-28550-5-git-send-email-anthony.perard@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.19 (2009-01-05)
On Fri, Sep 17, 2010 at 12:14:59PM +0100, anthony.perard@xxxxxxxxxx wrote:

> +static uint32_t platform_mmio_read(void *opaque, target_phys_addr_t addr)
> +{
> +    static int warnings = 0;
> +
> +    if (warnings < 5) {
> +        DPRINTF("Warning: attempted read from physical address "
> +                "0x" TARGET_FMT_plx " in xen platform mmio space\n", addr);
> +        warnings++;
> +    }
> +    return 0;
> +}
> +
> +static void platform_mmio_write(void *opaque, target_phys_addr_t addr,
> +                                uint32_t val)
> +{
> +    static int warnings = 0;
> +
> +    if (warnings < 5) {
> +        DPRINTF("Warning: attempted write of 0x%x to physical "
> +                "address 0x" TARGET_FMT_plx " in xen platform mmio space\n",
> +                val, addr);
> +        warnings++;
> +    }
> +}
> +
> +static CPUReadMemoryFunc * const platform_mmio_read_funcs[3] = {
> +    platform_mmio_read,
> +    platform_mmio_read,
> +    platform_mmio_read,
> +};
> +
> +static CPUWriteMemoryFunc * const platform_mmio_write_funcs[3] = {
> +    platform_mmio_write,
> +    platform_mmio_write,
> +    platform_mmio_write,
> +};
> +
> +static void platform_mmio_map(PCIDevice *d, int region_num,
> +                              pcibus_t addr, pcibus_t size, int type)
> +{
> +    int mmio_io_addr;
> +
> +    mmio_io_addr = cpu_register_io_memory(platform_mmio_read_funcs,
> +                                          platform_mmio_write_funcs, NULL);
> +
> +    cpu_register_physical_memory(addr, size, mmio_io_addr);
> +}

Please use cpu_register_io_memory_simple().

-- 
yamahata

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>