From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mx.groups.io with SMTP id smtpd.web09.1518.1668225663457832422 for ; Fri, 11 Nov 2022 20:01:03 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=d/TIPFsm; spf=pass (domain: intel.com, ip: 134.134.136.31, mailfrom: ray.ni@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1668225663; x=1699761663; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=a4Y4ODr+/MCiSuWtFNsiMz0qYN+Uu8NoowaUaf4EVLU=; b=d/TIPFsmOg7s/DEWSLIv6y4QI6Au59jpkF/LboKkeMsacfsoG4go4nR2 6oujLprXNoMRXJwFjnMd11mVP3xzllBH32+blwsiykRbnHpiXLoQ2jiGU zF48z1DZWh1waWNlke/AzTZvmAFLcy/gZ22X9eP0XvdcCPTNeWqQMatGE gwvjEQAAvbI/kJbHzDjvckBo9VZH5dTa5dx0VPZF3J+VEwqjQafdDjioD gCBQf3AuUlmPJxJk5FfvMmP8nXfY+04X5B8PRX7ZF+O/cY8203o7R+8J/ OTZxTQDvXoQD7lMbC/eDY56KVXFmziKhlCEeO1pVzyvX6w47sEly1qE61 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10528"; a="373827652" X-IronPort-AV: E=Sophos;i="5.96,158,1665471600"; d="scan'208";a="373827652" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Nov 2022 20:01:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10528"; a="588725574" X-IronPort-AV: E=Sophos;i="5.96,158,1665471600"; d="scan'208";a="588725574" Received: from shwdeopenlab706.ccr.corp.intel.com ([10.239.56.10]) by orsmga003.jf.intel.com with ESMTP; 11 Nov 2022 20:00:48 -0800 From: "Ni, Ray" To: devel@edk2.groups.io Cc: Zhiguang Liu Subject: [PATCH 2/3] EmulatorPkg/WinHost: XIP for SEC and PEI_CORE Date: Sat, 12 Nov 2022 12:00:41 +0800 Message-Id: <20221112040042.741-3-ray.ni@intel.com> X-Mailer: git-send-email 2.37.2.windows.2 In-Reply-To: <20221112040042.741-1-ray.ni@intel.com> References: <20221112040042.741-1-ray.ni@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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 Cc: Zhiguang Liu Cc: Andrew Fish