From mboxrd@z Thu Jan 1 00:00:00 1970 From: vijay.kilari@gmail.com Subject: [PATCH v2 1/3] xen/arm: Add ThunderX platform support Date: Wed, 18 Feb 2015 17:49:42 +0530 Message-ID: <1424261984-28324-2-git-send-email-vijay.kilari@gmail.com> References: <1424261984-28324-1-git-send-email-vijay.kilari@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1424261984-28324-1-git-send-email-vijay.kilari@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian.Campbell@citrix.com, julien.grall@linaro.org, stefano.stabellini@eu.citrix.com, stefano.stabellini@citrix.com, tim@xen.org, xen-devel@lists.xen.org Cc: Prasun.Kapoor@caviumnetworks.com, Vijaya Kumar K , manish.jaggi@caviumnetworks.com, vijay.kilari@gmail.com List-Id: xen-devel@lists.xenproject.org From: Vijaya Kumar K Add basic support for Cavium ThunderX platform Signed-off-by: Vijaya Kumar K --- xen/arch/arm/platforms/Makefile | 1 + xen/arch/arm/platforms/thunderx.c | 66 +++++++++++++++++++++++++++++++++++++ xen/arch/arm/setup.c | 1 + 3 files changed, 68 insertions(+) diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/Makefile index e173fec..d9f98f9 100644 --- a/xen/arch/arm/platforms/Makefile +++ b/xen/arch/arm/platforms/Makefile @@ -7,3 +7,4 @@ obj-$(CONFIG_ARM_32) += sunxi.o obj-$(CONFIG_ARM_32) += rcar2.o obj-$(CONFIG_ARM_64) += seattle.o obj-$(CONFIG_ARM_64) += xgene-storm.o +obj-$(CONFIG_ARM_64) += thunderx.o diff --git a/xen/arch/arm/platforms/thunderx.c b/xen/arch/arm/platforms/thunderx.c new file mode 100644 index 0000000..96560e1 --- /dev/null +++ b/xen/arch/arm/platforms/thunderx.c @@ -0,0 +1,66 @@ +/* + * xen/arch/arm/platforms/thunderx.c + * + * Cavium Thunder specific settings + * + * Vijaya Kumar K + * Copyright (c) 2015 Cavium Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#include + +static int thunderx_specific_mapping(struct domain *d) +{ + uint64_t addr, size; + int res; + + /* Mappings 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 to dom%d region" + " 0x%"PRIx64" - 0x%"PRIx64"\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", + NULL +}; + +PLATFORM_START(thunderx, "THUNDERX") + .compatible = thunderx_dt_compat, + .specific_mapping = thunderx_specific_mapping, + .dom0_gnttab_start = 0x40000000000, + .dom0_gnttab_size = 0x20000, +PLATFORM_END + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ diff --git a/xen/arch/arm/setup.c b/xen/arch/arm/setup.c index a916ca6..43b626b 100644 --- a/xen/arch/arm/setup.c +++ b/xen/arch/arm/setup.c @@ -66,6 +66,7 @@ static void __init init_idle_domain(void) static const char * __initdata processor_implementers[] = { ['A'] = "ARM Limited", ['B'] = "Broadcom Corporation", + ['C'] = "Cavium Inc.", ['D'] = "Digital Equipment Corp", ['M'] = "Motorola, Freescale Semiconductor Inc.", ['P'] = "Applied Micro", -- 1.7.9.5