diff options
Diffstat (limited to 'meta-amd-bsp/recipes-bsp')
6 files changed, 53 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-bsp/formfactor/formfactor/machconfig b/meta-amd-bsp/recipes-bsp/formfactor/formfactor/machconfig new file mode 100644 index 00000000..28ca080e --- /dev/null +++ b/meta-amd-bsp/recipes-bsp/formfactor/formfactor/machconfig @@ -0,0 +1,3 @@ +# Assume a USB mouse and keyboard are connected +HAVE_TOUCHSCREEN=n +HAVE_KEYBOARD=y diff --git a/meta-amd-bsp/recipes-bsp/formfactor/formfactor_0.0.bbappend b/meta-amd-bsp/recipes-bsp/formfactor/formfactor_0.0.bbappend new file mode 100644 index 00000000..1b6c9126 --- /dev/null +++ b/meta-amd-bsp/recipes-bsp/formfactor/formfactor_0.0.bbappend @@ -0,0 +1,2 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + diff --git a/meta-amd-bsp/recipes-bsp/grub/files/0001-x86_64-amd-avoid-SSE-register-return-with-SSE-disabl.patch b/meta-amd-bsp/recipes-bsp/grub/files/0001-x86_64-amd-avoid-SSE-register-return-with-SSE-disabl.patch new file mode 100644 index 00000000..69d62e64 --- /dev/null +++ b/meta-amd-bsp/recipes-bsp/grub/files/0001-x86_64-amd-avoid-SSE-register-return-with-SSE-disabl.patch @@ -0,0 +1,39 @@ +From d80b85dd61db9261b6cfd0d43a2f1c035627310b Mon Sep 17 00:00:00 2001 +From: "Arsalan H. Awan" <Arsalan_Awan@mentor.com> +Date: Tue, 6 Apr 2021 15:01:41 +0500 +Subject: [PATCH] x86_64/amd: avoid SSE register return with SSE disabled + +When GRUB is compiled with -march=znver1 or -march=znver2 using the GCC +v9.3 and above, the compilation fails with the following error: + +recipe-sysroot-native/usr/lib/x86_64-amd-linux/gcc/x86_64-amd-linux/ + 10.2.0/include/shaintrin.h:40:1: + error: SSE register return with SSE disabled + +What's interesting, is that -march=skylake also implies -mbmi which +defines __BMI__ but compilation succeeds. + +It is probably due to different BMI implementations on AMD and INTEL +processors and the way compiler uses related instructions. + +Signed-off-by: Arsalan H. Awan <Arsalan_Awan@mentor.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 0b1bc48..dbe7a71 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -833,7 +833,7 @@ fi + if ( test "x$target_cpu" = xi386 || test "x$target_cpu" = xx86_64 ) && test "x$platform" != xemu; then + # Some toolchains enable these features by default, but they need + # registers that aren't set up properly in GRUB. +- TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -mfpmath=387" ++ TARGET_CFLAGS="$TARGET_CFLAGS -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -mfpmath=387 -mno-bmi" + fi + + # GRUB doesn't use float or doubles at all. Yet some toolchains may decide +-- +2.25.1 + diff --git a/meta-amd-bsp/recipes-bsp/grub/grub-efi_%.bbappend b/meta-amd-bsp/recipes-bsp/grub/grub-efi_%.bbappend new file mode 100644 index 00000000..26775e60 --- /dev/null +++ b/meta-amd-bsp/recipes-bsp/grub/grub-efi_%.bbappend @@ -0,0 +1,3 @@ +require grub-fixes.inc + +RDEPENDS:${PN}:class-target:append = " efibootmgr" diff --git a/meta-amd-bsp/recipes-bsp/grub/grub-fixes.inc b/meta-amd-bsp/recipes-bsp/grub/grub-fixes.inc new file mode 100644 index 00000000..4cab62c0 --- /dev/null +++ b/meta-amd-bsp/recipes-bsp/grub/grub-fixes.inc @@ -0,0 +1,5 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/files:" + +export PYTHON + +SRC_URI += "file://0001-x86_64-amd-avoid-SSE-register-return-with-SSE-disabl.patch" diff --git a/meta-amd-bsp/recipes-bsp/grub/grub_%.bbappend b/meta-amd-bsp/recipes-bsp/grub/grub_%.bbappend new file mode 100644 index 00000000..501f81fc --- /dev/null +++ b/meta-amd-bsp/recipes-bsp/grub/grub_%.bbappend @@ -0,0 +1 @@ +require grub-fixes.inc |