From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 6A26AAC1222 for ; Thu, 14 Dec 2023 13:53:26 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=McMsKZooT45VLUCXmbEksjMzWpIYZpM8SrVVqg2U8Q0=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding; s=20140610; t=1702562005; v=1; b=eC9HYFYWMqmkoVP9XJS2+uozfL+x0HmfWUAdXkry09qafyjJQNVFXtR44wTZihPriUYa3oR2 F4/oANU8dEruccV14begb7w4+JCkMpZ1gIRo7FyXkGBYktNzcrld5sVd3ZZdCJbkLckNl6cXyuQ LrRq+kgTsr/Vv1j9i1z8w4Eg= X-Received: by 127.0.0.2 with SMTP id x6QOYY7687511xPSXR17TpFu; Thu, 14 Dec 2023 05:53:25 -0800 X-Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mx.groups.io with SMTP id smtpd.web10.22605.1702562004503781636 for ; Thu, 14 Dec 2023 05:53:24 -0800 X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="1957340" X-IronPort-AV: E=Sophos;i="6.04,275,1695711600"; d="scan'208";a="1957340" X-Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Dec 2023 05:53:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10924"; a="947581756" X-IronPort-AV: E=Sophos;i="6.04,275,1695711600"; d="scan'208";a="947581756" X-Received: from sh1gapp1015.ccr.corp.intel.com ([10.239.189.85]) by orsmga005.jf.intel.com with ESMTP; 14 Dec 2023 05:53:22 -0800 From: "Wang Fan" To: devel@edk2.groups.io Cc: Fan Wang Subject: [edk2-devel] [PATCH v5 0/2] Support customized FV Migration Information Date: Thu, 14 Dec 2023 21:53:17 +0800 Message-Id: <20231214135319.3986-1-fan.wang@intel.com> MIME-Version: 1.0 Precedence: Bulk 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,fan.wang@intel.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: suaKM6lO0qAyrnCl3VuRwDNjx7686176AA= Content-Transfer-Encoding: 8bit X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=eC9HYFYW; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=intel.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io There are use cases which not all FVs need be migrated from TempRam to permanent memory before TempRam tears down. This new guid is introduced to avoid unnecessary FV migration to improve boot performance. Platform can publish MigrationInfo hob with this guid to customize FV migration info, and PeiCore will only migrate FVs indicated by this Hob info. This is a backwards compatible change, PeiCore will check MigrationInfo hob before migration. If MigrationInfo hobs exists, only migrate FVs recorded by hobs. If MigrationInfo hobs not exists, migrate all FVs to permanent memory. In Tcg driver, when MigratedFvInfo hob is detected, existing code logic is assuming FV raw data is already copied, and raw data base address is also recorded. Due to the new PeiCore change, the platform can publish hob to indicate raw data need be copied or not along with FV migration. Two cases need be considered to skip copy for boot performance: The first case is FV is not expected to be measured in post-mem phase, we should use MeasurementExcludedPpiGuid to skip measurement. The second case is FV raw data has no need to do rebase operation after migration, then measurement should calculate hash directly from FV base address. Fan Wang (2): MdeModulePkg: Support customized FV Migration Information SecurityPkg: Support customized FV Migration Information MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 84 ++++++++++++++----- MdeModulePkg/Core/Pei/Memory/MemoryServices.c | 40 --------- MdeModulePkg/Core/Pei/PeiMain.h | 11 --- MdeModulePkg/Core/Pei/PeiMain.inf | 1 + MdeModulePkg/Include/Guid/MigratedFvInfo.h | 42 +++++++++- MdeModulePkg/MdeModulePkg.dec | 3 +- SecurityPkg/Tcg/Tcg2Pei/Tcg2Pei.c | 7 +- SecurityPkg/Tcg/TcgPei/TcgPei.c | 7 +- 8 files changed, 116 insertions(+), 79 deletions(-) -- 2.29.2.windows.2 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#112530): https://edk2.groups.io/g/devel/message/112530 Mute This Topic: https://groups.io/mt/103169821/7686176 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io] -=-=-=-=-=-=-=-=-=-=-=-