mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
OvmfPkg: Update LINUX_LOADER to allow unaligned user images
Required in some distros, e.g. SliTaz. In that example bootx64.efi is the kernel plus an extra loader which fetches its params from a text file. That image has section alignment 0x20, whereas the default (0x7) PcdImageProtectionPolicy enforces section alignment of EFI_PAGE_SIZE=0x1000 for all images. In OpenDuet and OpenCore native loader the Pcd is already set to 0x03, to not enforce this for user images (to allow legacy Apple images) - so this distro I believe would already load via Duet; but this change is required for it to load in AUDK OVMF.
This commit is contained in:
parent
11bfa6a102
commit
13f99fa7cb
@ -485,6 +485,7 @@
|
||||
# Allow execution of EfiReservedMemoryType, EfiConventionalMemory, EfiBootServicesData and EfiLoaderData memory regions.
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xFFFFFFFFFFFFFF40
|
||||
gEfiMdePkgTokenSpaceGuid.PcdImageLoaderAllowMisalignedOffset|TRUE
|
||||
gEfiMdePkgTokenSpaceGuid.PcdImageProtectionPolicy|0x00000003
|
||||
!else
|
||||
# Allow execution of EfiConventionalMemory and EfiBootServicesData memory regions.
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xFFFFFFFFFFFFFF45
|
||||
|
@ -592,6 +592,7 @@
|
||||
# Allow execution of EfiReservedMemoryType, EfiConventionalMemory, EfiBootServicesData and EfiLoaderData memory regions.
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xFFFFFFFFFFFFFF40
|
||||
gEfiMdePkgTokenSpaceGuid.PcdImageLoaderAllowMisalignedOffset|TRUE
|
||||
gEfiMdePkgTokenSpaceGuid.PcdImageProtectionPolicy|0x00000003
|
||||
!elseif $(WINDOWS_10_IA32) == TRUE
|
||||
# Allow execution of EfiReservedMemoryType, EfiConventionalMemory, EfiBootServicesData and EfiRuntimeServicesData memory regions.
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xFFFFFFFFFFFFFF04
|
||||
|
@ -607,6 +607,7 @@
|
||||
# Allow execution of EfiReservedMemoryType, EfiConventionalMemory, EfiBootServicesData and EfiLoaderData memory regions.
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xFFFFFFFFFFFFFF40
|
||||
gEfiMdePkgTokenSpaceGuid.PcdImageLoaderAllowMisalignedOffset|TRUE
|
||||
gEfiMdePkgTokenSpaceGuid.PcdImageProtectionPolicy|0x00000003
|
||||
!endif
|
||||
|
||||
################################################################################
|
||||
|
@ -623,6 +623,7 @@
|
||||
# Allow execution of EfiReservedMemoryType, EfiConventionalMemory, EfiBootServicesData and EfiLoaderData memory regions.
|
||||
gEfiMdeModulePkgTokenSpaceGuid.PcdDxeNxMemoryProtectionPolicy|0xFFFFFFFFFFFFFF40
|
||||
gEfiMdePkgTokenSpaceGuid.PcdImageLoaderAllowMisalignedOffset|TRUE
|
||||
gEfiMdePkgTokenSpaceGuid.PcdImageProtectionPolicy|0x00000003
|
||||
!endif
|
||||
|
||||
################################################################################
|
||||
|
Loading…
x
Reference in New Issue
Block a user