mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
loader.efi: Use EfiLoaderData memory type for ram disks
For the images we read into the memory, use EfiLoaderData memory type
instead of EfiReservedMemoryType. The kernel handles the former properly
and won't reallocate it. While the latter isn't necessarily mapped,
which can cause ram disks to fault when loaded. memdisk_uefi.efi
used the latter type, but also registered the device as an ACPI
RAM disk, which we don't do.
Fixes: afee781523
Sponsored by: Netflix
This commit is contained in:
1 parent
e960cb4c03
commit
85fb40bad5
1 file changed
+8
-1
@@ -19,7 +19,14 @@
|
||||
|
||||
#define ULL(x) ((unsigned long long)(x))
|
||||
|
||||
static EFI_MEMORY_TYPE mem_type = EfiReservedMemoryType;
|
||||
/*
|
||||
* While memdisk_uefi.efi used EfiReservedMemoryType, we need to use
|
||||
* EfiLoaderData instead, the standard memory type the loader uses to pass
|
||||
* memory to the kernel. This is also safe if we're chain booting to another efi
|
||||
* progarm since the memory will be available to that program. The other type
|
||||
* isn't necessarily in the pmap, so the md driver fails.
|
||||
*/
|
||||
static EFI_MEMORY_TYPE mem_type = EfiLoaderData;
|
||||
|
||||
struct decomp_state
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user