From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mx.groups.io with SMTP id smtpd.web12.9272.1656493075185691776 for ; Wed, 29 Jun 2022 01:58:00 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=bch930kV; spf=pass (domain: intel.com, ip: 192.55.52.151, 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=1656493080; x=1688029080; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Saaex6JXqcPx8w4g+y9ZCcoSG5mcsHBnHtztUkBlK/w=; b=bch930kVxlHYzzOGJfmzioE0JB1VX5oZB7xW5ek4BF4I3PeStBvDYf6Q IOvej1SlBS48TlxnnYNNapkR8Q/TPUsqERHlffmPYMYmsHT60joBD1xrd JItIBbzalYlNV86/pRdA9pBxwZWIfuBcn5rqB75RUvlJklQilv1I0xdhQ Amstp6Wa4i3+TSzleu26aczV+yKRLYEIb75ApkDyVNeSqJOjKNRWnB1Q3 9D4k0D6kGibGuLCYQi7lJhJaweuIRtKVYnZkM+s/39kz0KX2NRgTWMhOf VDVfeuR9om+28kYHbXVBmiKhrcDCuM8frrC1ny1efWt1wsMAWv4qeLuX2 w==; X-IronPort-AV: E=McAfee;i="6400,9594,10392"; a="262383797" X-IronPort-AV: E=Sophos;i="5.92,231,1650956400"; d="scan'208";a="262383797" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2022 01:58:00 -0700 X-IronPort-AV: E=Sophos;i="5.92,231,1650956400"; d="scan'208";a="595159075" Received: from mxu9-mobl1.ccr.corp.intel.com ([10.255.29.128]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jun 2022 01:57:58 -0700 From: "Min Xu" To: devel@edk2.groups.io Cc: Min M Xu , Erdem Aktas , James Bottomley , Jiewen Yao , Tom Lendacky , Gerd Hoffmann Subject: [PATCH V3 6/7] OvmfPkg/TdxDxe: Set PcdEmuVariableNvStoreReserved Date: Wed, 29 Jun 2022 16:57:02 +0800 Message-Id: <982b776e42e16aa8bdaa10bf26345b5579bfe489.1656479990.git.min.m.xu@intel.com> X-Mailer: git-send-email 2.29.2.windows.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Min M Xu Set PcdEmuVariableNvStoreReserved with the value in PlatformInfoHob. It is the address of the EmuVariableNvStore reserved in Pei-less startup. Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Tom Lendacky Cc: Gerd Hoffmann Signed-off-by: Min Xu --- OvmfPkg/TdxDxe/TdxDxe.c | 2 ++ OvmfPkg/TdxDxe/TdxDxe.inf | 1 + 2 files changed, 3 insertions(+) diff --git a/OvmfPkg/TdxDxe/TdxDxe.c b/OvmfPkg/TdxDxe/TdxDxe.c index 2318db989792..837f1f8e3024 100644 --- a/OvmfPkg/TdxDxe/TdxDxe.c +++ b/OvmfPkg/TdxDxe/TdxDxe.c @@ -64,6 +64,8 @@ SetPcdSettings ( PlatformInfoHob->PcdCpuBootLogicalProcessorNumber )); + PcdSet64S (PcdEmuVariableNvStoreReserved, PlatformInfoHob->PcdEmuVariableNvStoreReserved); + if (TdIsEnabled ()) { PcdStatus = PcdSet64S (PcdTdxSharedBitMask, TdSharedPageMask ()); ASSERT_RETURN_ERROR (PcdStatus); diff --git a/OvmfPkg/TdxDxe/TdxDxe.inf b/OvmfPkg/TdxDxe/TdxDxe.inf index a7e0abda1522..3ce8a5c32c98 100644 --- a/OvmfPkg/TdxDxe/TdxDxe.inf +++ b/OvmfPkg/TdxDxe/TdxDxe.inf @@ -68,3 +68,4 @@ gEfiMdePkgTokenSpaceGuid.PcdConfidentialComputingGuestAttr gEfiMdeModulePkgTokenSpaceGuid.PcdTdxSharedBitMask gEfiMdeModulePkgTokenSpaceGuid.PcdSetNxForStack + gEfiMdeModulePkgTokenSpaceGuid.PcdEmuVariableNvStoreReserved -- 2.29.2.windows.2