From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mx.groups.io with SMTP id smtpd.web11.129091.1672018441335739938 for ; Sun, 25 Dec 2022 17:34:01 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=jwMoGk7w; spf=pass (domain: intel.com, ip: 192.55.52.88, mailfrom: min.m.xu@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672018441; x=1703554441; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=/xZO9ME3Zuj/t6H5Uk363MNLWhX8u2NSl+B3iJa5oao=; b=jwMoGk7wjI986NiLZnMmS3WkHvbqH/lhwVZ09ybvrsYCbqngquZd1Nc4 tm7MC/Q5rksKc6bXrIARjcBQ56+LeQEVWuiiyqm1WxMLzwFqKoHzGKHx9 itb7AUu75o9PR6a6qVuPh1t5FcxRuXEQjB9/y1t1rjgI8blz7SjMPSdPt 5/7YB04iDodYMbOvnZFu9iPE9sISq7YStD/IJtCiVzBKeN8bS+TSDSYWV B5tIWH2FsA6L8SDw0NMUkgboMoULT/88pqgeqhukZZIi8y0EA5MLw6/nA kvNUVZ8Uao/23FW5mgX4iROHVHkB4vAhzupmYSjmgu/Ih8eJbyrZKIUz+ g==; X-IronPort-AV: E=McAfee;i="6500,9779,10571"; a="347697077" X-IronPort-AV: E=Sophos;i="5.96,274,1665471600"; d="scan'208";a="347697077" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Dec 2022 17:34:00 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10571"; a="826755450" X-IronPort-AV: E=Sophos;i="5.96,274,1665471600"; d="scan'208";a="826755450" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.249.169.98]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Dec 2022 17:33:47 -0800 From: "Min Xu" To: devel@edk2.groups.io Cc: Min Xu , Erdem Aktas , Gerd Hoffmann , James Bottomley , Jiewen Yao , Tom Lendacky Subject: [PATCH V1 0/3] Customize lazy-accepted memory size for TDVF Date: Mon, 26 Dec 2022 09:33:35 +0800 Message-Id: <20221226013338.1924-1-min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=4181 Current lazy-accept accepts the memory under address of 4G. To improve boot performance further more, we introduce the feature of customizing the physical end address of lazy-accept in build time. The end address is indicated by PcdAcceptMemoryEndAddress. It means it accepts the memory under PcdAcceptMemoryEndAddress. The default value and the max value is 4G. This is to be consistent with the current rule (accept memory under 4G). In IntelTdxX64 PcdAcceptMemoryEndAddress can be customized on-demand in build-time by adding -D ACCEPT_MEMORY_END_ADDRESS=512 in build command. Code: https://github.com/mxu9/edk2/tree/CustomizeLazyAcceptSize.v1 Cc: Erdem Aktas Cc: Gerd Hoffmann Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Signed-off-by: Min Xu Min M Xu (3): OvmfPkg: Customize lazy-accept's end address OvmfPkg/PeilessStartupLib: Update ConstructFwHobList for lazy-accept OvmfPkg/PlatformPei: Adjust LowerMemorySize in PublishPeiMemory OvmfPkg/IntelTdx/IntelTdxX64.dsc | 8 ++++ OvmfPkg/Library/PeilessStartupLib/Hob.c | 25 +++++++++---- .../PeilessStartupLib/PeilessStartupLib.inf | 1 + OvmfPkg/Library/PlatformInitLib/IntelTdx.c | 37 ++++++++++++++----- .../PlatformInitLib/PlatformInitLib.inf | 1 + OvmfPkg/OvmfPkg.dec | 2 + OvmfPkg/PlatformPei/MemDetect.c | 13 +++++++ OvmfPkg/PlatformPei/PlatformPei.inf | 1 + 8 files changed, 72 insertions(+), 16 deletions(-) -- 2.29.2.windows.2