diff --git a/0633-BE-M1000-secondary-CPUs-boot-fix.patch b/0633-BE-M1000-secondary-CPUs-boot-fix.patch new file mode 100644 index 0000000..10986be --- /dev/null +++ b/0633-BE-M1000-secondary-CPUs-boot-fix.patch @@ -0,0 +1,55 @@ +From 92b5312314e5eb9f4d153c4f54ad6876c3bafc86 Mon Sep 17 00:00:00 2001 +From: Alexey Sheplyakov +Date: Wed, 25 Aug 2021 20:48:10 +0400 +Subject: [PATCH] BE-M1000 secondary CPUs boot fix + +(adaptation for changes in newer minor release of kernel 5.10.x) +--- + drivers/firmware/efi/libstub/arm64-stub.c | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +diff --git a/drivers/firmware/efi/libstub/arm64-stub.c b/drivers/firmware/efi/libstub/arm64-stub.c +index 411f1546d171..d21f21b105d7 100644 +--- a/drivers/firmware/efi/libstub/arm64-stub.c ++++ b/drivers/firmware/efi/libstub/arm64-stub.c +@@ -127,13 +127,6 @@ efi_status_t handle_kernel_image(unsigned long *image_addr, + efi_status_t status; + unsigned long kernel_size, kernel_memsize = 0; + u32 phys_seed = 0; +- bool force_low_reloc = need_low_alloc(); +- if (force_low_reloc) { +- if (!efi_nokaslr) { +- efi_info("booting on a broken firmware, KASLR will be disabled\n"); +- efi_nokaslr = true; +- } +- } + + /* + * Although relocatable kernels can fix up the misalignment with +@@ -145,6 +138,14 @@ efi_status_t handle_kernel_image(unsigned long *image_addr, + */ + u64 min_kimg_align = efi_nokaslr ? MIN_KIMG_ALIGN : EFI_KIMG_ALIGN; + ++ bool force_low_reloc = need_low_alloc(); ++ if (force_low_reloc) { ++ if (!efi_nokaslr) { ++ efi_info("booting on a broken firmware, KASLR will be disabled\n"); ++ efi_nokaslr = true; ++ } ++ } ++ + if (IS_ENABLED(CONFIG_RANDOMIZE_BASE)) { + if (!efi_nokaslr) { + status = efi_get_random_bytes(sizeof(phys_seed), +@@ -187,7 +188,7 @@ efi_status_t handle_kernel_image(unsigned long *image_addr, + + if (force_low_reloc) { + status = efi_low_alloc(*reserve_size, +- min_kimg_align(), ++ min_kimg_align, + reserve_addr); + if (status != EFI_SUCCESS) { + efi_err("Failed to relocate kernel, expect secondary CPUs boot failure\n"); +-- +2.31.1 + diff --git a/kernel.spec b/kernel.spec index e633765..2eafaf3 100644 --- a/kernel.spec +++ b/kernel.spec @@ -377,7 +377,8 @@ Patch0628: 0628-drm-panfrost-Trim-affinity-for-Mali-T620.patch Patch0629: 0629-baikal_vdu_drm-_plane_atomic_check-actually-re-enabl.patch Patch0630: 0630-baikal_vdu-figure-out-LVDS-endpoint-count.patch Patch0631: 0631-panfrost-disable-devfreq-on-BE-M1000-SoC.patch -Patch0633: 0632-pm-disable-all-sleep-states-on-BE-M1000-based-boards.patch +Patch0632: 0632-pm-disable-all-sleep-states-on-BE-M1000-based-boards.patch +Patch0633: 0633-BE-M1000-secondary-CPUs-boot-fix.patch # Disable AutoReq AutoReq: 0