We want to provide precise info in MemAttribTable
to both OS and SMM, and SMM only gets the info at EndOfDxe.
So we do not update RtCode entry in EndOfDxe.
The impact is that if 3rd part OPROM is runtime, it cannot be executed
at UEFI runtime phase.
Currently, we do not see compatibility issue, because the only runtime
OPROM we found before in UNDI, and UEFI OS will not use UNDI interface
in OS.
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
\r
BOOLEAN mPropertiesTableEnable;\r
\r
\r
BOOLEAN mPropertiesTableEnable;\r
\r
+BOOLEAN mPropertiesTableEndOfDxe = FALSE;\r
+\r
//\r
// Below functions are for MemoryMap\r
//\r
//\r
// Below functions are for MemoryMap\r
//\r
DEBUG ((EFI_D_VERBOSE, "InsertImageRecord - 0x%x\n", RuntimeImage));\r
DEBUG ((EFI_D_VERBOSE, "InsertImageRecord - 0x%016lx - 0x%016lx\n", (EFI_PHYSICAL_ADDRESS)(UINTN)RuntimeImage->ImageBase, RuntimeImage->ImageSize));\r
\r
DEBUG ((EFI_D_VERBOSE, "InsertImageRecord - 0x%x\n", RuntimeImage));\r
DEBUG ((EFI_D_VERBOSE, "InsertImageRecord - 0x%016lx - 0x%016lx\n", (EFI_PHYSICAL_ADDRESS)(UINTN)RuntimeImage->ImageBase, RuntimeImage->ImageSize));\r
\r
+ if (mPropertiesTableEndOfDxe) {\r
+ DEBUG ((DEBUG_INFO, "Do not insert runtime image record after EndOfDxe\n"));\r
+ return ;\r
+ }\r
+\r
ImageRecord = AllocatePool (sizeof(*ImageRecord));\r
if (ImageRecord == NULL) {\r
return ;\r
ImageRecord = AllocatePool (sizeof(*ImageRecord));\r
if (ImageRecord == NULL) {\r
return ;\r
DEBUG ((EFI_D_VERBOSE, "RemoveImageRecord - 0x%x\n", RuntimeImage));\r
DEBUG ((EFI_D_VERBOSE, "RemoveImageRecord - 0x%016lx - 0x%016lx\n", (EFI_PHYSICAL_ADDRESS)(UINTN)RuntimeImage->ImageBase, RuntimeImage->ImageSize));\r
\r
DEBUG ((EFI_D_VERBOSE, "RemoveImageRecord - 0x%x\n", RuntimeImage));\r
DEBUG ((EFI_D_VERBOSE, "RemoveImageRecord - 0x%016lx - 0x%016lx\n", (EFI_PHYSICAL_ADDRESS)(UINTN)RuntimeImage->ImageBase, RuntimeImage->ImageSize));\r
\r
+ if (mPropertiesTableEndOfDxe) {\r
+ DEBUG ((DEBUG_INFO, "Do not remove runtime image record after EndOfDxe\n"));\r
+ return ;\r
+ }\r
+\r
ImageRecord = FindImageRecord ((EFI_PHYSICAL_ADDRESS)(UINTN)RuntimeImage->ImageBase, RuntimeImage->ImageSize);\r
if (ImageRecord == NULL) {\r
DEBUG ((EFI_D_ERROR, "!!!!!!!! ImageRecord not found !!!!!!!!\n"));\r
ImageRecord = FindImageRecord ((EFI_PHYSICAL_ADDRESS)(UINTN)RuntimeImage->ImageBase, RuntimeImage->ImageSize);\r
if (ImageRecord == NULL) {\r
DEBUG ((EFI_D_ERROR, "!!!!!!!! ImageRecord not found !!!!!!!!\n"));\r
+ mPropertiesTableEndOfDxe = TRUE;\r
if (PcdGetBool (PcdPropertiesTableEnable)) {\r
EFI_STATUS Status;\r
\r
if (PcdGetBool (PcdPropertiesTableEnable)) {\r
EFI_STATUS Status;\r
\r