Ian Campbell
2013-Nov-01 14:02 UTC
[PATCH v4 0/3] support for cubieboard2 / sunxi processors
The majority of this series went in a while back, what remains is just the basic platform support and the UART blacklisting. The series has also grown a constcorrectness fix for the other existing platforms too. Still no SATA support from upstream sadly. Bamvor has written some generic docs at http://wiki.xenproject.org/wiki/Xen_ARMv7_with_Virtualization_Extensions/Allwinner Thanks, Ian.
Ian Campbell
2013-Nov-01 14:03 UTC
[PATCH v4 1/3] xen/arm: Basic support for sunxi/sun7i platform.
Specifically cubieboard2 Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- v4: Reduce set of headers, use __initconst Only compile platform support on 32-bit --- xen/arch/arm/platforms/Makefile | 1 + xen/arch/arm/platforms/sunxi.c | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 xen/arch/arm/platforms/sunxi.c diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/Makefile index 7535801..f0dd72c 100644 --- a/xen/arch/arm/platforms/Makefile +++ b/xen/arch/arm/platforms/Makefile @@ -2,3 +2,4 @@ obj-y += vexpress.o obj-$(CONFIG_ARM_32) += exynos5.o obj-$(CONFIG_ARM_32) += midway.o obj-$(CONFIG_ARM_32) += omap5.o +obj-$(CONFIG_ARM_32) += sunxi.o diff --git a/xen/arch/arm/platforms/sunxi.c b/xen/arch/arm/platforms/sunxi.c new file mode 100644 index 0000000..ab3b4a6 --- /dev/null +++ b/xen/arch/arm/platforms/sunxi.c @@ -0,0 +1,38 @@ +/* + * xen/arch/arm/platforms/sunxi.c + * + * SUNXI (AllWinner A20/A31) specific settings + * + * Copyright (c) 2013 Citrix Systems. + * + * 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 <asm/platform.h> + +static const char * const sunxi_dt_compat[] __initconst +{ + "allwinner,sun7i-a20", + NULL +}; + +PLATFORM_START(sunxi, "Allwinner A20") + .compatible = sunxi_dt_compat, +PLATFORM_END + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ -- 1.7.10.4
These are in the same page as the UART which is used as the Xen console. We are not currently smart enough to avoid passing them through to the guest, accidentally giving the guest access to the Xen console UART. we blacklist them all, if necessary in the future we can split the list into two halves and make a per platform decision about which half should be blacklisted on a given platform depending on which UART is wired up as the console. Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- v4: Blacklist all UARTs for the time being. --- xen/arch/arm/platforms/sunxi.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/xen/arch/arm/platforms/sunxi.c b/xen/arch/arm/platforms/sunxi.c index ab3b4a6..b466518 100644 --- a/xen/arch/arm/platforms/sunxi.c +++ b/xen/arch/arm/platforms/sunxi.c @@ -24,8 +24,19 @@ static const char * const sunxi_dt_compat[] __initconst NULL }; +static const struct dt_device_match sunxi_blacklist_dev[] __initconst +{ + /* + * The UARTs share a page which runs the risk of mapping the Xen console + * UART to dom0, so don''t map any of them. + */ + DT_MATCH_COMPATIBLE("snps,dw-apb-uart"), + { /* sentinel */ }, +}; + PLATFORM_START(sunxi, "Allwinner A20") .compatible = sunxi_dt_compat, + .blacklist_dev = sunxi_blacklist_dev, PLATFORM_END /* -- 1.7.10.4
Ian Campbell
2013-Nov-01 14:03 UTC
[PATCH v4 3/3] xen: arm: consitfy platform compatibility lists and use __initconst
Signed-off-by: Ian Campbell <ian.campbell@citrix.com> --- xen/arch/arm/platforms/exynos5.c | 2 +- xen/arch/arm/platforms/midway.c | 2 +- xen/arch/arm/platforms/omap5.c | 2 +- xen/arch/arm/platforms/vexpress.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/platforms/exynos5.c b/xen/arch/arm/platforms/exynos5.c index a2bf916..0e76cac 100644 --- a/xen/arch/arm/platforms/exynos5.c +++ b/xen/arch/arm/platforms/exynos5.c @@ -116,7 +116,7 @@ static uint32_t exynos5_quirks(void) return PLATFORM_QUIRK_DOM0_MAPPING_11; } -static const char * const exynos5_dt_compat[] __initdata +static const char * const exynos5_dt_compat[] __initconst { "samsung,exynos5250", NULL diff --git a/xen/arch/arm/platforms/midway.c b/xen/arch/arm/platforms/midway.c index a48fc84..b221279 100644 --- a/xen/arch/arm/platforms/midway.c +++ b/xen/arch/arm/platforms/midway.c @@ -42,7 +42,7 @@ static void midway_reset(void) iounmap(pmu); } -static const char * const midway_dt_compat[] __initdata +static const char * const midway_dt_compat[] __initconst { "calxeda,ecx-2000", NULL diff --git a/xen/arch/arm/platforms/omap5.c b/xen/arch/arm/platforms/omap5.c index bd9db74..54fa5ff 100644 --- a/xen/arch/arm/platforms/omap5.c +++ b/xen/arch/arm/platforms/omap5.c @@ -158,7 +158,7 @@ static uint32_t omap5_quirks(void) return PLATFORM_QUIRK_DOM0_MAPPING_11; } -static const char const *omap5_dt_compat[] __initdata +static const char const *omap5_dt_compat[] __initconst { "ti,omap5", NULL diff --git a/xen/arch/arm/platforms/vexpress.c b/xen/arch/arm/platforms/vexpress.c index b9d85af..9056366 100644 --- a/xen/arch/arm/platforms/vexpress.c +++ b/xen/arch/arm/platforms/vexpress.c @@ -154,7 +154,7 @@ static int __init vexpress_cpu_up(int cpu) } #endif -static const char * const vexpress_dt_compat[] __initdata +static const char * const vexpress_dt_compat[] __initconst { "arm,vexpress", NULL -- 1.7.10.4
Julien Grall
2013-Nov-01 16:36 UTC
Re: [PATCH v4 1/3] xen/arm: Basic support for sunxi/sun7i platform.
On 1 November 2013 07:03, Ian Campbell <ian.campbell@citrix.com> wrote:> Specifically cubieboard2 > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>Acked-by: Julien Grall <julien.grall@linaro.org>> --- > v4: Reduce set of headers, use __initconst > Only compile platform support on 32-bit > --- > xen/arch/arm/platforms/Makefile | 1 + > xen/arch/arm/platforms/sunxi.c | 38 ++++++++++++++++++++++++++++++++++++++ > 2 files changed, 39 insertions(+) > create mode 100644 xen/arch/arm/platforms/sunxi.c > > diff --git a/xen/arch/arm/platforms/Makefile b/xen/arch/arm/platforms/Makefile > index 7535801..f0dd72c 100644 > --- a/xen/arch/arm/platforms/Makefile > +++ b/xen/arch/arm/platforms/Makefile > @@ -2,3 +2,4 @@ obj-y += vexpress.o > obj-$(CONFIG_ARM_32) += exynos5.o > obj-$(CONFIG_ARM_32) += midway.o > obj-$(CONFIG_ARM_32) += omap5.o > +obj-$(CONFIG_ARM_32) += sunxi.o > diff --git a/xen/arch/arm/platforms/sunxi.c b/xen/arch/arm/platforms/sunxi.c > new file mode 100644 > index 0000000..ab3b4a6 > --- /dev/null > +++ b/xen/arch/arm/platforms/sunxi.c > @@ -0,0 +1,38 @@ > +/* > + * xen/arch/arm/platforms/sunxi.c > + * > + * SUNXI (AllWinner A20/A31) specific settings > + * > + * Copyright (c) 2013 Citrix Systems. > + * > + * 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 <asm/platform.h> > + > +static const char * const sunxi_dt_compat[] __initconst > +{ > + "allwinner,sun7i-a20", > + NULL > +}; > + > +PLATFORM_START(sunxi, "Allwinner A20") > + .compatible = sunxi_dt_compat, > +PLATFORM_END > + > +/* > + * Local variables: > + * mode: C > + * c-file-style: "BSD" > + * c-basic-offset: 4 > + * indent-tabs-mode: nil > + * End: > + */ > -- > 1.7.10.4 >-- Julien Grall
On 1 November 2013 07:03, Ian Campbell <ian.campbell@citrix.com> wrote:> These are in the same page as the UART which is used as the Xen console. We are > not currently smart enough to avoid passing them through to the guest, > accidentally giving the guest access to the Xen console UART. > > we blacklist them all, if necessary in the future we can split the list into > two halves and make a per platform decision about which half should be > blacklisted on a given platform depending on which UART is wired up as the > console. > > Signed-off-by: Ian Campbell <ian.campbell@citrix.com>Acked-by: Julien Grall <julien.grall@linaro.org>> --- > v4: Blacklist all UARTs for the time being. > --- > xen/arch/arm/platforms/sunxi.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/xen/arch/arm/platforms/sunxi.c b/xen/arch/arm/platforms/sunxi.c > index ab3b4a6..b466518 100644 > --- a/xen/arch/arm/platforms/sunxi.c > +++ b/xen/arch/arm/platforms/sunxi.c > @@ -24,8 +24,19 @@ static const char * const sunxi_dt_compat[] __initconst > NULL > }; > > +static const struct dt_device_match sunxi_blacklist_dev[] __initconst > +{ > + /* > + * The UARTs share a page which runs the risk of mapping the Xen console > + * UART to dom0, so don''t map any of them. > + */ > + DT_MATCH_COMPATIBLE("snps,dw-apb-uart"), > + { /* sentinel */ }, > +}; > + > PLATFORM_START(sunxi, "Allwinner A20") > .compatible = sunxi_dt_compat, > + .blacklist_dev = sunxi_blacklist_dev, > PLATFORM_END > > /* > -- > 1.7.10.4 >-- Julien Grall
Julien Grall
2013-Nov-01 16:38 UTC
Re: [PATCH v4 3/3] xen: arm: consitfy platform compatibility lists and use __initconst
On 1 November 2013 07:03, Ian Campbell <ian.campbell@citrix.com> wrote:> Signed-off-by: Ian Campbell <ian.campbell@citrix.com>Acked-by: Julien Grall <julien.grall@linaro.org>> --- > xen/arch/arm/platforms/exynos5.c | 2 +- > xen/arch/arm/platforms/midway.c | 2 +- > xen/arch/arm/platforms/omap5.c | 2 +- > xen/arch/arm/platforms/vexpress.c | 2 +- > 4 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/xen/arch/arm/platforms/exynos5.c b/xen/arch/arm/platforms/exynos5.c > index a2bf916..0e76cac 100644 > --- a/xen/arch/arm/platforms/exynos5.c > +++ b/xen/arch/arm/platforms/exynos5.c > @@ -116,7 +116,7 @@ static uint32_t exynos5_quirks(void) > return PLATFORM_QUIRK_DOM0_MAPPING_11; > } > > -static const char * const exynos5_dt_compat[] __initdata > +static const char * const exynos5_dt_compat[] __initconst > { > "samsung,exynos5250", > NULL > diff --git a/xen/arch/arm/platforms/midway.c b/xen/arch/arm/platforms/midway.c > index a48fc84..b221279 100644 > --- a/xen/arch/arm/platforms/midway.c > +++ b/xen/arch/arm/platforms/midway.c > @@ -42,7 +42,7 @@ static void midway_reset(void) > iounmap(pmu); > } > > -static const char * const midway_dt_compat[] __initdata > +static const char * const midway_dt_compat[] __initconst > { > "calxeda,ecx-2000", > NULL > diff --git a/xen/arch/arm/platforms/omap5.c b/xen/arch/arm/platforms/omap5.c > index bd9db74..54fa5ff 100644 > --- a/xen/arch/arm/platforms/omap5.c > +++ b/xen/arch/arm/platforms/omap5.c > @@ -158,7 +158,7 @@ static uint32_t omap5_quirks(void) > return PLATFORM_QUIRK_DOM0_MAPPING_11; > } > > -static const char const *omap5_dt_compat[] __initdata > +static const char const *omap5_dt_compat[] __initconst > { > "ti,omap5", > NULL > diff --git a/xen/arch/arm/platforms/vexpress.c b/xen/arch/arm/platforms/vexpress.c > index b9d85af..9056366 100644 > --- a/xen/arch/arm/platforms/vexpress.c > +++ b/xen/arch/arm/platforms/vexpress.c > @@ -154,7 +154,7 @@ static int __init vexpress_cpu_up(int cpu) > } > #endif > > -static const char * const vexpress_dt_compat[] __initdata > +static const char * const vexpress_dt_compat[] __initconst > { > "arm,vexpress", > NULL > -- > 1.7.10.4 >-- Julien Grall
Ian Campbell
2013-Nov-05 13:56 UTC
Re: [PATCH v4 0/3] support for cubieboard2 / sunxi processors
On Fri, 2013-11-01 at 14:02 +0000, Ian Campbell wrote:> The majority of this series went in a while back, what remains is just > the basic platform support and the UART blacklisting. The series has > also grown a constcorrectness fix for the other existing platforms too.Julien acked the lot (thanks) and I have applied. Ian.
Possibly Parallel Threads
- [PATCH v3 0/7] support for cubieboard2 / sunxi processors
- [PATCH RFC 0/8] xen/arm: initial cubieboard2 support.
- [PATCH v8 8/5] Add UART support and arch timer initialization for OMAP5
- [PATCH+RFC+HACK 00/16] xen: arm initial support for xgene arm64 platform
- [PATCH 0/4] xen/arm: assemble support for Allwinner A31