support for cubieboard2 / sunxi processors
v4 cover 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.
PATCH v4 1/3 xen/arm: Basic support for sunxi/sun7i platform.
Specifically cubieboard2
---
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
xen/arch/arm/platforms/Makefile +1 -0
@@ -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
xen/arch/arm/platforms/sunxi.c new file +38 -0
@@ -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: +*/
Signature · 1 line
1.7.10.4
PATCH v4 2/3 xen/arm: Blacklist sun7i UARTs
In reply to Ian CampbellThese 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.
---
v4: Blacklist all UARTs for the time being.
--- xen/arch/arm/platforms/sunxi.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
xen/arch/arm/platforms/sunxi.c +11 -0
@@ -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 /*
Signature · 1 line
1.7.10.4
PATCH v4 3/3 xen: arm: consitfy platform compatibility lists and use __initconst
In reply to Ian Campbell--- 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(-)
xen/arch/arm/platforms/exynos5.c +1 -1
@@ -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
xen/arch/arm/platforms/midway.c +1 -1
@@ -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
xen/arch/arm/platforms/omap5.c +1 -1
@@ -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
xen/arch/arm/platforms/vexpress.c +1 -1
@@ -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
Signature · 1 line
1.7.10.4
Re: [PATCH v4 1/3] xen/arm: Basic support for sunxi/sun7i platform.
In reply to Ian CampbellQuoted 3 lines · Ian Campbell
Specifically cubieboard2
Signed-off-by Ian Campbell <[email protected]>
Quoted 65 lines
---
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.cxen/arch/arm/platforms/Makefile +1
-0@@ -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.oxen/arch/arm/platforms/sunxi.c new file +38
-1@@ -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
Signature · 1 line
Julien Grall
Re: [PATCH v4 2/3] xen/arm: Blacklist sun7i UARTs
In reply to Ian CampbellQuoted 10 lines · Ian Campbell
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 <[email protected]>
Quoted 33 lines
---
v4: Blacklist all UARTs for the time being.--- xen/arch/arm/platforms/sunxi.c | 11 +++++++++++ 1 file changed, 11 insertions(+)xen/arch/arm/platforms/sunxi.c +11
-1@@ -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
Signature · 1 line
Julien Grall
Re: [PATCH v4 3/3] xen: arm: consitfy platform compatibility lists and use __initconst
In reply to Ian CampbellQuoted 1 line · Ian Campbell
Signed-off-by Ian Campbell <[email protected]>
Quoted 62 lines
--- 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(-)xen/arch/arm/platforms/exynos5.c +1
-1@@ -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 xen/arch/arm/platforms/midway.c +1
-1@@ -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 xen/arch/arm/platforms/omap5.c +1
-1@@ -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 xen/arch/arm/platforms/vexpress.c +1
-2@@ -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
Signature · 1 line
Julien Grall
Quoted 3 lines · Ian Campbell
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.