All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RFC 0/3] EFI memory attributes
@ 2022-04-07  3:32 Baskov Evgeniy
  2022-04-07  3:32 ` [PATCH RFC 1/3] efi: provide definitions of DXE services table Baskov Evgeniy
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Baskov Evgeniy @ 2022-04-07  3:32 UTC (permalink / raw)
  To: grub-devel; +Cc: Baskov Evgeniy

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(-)


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-14 15:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-07  3:32 [PATCH RFC 0/3] EFI memory attributes Baskov Evgeniy
2022-04-07  3:32 ` [PATCH RFC 1/3] efi: provide definitions of DXE services table Baskov Evgeniy
2022-04-11  7:12   ` Paul Menzel
2022-04-14 15:15     ` baskov
2022-04-07  3:32 ` [PATCH RFC 2/3] relocator: allocate trampoline in lower 640k Baskov Evgeniy
2022-04-07  3:32 ` [PATCH RFC 3/3] efi: explicitly set memory attributes for memory Baskov Evgeniy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.