Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142299455
D46625.id149870.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D46625.id149870.diff
View Options
diff --git a/stand/efi/loader/copy.c b/stand/efi/loader/copy.c
--- a/stand/efi/loader/copy.c
+++ b/stand/efi/loader/copy.c
@@ -290,6 +290,17 @@
res = copy_staging == COPY_STAGING_ENABLE ? G(1) : G(4);
return (res);
}
+#define EFI_ALLOC_MAX_ADDR
+#elif defined(__aarch64__)
+/*
+ * Older kernels only support a 48-bit physical address space, and locore.S
+ * only supports a 50-bit space. Limit to 48 bits so older kernels can boot
+ * even if FEAT_LPA2 is supported by the hardware.
+ */
+#define get_staging_max() (1ul << 48)
+#define EFI_ALLOC_MAX_ADDR
+#endif
+#ifdef EFI_ALLOC_MAX_ADDR
#define EFI_ALLOC_METHOD AllocateMaxAddress
#else
#define EFI_ALLOC_METHOD AllocateAnyPages
@@ -316,7 +327,7 @@
if (running_on_hyperv())
efi_verify_staging_size(&nr_pages);
#endif
-#if defined(__amd64__) || defined(__i386__)
+#ifdef EFI_ALLOC_MAX_ADDR
staging = get_staging_max();
#endif
status = BS->AllocatePages(EFI_ALLOC_METHOD, EfiLoaderCode,
@@ -424,7 +435,7 @@
#if EFI_STAGING_2M_ALIGN
nr_pages += M(2) / EFI_PAGE_SIZE;
#endif
-#if defined(__amd64__) || defined(__i386__)
+#ifdef EFI_ALLOC_MAX_ADDR
new_base = get_staging_max();
#endif
status = BS->AllocatePages(EFI_ALLOC_METHOD, EfiLoaderCode,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 19, 8:07 AM (14 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27736795
Default Alt Text
D46625.id149870.diff (1 KB)
Attached To
Mode
D46625: stand/efi: Limit where we load the arm64 kernel
Attached
Detach File
Event Timeline
Log In to Comment