* [PATCH v4 0/3] support for cubieboard2 / sunxi processors
@ 2013-11-01 14:02 Ian Campbell
2013-11-01 14:03 ` [PATCH v4 1/3] xen/arm: Basic support for sunxi/sun7i platform Ian Campbell
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Ian Campbell @ 2013-11-01 14:02 UTC (permalink / raw)
To: xen-devel; +Cc: BamvorZhang, julien.grall, tim, stefano.stabellini
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v4 1/3] xen/arm: Basic support for sunxi/sun7i platform.
2013-11-01 14:02 [PATCH v4 0/3] support for cubieboard2 / sunxi processors Ian Campbell
@ 2013-11-01 14:03 ` Ian Campbell
2013-11-01 16:36 ` Julien Grall
2013-11-01 14:03 ` [PATCH v4 2/3] xen/arm: Blacklist sun7i UARTs Ian Campbell
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Ian Campbell @ 2013-11-01 14:03 UTC (permalink / raw)
To: xen-devel; +Cc: bamv2005, julien.grall, tim, Ian Campbell, stefano.stabellini
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v4 2/3] xen/arm: Blacklist sun7i UARTs
2013-11-01 14:02 [PATCH v4 0/3] support for cubieboard2 / sunxi processors Ian Campbell
2013-11-01 14:03 ` [PATCH v4 1/3] xen/arm: Basic support for sunxi/sun7i platform Ian Campbell
@ 2013-11-01 14:03 ` Ian Campbell
2013-11-01 16:37 ` Julien Grall
2013-11-01 14:03 ` [PATCH v4 3/3] xen: arm: consitfy platform compatibility lists and use __initconst Ian Campbell
2013-11-05 13:56 ` [PATCH v4 0/3] support for cubieboard2 / sunxi processors Ian Campbell
3 siblings, 1 reply; 8+ messages in thread
From: Ian Campbell @ 2013-11-01 14:03 UTC (permalink / raw)
To: xen-devel; +Cc: bamv2005, julien.grall, tim, Ian Campbell, stefano.stabellini
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v4 3/3] xen: arm: consitfy platform compatibility lists and use __initconst
2013-11-01 14:02 [PATCH v4 0/3] support for cubieboard2 / sunxi processors Ian Campbell
2013-11-01 14:03 ` [PATCH v4 1/3] xen/arm: Basic support for sunxi/sun7i platform Ian Campbell
2013-11-01 14:03 ` [PATCH v4 2/3] xen/arm: Blacklist sun7i UARTs Ian Campbell
@ 2013-11-01 14:03 ` Ian Campbell
2013-11-01 16:38 ` Julien Grall
2013-11-05 13:56 ` [PATCH v4 0/3] support for cubieboard2 / sunxi processors Ian Campbell
3 siblings, 1 reply; 8+ messages in thread
From: Ian Campbell @ 2013-11-01 14:03 UTC (permalink / raw)
To: xen-devel; +Cc: bamv2005, julien.grall, tim, Ian Campbell, stefano.stabellini
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
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v4 1/3] xen/arm: Basic support for sunxi/sun7i platform.
2013-11-01 14:03 ` [PATCH v4 1/3] xen/arm: Basic support for sunxi/sun7i platform Ian Campbell
@ 2013-11-01 16:36 ` Julien Grall
0 siblings, 0 replies; 8+ messages in thread
From: Julien Grall @ 2013-11-01 16:36 UTC (permalink / raw)
To: Ian Campbell
Cc: bamv2005, Stefano Stabellini, Tim Deegan, xen-devel@lists.xen.org
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4 2/3] xen/arm: Blacklist sun7i UARTs
2013-11-01 14:03 ` [PATCH v4 2/3] xen/arm: Blacklist sun7i UARTs Ian Campbell
@ 2013-11-01 16:37 ` Julien Grall
0 siblings, 0 replies; 8+ messages in thread
From: Julien Grall @ 2013-11-01 16:37 UTC (permalink / raw)
To: Ian Campbell
Cc: bamv2005, Stefano Stabellini, Tim Deegan, xen-devel@lists.xen.org
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4 3/3] xen: arm: consitfy platform compatibility lists and use __initconst
2013-11-01 14:03 ` [PATCH v4 3/3] xen: arm: consitfy platform compatibility lists and use __initconst Ian Campbell
@ 2013-11-01 16:38 ` Julien Grall
0 siblings, 0 replies; 8+ messages in thread
From: Julien Grall @ 2013-11-01 16:38 UTC (permalink / raw)
To: Ian Campbell
Cc: bamv2005, Stefano Stabellini, Tim Deegan, xen-devel@lists.xen.org
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v4 0/3] support for cubieboard2 / sunxi processors
2013-11-01 14:02 [PATCH v4 0/3] support for cubieboard2 / sunxi processors Ian Campbell
` (2 preceding siblings ...)
2013-11-01 14:03 ` [PATCH v4 3/3] xen: arm: consitfy platform compatibility lists and use __initconst Ian Campbell
@ 2013-11-05 13:56 ` Ian Campbell
3 siblings, 0 replies; 8+ messages in thread
From: Ian Campbell @ 2013-11-05 13:56 UTC (permalink / raw)
To: xen-devel; +Cc: tim, julien.grall, BamvorZhang, stefano.stabellini
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.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-11-05 13:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-01 14:02 [PATCH v4 0/3] support for cubieboard2 / sunxi processors Ian Campbell
2013-11-01 14:03 ` [PATCH v4 1/3] xen/arm: Basic support for sunxi/sun7i platform Ian Campbell
2013-11-01 16:36 ` Julien Grall
2013-11-01 14:03 ` [PATCH v4 2/3] xen/arm: Blacklist sun7i UARTs Ian Campbell
2013-11-01 16:37 ` Julien Grall
2013-11-01 14:03 ` [PATCH v4 3/3] xen: arm: consitfy platform compatibility lists and use __initconst Ian Campbell
2013-11-01 16:38 ` Julien Grall
2013-11-05 13:56 ` [PATCH v4 0/3] support for cubieboard2 / sunxi processors Ian Campbell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).