From a121165e35b50a8bfc1253c9be156c1c123ff688 Mon Sep 17 00:00:00 2001 From: "Ni, Ray" Date: Sat, 12 Nov 2022 12:00:41 +0800 Subject: EmulatorPkg/WinHost: XIP for SEC and PEI_CORE In EmulatorPkg/Win, SEC and PEI_CORE are loaded to memory allocated through VirtualAlloc. Though the corresponding DLL files are loaded and the entry points in DLL files are executed. The loading to memory allocated through VirtualAlloc is for the case when the DLL files can not be loaded. Actually some PEIMs like PcdPeim which are loaded before "physical" RAM is discovered, they are executing in the original location (FV) like XIP module in real platform. The SEC and PEI_CORE can follow the same mechanism. So, the VirtualAlloc call is removed. This is to prepare the "reset" support to avoid additional OS memory consumption when reset happens. Signed-off-by: Ray Ni Reviewed-by: Zhiguang Liu Cc: Andrew Fish