grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH RFC 0/3] EFI memory attributes


From: Baskov Evgeniy
Subject: [PATCH RFC 0/3] EFI memory attributes
Date: Thu, 7 Apr 2022 06:32:25 +0300

UEFI specification does not guarantee that all memory would
be executable and there exist some UEFI implementations imposing 
stricter memory management policies and restricting execution
of memory where trampoline code generated by relocator is placed.
That causes page fault during boot.

Explicitly set memory attributes using DXE services for
memory region possibly occupied with trampoline code and data.

This patch works in the same way as the following patch
for the Linux kernel [1].

Later the use of DXE services can be replaced with
UEFI_MEMORY_ATTRIBUTE protocol, when it will become ready [2].

[1] https://lkml.org/lkml/2022/3/3/532
[2] https://bugzilla.tianocore.org/show_bug.cgi?id=3519

Baskov Evgeniy(3):
       efi: explicitly set memory attributes for memory
       relocator: allocate trampoline in lower 640k
       efi: provide definitions of DXE services table

 grub-core/kern/efi/efi.c             |   11 +
 grub-core/kern/efi/mm.c              |   67 ++++++++++++
 grub-core/lib/i386/relocator.c       |    5 
 grub-core/lib/relocator.c            |    1 
 grub-core/lib/x86_64/efi/relocator.c |    6 -
 grub-core/loader/i386/bsd.c          |    2 
 include/grub/efi/api.h               |  149 +++++++++++++++++++++++++++
 include/grub/efi/efi.h               |    3 
 include/grub/i386/relocator.h        |    3 
 9 files changed, 238 insertions(+), 9 deletions(-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]