summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
d2f438b)
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>
\r
if ((SectionHeader.Characteristics & EFI_IMAGE_SCN_MEM_EXECUTE) == 0) {\r
\r
\r
if ((SectionHeader.Characteristics & EFI_IMAGE_SCN_MEM_EXECUTE) == 0) {\r
\r
- if ((SectionHeader.Characteristics & EFI_IMAGE_SCN_MEM_WRITE) == 0 &&\r
- TmpContext.ImageType != EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER) {\r
+ if ((SectionHeader.Characteristics & EFI_IMAGE_SCN_MEM_WRITE) == 0) {\r
\r
DEBUG ((DEBUG_INFO,\r
"%a: Mapping section %d of image at 0x%lx with RO-XN permissions and size 0x%x\n",\r
\r
DEBUG ((DEBUG_INFO,\r
"%a: Mapping section %d of image at 0x%lx with RO-XN permissions and size 0x%x\n",\r
__FUNCTION__, Index, Base, SectionHeader.Misc.VirtualSize));\r
}\r
} else {\r
__FUNCTION__, Index, Base, SectionHeader.Misc.VirtualSize));\r
}\r
} else {\r
- DEBUG ((DEBUG_INFO,\r
- "%a: Mapping section %d of image at 0x%lx with RO-XN permissions and size 0x%x\n",\r
- __FUNCTION__, Index, Base, SectionHeader.Misc.VirtualSize));\r
- ReadOnlyUpdater (Base, SectionHeader.Misc.VirtualSize);\r
-\r
DEBUG ((DEBUG_INFO,\r
"%a: Mapping section %d of image at 0x%lx with RO-X permissions and size 0x%x\n",\r
__FUNCTION__, Index, Base, SectionHeader.Misc.VirtualSize));\r
DEBUG ((DEBUG_INFO,\r
"%a: Mapping section %d of image at 0x%lx with RO-X permissions and size 0x%x\n",\r
__FUNCTION__, Index, Base, SectionHeader.Misc.VirtualSize));\r
+ ReadOnlyUpdater (Base, SectionHeader.Misc.VirtualSize);\r
NoExecUpdater (Base, SectionHeader.Misc.VirtualSize);\r
}\r
\r
NoExecUpdater (Base, SectionHeader.Misc.VirtualSize);\r
}\r
\r