audk/MdeModulePkg/Core/RuntimeDxe
Gerd Hoffmann f78b937c95 MdeModulePkg/RuntimeDxe: clear mVirtualMapMaxIndex
When setting mVirtualMap to NULL also set mVirtualMapMaxIndex to 0.
Without that RuntimeDriverConvertPointer() will go search the ZeroPage
for EFI_MEMORY_DESCRIPTOR entries.

In case mVirtualMapMaxIndex happens to be small small enough that'll go
unnoticed, the search will not find anything and EFI_NOT_FOUND will be
returned.

In case mVirtualMapMaxIndex is big enough the search will reach the end
of the ZeroPage and trigger a page fault.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
2022-02-07 05:31:17 +00:00
..
Crc32.c MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
Runtime.c MdeModulePkg/RuntimeDxe: clear mVirtualMapMaxIndex 2022-02-07 05:31:17 +00:00
Runtime.h MdeModulePkg: Apply uncrustify changes 2021-12-07 17:24:28 +00:00
RuntimeDxe.inf
RuntimeDxe.uni
RuntimeDxeExtra.uni