Skip to content

Commit 64a1aca

Browse files
vit9696ardbiesheuvel
authored andcommitted
MdeModulePkg: Fix UEFI runtime driver loading after EndOfDxe
Memory Attributes Table needs to be updated to contain executable permissions for UEFI runtime drivers loaded after EndOfDxe. Fixes a regression introduced by bb248a9. Signed-off-by: Vitaly Cheptsov <[email protected]>
1 parent 7ce1988 commit 64a1aca

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ STATIC IMAGE_PROPERTIES_PRIVATE_DATA mImagePropertiesPrivateData = {
8787
STATIC EFI_LOCK mMemoryAttributesTableLock = EFI_INITIALIZE_LOCK_VARIABLE (TPL_NOTIFY);
8888

8989
BOOLEAN mMemoryAttributesTableEnable = TRUE;
90-
BOOLEAN mMemoryAttributesTableEndOfDxe = FALSE;
9190
EFI_MEMORY_ATTRIBUTES_TABLE *mMemoryAttributesTable = NULL;
9291
BOOLEAN mMemoryAttributesTableReadyToBoot = FALSE;
9392
BOOLEAN gMemoryAttributesTableForwardCfi = TRUE;
@@ -282,7 +281,6 @@ InstallMemoryAttributesTableOnEndOfDxe (
282281
IN VOID *Context
283282
)
284283
{
285-
mMemoryAttributesTableEndOfDxe = TRUE;
286284
InstallMemoryAttributesTable ();
287285

288286
DEBUG_CODE_BEGIN ();
@@ -591,11 +589,6 @@ InsertImageRecord (
591589

592590
DEBUG ((DEBUG_VERBOSE, "InsertImageRecord - 0x%x\n", RuntimeImage));
593591

594-
if (mMemoryAttributesTableEndOfDxe) {
595-
DEBUG ((DEBUG_INFO, "Do not insert runtime image record after EndOfDxe\n"));
596-
return;
597-
}
598-
599592
ImageRecord = AllocatePool (sizeof (*ImageRecord));
600593
if (ImageRecord == NULL) {
601594
return;
@@ -678,11 +671,6 @@ RemoveImageRecord (
678671
DEBUG ((DEBUG_VERBOSE, "RemoveImageRecord - 0x%x\n", RuntimeImage));
679672
DEBUG ((DEBUG_VERBOSE, "RemoveImageRecord - 0x%016lx - 0x%016lx\n", (EFI_PHYSICAL_ADDRESS)(UINTN)RuntimeImage->ImageBase, RuntimeImage->ImageSize));
680673

681-
if (mMemoryAttributesTableEndOfDxe) {
682-
DEBUG ((DEBUG_INFO, "Do not remove runtime image record after EndOfDxe\n"));
683-
return;
684-
}
685-
686674
ImageRecord = FindImageRecord ((EFI_PHYSICAL_ADDRESS)(UINTN)RuntimeImage->ImageBase, RuntimeImage->ImageSize, &mImagePropertiesPrivateData.ImageRecordList);
687675
if (ImageRecord == NULL) {
688676
DEBUG ((DEBUG_ERROR, "!!!!!!!! ImageRecord not found !!!!!!!!\n"));

0 commit comments

Comments
 (0)