summaryrefslogtreecommitdiffstats
path: root/StandaloneMmPkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2019-01-16 21:22:33 +0100
committerArd Biesheuvel <ard.biesheuvel@linaro.org>2019-01-21 14:42:16 +0100
commit77746e70807d77db057595f718a5c7aabe611e03 (patch)
tree86664f6eb798cbefcaac56278ee1ce8108335a48 /StandaloneMmPkg
parentd2f438bf6a5148e44ca8258ee3c210b95c8b69dd (diff)
downloadedk2-77746e70807d77db057595f718a5c7aabe611e03.tar.gz
edk2-77746e70807d77db057595f718a5c7aabe611e03.tar.bz2
edk2-77746e70807d77db057595f718a5c7aabe611e03.zip
StandaloneMmPkg/StandaloneMmPeCoffExtraActionLib: ignore runtime attribute
The special handling of the EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER attribute is only necessary for images that are relocated twice, i.e., in the context of SetVirtualAddressMap (). This does not apply to standalone MM modules, so drop the check. Drop some redundant DEBUG output while at it. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Achin Gupta <achin.gupta@arm.com>
Diffstat (limited to 'StandaloneMmPkg')
-rw-r--r--StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/AArch64/StandaloneMmPeCoffExtraActionLib.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/AArch64/StandaloneMmPeCoffExtraActionLib.c b/StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/AArch64/StandaloneMmPeCoffExtraActionLib.c
index 1c9fec2019..f6bfcc8757 100644
--- a/StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/AArch64/StandaloneMmPeCoffExtraActionLib.c
+++ b/StandaloneMmPkg/Library/StandaloneMmPeCoffExtraActionLib/AArch64/StandaloneMmPeCoffExtraActionLib.c
@@ -145,8 +145,7 @@ UpdatePeCoffPermissions (
if ((SectionHeader.Characteristics & EFI_IMAGE_SCN_MEM_EXECUTE) == 0) {
- if ((SectionHeader.Characteristics & EFI_IMAGE_SCN_MEM_WRITE) == 0 &&
- TmpContext.ImageType != EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER) {
+ if ((SectionHeader.Characteristics & EFI_IMAGE_SCN_MEM_WRITE) == 0) {
DEBUG ((DEBUG_INFO,
"%a: Mapping section %d of image at 0x%lx with RO-XN permissions and size 0x%x\n",
@@ -159,13 +158,9 @@ UpdatePeCoffPermissions (
}
} else {
DEBUG ((DEBUG_INFO,
- "%a: Mapping section %d of image at 0x%lx with RO-XN permissions and size 0x%x\n",
- __FUNCTION__, Index, Base, SectionHeader.Misc.VirtualSize));
- ReadOnlyUpdater (Base, SectionHeader.Misc.VirtualSize);
-
- DEBUG ((DEBUG_INFO,
"%a: Mapping section %d of image at 0x%lx with RO-X permissions and size 0x%x\n",
__FUNCTION__, Index, Base, SectionHeader.Misc.VirtualSize));
+ ReadOnlyUpdater (Base, SectionHeader.Misc.VirtualSize);
NoExecUpdater (Base, SectionHeader.Misc.VirtualSize);
}