> grub-core/efiemu/mm.c: > * efiemu_alloc_requests reqorder[] - add GRUB_EFI_PERSISTENT_MEMORY > (although we don't want to encourage ever allocating these > ranges, UNUSABLE_MEMORY is already there)
Reviewing that code, since this array has one entry per EFI memory type: static grub_size_t requested_memory[GRUB_EFI_MAX_MEMORY_TYPE]; but grub_efiemu_request_memalign() is the only function that sets the entries to non-zero values, and that function filters out GRUB_EFI_LOADER_CODE: if (type >= GRUB_EFI_MAX_MEMORY_TYPE || type <= GRUB_EFI_LOADER_CODE) return -2; then the efiemu_alloc_requests() reqorder[] array entry for GRUB_EFI_LOADER_CODE is not used. Should the <= really be <, or should that entry be removed from the reqorder[] array? Those lines were all created together in patch 5caf964d. Regardless, I think it's best to add GRUB_EFI_PERSISTENT_MEMORY to that filter and keep it out of the reqorder[] array, so it's handled like GRUB_EFI_RESERVED_MEMORY_TYPE (which is the only value < GRUB_EFI_LOADER_CODE): if (type <= GRUB_EFI_LOADER_CODE || type == GRUB_EFI_PERSISTENT_MEMORY || type >= GRUB_EFI_MAX_MEMORY_SIZE) --- Robert Elliott, HPE Persistent Memory _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel