Skip to content

Conversation

@lcp
Copy link
Collaborator

@lcp lcp commented Apr 8, 2021

Linux kernel is picky when reserving the memory for x86 and it only
expects BootServicesData:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/platform/efi/quirks.c?h=v5.11#n254

Otherwise, the following error would show during system boot:

Apr 07 12:31:56.743925 localhost kernel: efi: Failed to lookup EFI memory descriptor for 0x000000003dcf8000

Although BootServicesData would be reclaimed after ExitBootService(),
linux kernel reserves MOK config table when it detects the existence of
the table, so it's fine to allocate the table as BootServicesData.

Signed-off-by: Gary Lin glin@suse.com

Linux kernel is picky when reserving the memory for x86 and it only
expects BootServicesData:

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/x86/platform/efi/quirks.c?h=v5.11#n254

Otherwise, the following error would show during system boot:

Apr 07 12:31:56.743925 localhost kernel: efi: Failed to lookup EFI memory descriptor for 0x000000003dcf8000

Although BootServicesData would be reclaimed after ExitBootService(),
linux kernel reserves MOK config table when it detects the existence of
the table, so it's fine to allocate the table as BootServicesData.

Signed-off-by: Gary Lin <glin@suse.com>
@vathpela vathpela merged commit 4068fd4 into rhboot:main Apr 12, 2021
@cmurf
Copy link

cmurf commented Apr 12, 2021

Downstream bug report
https://bugzilla.redhat.com/show_bug.cgi?id=1948432

@lcp
Copy link
Collaborator Author

lcp commented Jul 1, 2021

The kernel warning seems to be a bug in the mokvar driver in Linux kernel:
https://lkml.org/lkml/2021/6/30/179

Per UEFI Spec, InstallConfigurationTable() expects the list allocated in EfiRuntimeServiceData. We can revert the allocation type back to EfiRuntimeServiceData once the patch lands Linux kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants