From nobody Mon Feb 9 00:01:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+96319+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+96319+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1668225664; cv=none; d=zohomail.com; s=zohoarc; b=dx/WFC9yxenTkKuGoTJqjAkDAZVYsu+3B2/xWfGvDH/IrSvMyDKb8+VffTT7GVLitQp6Q0Z5A1zF7aFbsKul+1WgqnyS3nMam/BDYqmqvzpejL/+cGfbzDoSQYZ/eoZdbJpcsdUklqOYDAWZEwqp4XPQaaUePSgIyjiJ94tuPrA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1668225664; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=/+uBlhlYcWRKF4LIP5cdltNVv08prerSNxf6k8BI3Gg=; b=oJVajV+tPF1znJn4kf3MmNANc33rItqlngH4zVH7co0GgmLoA3VfCG3hZtNiD0+b1jr/5iYRT9DGq6VJjJ+ETCNvAF4uguEJCRKMYXMx/VIXmTnkVXzF/ab+iRtqQjB4qLL4XZ4d3f+MJxJsWIBlepvtN40rtlToC6Rz0T1McdM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+96319+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1668225664819555.7823668305765; Fri, 11 Nov 2022 20:01:04 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id uWxvYY1788612xBrVmYO88Co; Fri, 11 Nov 2022 20:01:04 -0800 X-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 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" X-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" X-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: [edk2-devel] [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> In-Reply-To: <20221112040042.741-1-ray.ni@intel.com> References: <20221112040042.741-1-ray.ni@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,ray.ni@intel.com X-Gm-Message-State: UMd2gD3QMIZRQxYAnhEL7WILx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1668225664; bh=/GLJUkPiUP2JklOrPoV31GAoV4E9R5ssrfL+9l3Hc+k=; h=Cc:Date:From:Reply-To:Subject:To; b=oktqXdmokFhpE202lXfY4IqmywECNwhcZUsCMV+1/E7wKS3rSXoC/oT/RfQZEJZEZCM Krv4F0ZcyHDbjLyLf/y1/HDXxPKkwlN0EY7ShF/rQs5F57se+x1HW4NKqa0zqtMzJd33f W3vvB64QiEXCcycHF+3LILWT09Uxs2plhcc= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1668225666566100004 Content-Type: text/plain; charset="utf-8" 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