Skip to contentSkip to conversation

Fixup for booting Xen on Thunder-X using Grub

PATCH Superseded Julien Grall 1 participant 4 messages Feb 6, 2018 – Feb 7, 2018

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover Fixup for booting Xen on Thunder-X using Grub

Hi all,

This small series will help to boot Xen on Thunder-X using Grub. This part of my work to use Thunder-X in Osstest

Cheers,

Julien Grall (2):
xen/arm: Extend the number of memory banks supported xen/arm: Blacklist SMMU on Thunder-X

 xen/arch/arm/platforms/Makefile   |  1 +
 xen/arch/arm/platforms/thunderx.c | 39 +++++++++++++++++++++++++++++++++++++++
 xen/include/asm-arm/setup.h       |  2 +-
 3 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 xen/arch/arm/platforms/thunderx.c
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw

PATCH 1/2 xen/arm: Extend the number of memory banks supported

When booting using Grub on Thunder-X, the number of memory available is greater than 64. Bump the number to 128, so we can take advantage of all the memory.

---

Note that I wasn't able to boot without this patch, because EFI stub is printing an error when the number of region exceed 64. This will result to fragment in bit more the memory (sounds like print allocate memory) and will fail to get the memory on retry.

---
 xen/include/asm-arm/setup.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/include/asm-arm/setup.h +1 -1
index 7ff2c34dab..0cc3330807 100644
@@ -6,7 +6,7 @@
 #define MIN_FDT_ALIGN 8
 #define MAX_FDT_SIZE SZ_2M
 
-#define NR_MEM_BANKS 64
+#define NR_MEM_BANKS 128
 
 #define MAX_MODULES 5 /* Current maximum useful modules */
 
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#2 lore raw

PATCH 2/2 xen/arm: Blacklist SMMU on Thunder-X

In reply to Julien Grall

Xen does not yet support Cavium SMMU because it requires some workaround. For the time being, blacklist them.

---
 xen/arch/arm/platforms/Makefile   |  1 +
 xen/arch/arm/platforms/thunderx.c | 39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 xen/arch/arm/platforms/thunderx.c
xen/arch/arm/platforms/Makefile +1 -0
index 53a47e48d2..80e555cc14 100644
@@ -6,5 +6,6 @@ obj-$(CONFIG_ARM_32) += omap5.o
 obj-$(CONFIG_ARM_32) += rcar2.o
 obj-$(CONFIG_ARM_64) += seattle.o
 obj-y += sunxi.o
+obj-$(CONFIG_ARM_64) += thunderx.o
 obj-$(CONFIG_ARM_64) += xgene-storm.o
 obj-$(CONFIG_ARM_64) += xilinx-zynqmp.o
xen/arch/arm/platforms/thunderx.c new file +39 -0
new file mode 100644
index 0000000000..f5d7044296
@@ -0,0 +1,39 @@
+/*
+ * xen/arch/arm/platforms/thunderx.c
+ *
+ * Cavium Thunder-X specific settings
+ *
+ * Copyright (c) 2018 ARM Ltd.
+ *
+ * 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; under version 2 of the License.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <asm/platform.h>
+
+static const char * const thunderx_dt_compat[] __initconst =
+{
+    "cavium,thunder-88x",
+    NULL
+};
+
+static const struct dt_device_match thunderx_blacklist_dev[] __initconst =
+{
+    /* Cavium has its own SMMU which is not yet supported. */
+    DT_MATCH_COMPATIBLE("cavium,smmu-v2"),
+    { /* sentinel */ },
+};
+
+PLATFORM_START(thunderx, "THUNDERX")
+    .compatible = thunderx_dt_compat,
+    .blacklist_dev = thunderx_blacklist_dev,
+PLATFORM_END
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#3 lore raw

Re: [PATCH 2/2] xen/arm: Blacklist SMMU on Thunder-X

Hi,

Quoted 42 lines · Julien Grall

Xen does not yet support Cavium SMMU because it requires some workaround. For the time being, blacklist them.

---
  xen/arch/arm/platforms/Makefile   |  1 +
  xen/arch/arm/platforms/thunderx.c | 39 +++++++++++++++++++++++++++++++++++++++
  2 files changed, 40 insertions(+)

create mode 100644 xen/arch/arm/platforms/thunderx.c

xen/arch/arm/platforms/Makefile +1 -0
index 53a47e48d2..80e555cc14 100644
@@ -6,5 +6,6 @@ obj-$(CONFIG_ARM_32) += omap5.o
  obj-$(CONFIG_ARM_32) += rcar2.o
  obj-$(CONFIG_ARM_64) += seattle.o
  obj-y += sunxi.o
+obj-$(CONFIG_ARM_64) += thunderx.o
  obj-$(CONFIG_ARM_64) += xgene-storm.o
  obj-$(CONFIG_ARM_64) += xilinx-zynqmp.o
xen/arch/arm/platforms/thunderx.c new file +15 -0
new file mode 100644
index 0000000000..f5d7044296
@@ -0,0 +1,39 @@
+/*
+ * xen/arch/arm/platforms/thunderx.c
+ *
+ * Cavium Thunder-X specific settings
+ *
+ * Copyright (c) 2018 ARM Ltd.
+ *
+ * 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; under version 2 of the License.
+ *
+ * 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.

xen/arch/arm/platforms/thunderx.c line 25

Quoted 10 lines
xen/arch/arm/platforms/thunderx.c new file +10 -0
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <asm/platform.h>
+
+static const char * const thunderx_dt_compat[] __initconst =
+{
+    "cavium,thunder-88x",

The compatible is wrong here, it should be cavium,thunder-88xx. I will resend the series.

Cheers,

Quoted 15 lines
xen/arch/arm/platforms/thunderx.c new file +14 -0
+    NULL
+};
+
+static const struct dt_device_match thunderx_blacklist_dev[] __initconst =
+{
+    /* Cavium has its own SMMU which is not yet supported. */
+    DT_MATCH_COMPATIBLE("cavium,smmu-v2"),
+    { /* sentinel */ },
+};
+
+PLATFORM_START(thunderx, "THUNDERX")
+    .compatible = thunderx_dt_compat,
+    .blacklist_dev = thunderx_blacklist_dev,
+PLATFORM_END
Signature · 6 lines
Julien Grall

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel