Re: [PATCH] arm64: dts: qcom: x1e: bus is 40-bits (fix 64GB models)
From: Jonathan Marek
Date: Fri Nov 28 2025 - 18:58:03 EST
FYI, for a less hacky solution you can use CONFIG_ARM64_VA_BITS_39, arm64 linux as-is refuses to use any memory it can't identity map (and the extra 32GB of memory is outside the 39-bit range).
On 11/28/25 5:10 PM, Christopher Obbard wrote:
Hi,
Sorry to hijack this thread, but I've been carrying this patch to
workaround the buggy firmware from Stephan for my Lenovo T14s with
64gb RAM which seems to make Linux boot & work just fine with
systemd-boot.
Of course, it's a hack and not ready for upstream.
On another topic, perhaps we need to add this to
https://gitlab.com/Linaro/arm64-laptops/linux , what do you think
Stephan ?
Chris
commit 16e21600c6a65ace0c75b5a722e27ced8e1bfc48
Author: Stephan Gerhold <stephan.gerhold@xxxxxxxxxx>
Date: Thu Mar 6 17:41:15 2025 +0000
HACK: efi-stub: Exclude 40-bit memory
diff --git a/drivers/firmware/efi/libstub/efi-stub.c
b/drivers/firmware/efi/libstub/efi-stub.c
index 874f63b4a383..355a9b2c0818 100644
--- a/drivers/firmware/efi/libstub/efi-stub.c
+++ b/drivers/firmware/efi/libstub/efi-stub.c
@@ -106,6 +106,17 @@ efi_status_t
efi_handle_cmdline(efi_loaded_image_t *image, char **cmdline_ptr)
{
char *cmdline __free(efi_pool) = NULL;
efi_status_t status;
+ efi_physical_addr_t addr;
+ unsigned long pages;
+
+ addr = 0x0000008800000000;
+ pages = 0x800000000 / EFI_PAGE_SIZE;
+ status = efi_bs_call(allocate_pages, EFI_ALLOCATE_ADDRESS,
+ EFI_RESERVED_TYPE,
pages, &addr);
+ if (status != EFI_SUCCESS) {
+ efi_err("failed to reserve upper 32 GiB (40-bit memory)\n");
+ return EFI_OUT_OF_RESOURCES;
+ }
/*
* Get the command line from EFI, using the LOADED_IMAGE
Cheers!
Chris