[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 2/4] xen/arm: Add GSER region to ThunderX platform mapping
On Wed, 2015-03-04 at 11:36 +0530, vijay.kilari@xxxxxxxxx wrote: > From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx> > > Add GSER region to thunderx platfrom specific mappings. > This region is not mentioned in DT. This is required by > PCI driver to detect and configure pci devices attached. > > In future we can remove this mapping, if pci driver > in Dom does not require this. How do we know what the PCI driver in dom0 needs? I don't think we can, so we can in effect never remove this specific mapping, which is a shame. Unless you have some scheme in mind which would allow us to do so? IMHO by far the best solution would be to add this device to the DTB so that it is correctly mapped. I'm not quite sure what that will look like since thne mainline DTB doesn't have the PCI node at all. > > Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx> > --- > xen/arch/arm/platforms/thunderx.c | 26 ++++++++++++++++++++++++++ > 1 file changed, 26 insertions(+) > > diff --git a/xen/arch/arm/platforms/thunderx.c > b/xen/arch/arm/platforms/thunderx.c > index be6f24f..563d01b 100644 > --- a/xen/arch/arm/platforms/thunderx.c > +++ b/xen/arch/arm/platforms/thunderx.c > @@ -19,6 +19,31 @@ > > #include <asm/platform.h> > > +static int thunderx_specific_mapping(struct domain *d) > +{ > + paddr_t addr; > + u64 size; > + int res; > + > + /* Mapping GSER region required for Dom0 */ > + addr = 0x87e090000000; > + size = 0xd000000; > + > + res = map_mmio_regions(d, > + paddr_to_pfn(addr & PAGE_MASK), > + DIV_ROUND_UP(size, PAGE_SIZE), > + paddr_to_pfn(addr & PAGE_MASK)); > + if ( res ) > + { > + printk(XENLOG_ERR "Unable to map GSER region to dom%d" > + " 0x%"PRIpaddr" - 0x%"PRIpaddr"\n", > + d->domain_id, > + addr & PAGE_MASK, PAGE_ALIGN(addr + size) - 1); > + } > + > + return 0; > +} > + > static const char * const thunderx_dt_compat[] __initconst = > { > "cavium,thunder-88xx", > @@ -27,6 +52,7 @@ static const char * const thunderx_dt_compat[] __initconst = > > PLATFORM_START(thunderx, "THUNDERX") > .compatible = thunderx_dt_compat, > + .specific_mapping = thunderx_specific_mapping, > .dom0_gnttab_start = 0x40000000000, > .dom0_gnttab_size = 0x20000, > PLATFORM_END _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |