Fixup for booting Xen on Thunder-X using Grub
v2 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
PATCH v2 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
@@ -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
Re: [PATCH v2 1/2] xen/arm: Extend the number of memory banks supported
Quoted 5 lines · Julien Grall
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.
Signed-off-by Julien Grall <[email protected]>
Quoted 26 lines
---
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@@ -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 · 1 line
2.11.0
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
PATCH v2 2/2 xen/arm: Blacklist SMMU on Thunder-X
In reply to Julien GrallXen does not yet support Cavium SMMU because it requires some workaround. For the time being, blacklist them.
---
Changes in v2:
- Fix compatible string
--- 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
@@ -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
@@ -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-88xx" , +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
Re: [PATCH v2 2/2] xen/arm: Blacklist SMMU on Thunder-X
Quoted 4 lines · Julien Grall
Xen does not yet support Cavium SMMU because it requires some workaround. For the time being, blacklist them.
Signed-off-by Julien Grall <[email protected]>
Quoted 68 lines
---
Changes in v2:
- Fix compatible string--- 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.cxen/arch/arm/platforms/Makefile +1
-0@@ -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.oxen/arch/arm/platforms/thunderx.c new file +39
-0@@ -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-88xx" , +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 · 1 line
2.11.0
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel