From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web09.5924.1644285797785877006 for ; Mon, 07 Feb 2022 18:03:18 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=Qo+i86XE; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: w.sheng@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644285797; x=1675821797; h=from:to:cc:subject:date:message-id; bh=2rOAOEj5VfDfmiGi+5aBGlqHJ+PLTAOIySsE+KIY9vw=; b=Qo+i86XE4PfNMWPtHqRPy1tmgqnc/LbaZILn9sbIvJL4yDhBF2zNrKQV +8gREEfdbhfOSOqwplnwPMJKtFFspOcb1GLLpOKMEDOB77uXe8btSQaJ5 FpKqB39uNzqSC3DvrQUhYJf/7X5pxNX08cn2FHqxFSZcICSTMYovcsYAt pFoWscQFxTnyhub6095s011geGukF521HC8IU9eTbSi8W+4q7pxz9go7N DAPaT3bj9juKl/wsXcahWfYpJyg+UnzJJ7MJl8iFLBx+J2xedK7cK5hyZ F6bpKkIV1rRjhU94cnon4u7ebx8HUsUaOWTtI0I9efhHYFnIr1LZUgrgV w==; X-IronPort-AV: E=McAfee;i="6200,9189,10251"; a="312150081" X-IronPort-AV: E=Sophos;i="5.88,351,1635231600"; d="scan'208";a="312150081" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2022 18:03:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,351,1635231600"; d="scan'208";a="567687051" Received: from shwdesssddpdwei.ccr.corp.intel.com ([10.239.157.43]) by orsmga001.jf.intel.com with ESMTP; 07 Feb 2022 18:03:15 -0800 From: "Sheng Wei" To: devel@edk2.groups.io Cc: Ray Ni , Rangasai V Chaganty , Jenny Huang , Robert Kowalewski Subject: [PATCH] IntelSiliconPkg/VTd: Use Legacy Mode Address Translation Date: Tue, 8 Feb 2022 10:03:11 +0800 Message-Id: <20220208020311.8276-1-w.sheng@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 Only if ECAP_REG.SMTS == 0 and ECAP_REG.bit 24 == 1, use extended mode address translation. REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3826 Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Jenny Huang Cc: Robert Kowalewski Signed-off-by: Sheng Wei --- .../Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c | 2 +- .../IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/TranslationTable.c | 2 +- .../Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c index b30c44dc..180981eb 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmar.c @@ -626,7 +626,7 @@ EnableVTdTranslationProtection ( if (VtdUnitInfo->ExtRootEntryTable != 0) { DEBUG ((DEBUG_INFO, "EnableVtdDmar (%d) ExtRootEntryTable 0x%x\n", Index, VtdUnitInfo->ExtRootEntryTable)); - Status = EnableDmar (VtdUnitInfo, VtdUnitInfo->ExtRootEntryTable); + Status = EnableDmar (VtdUnitInfo, VtdUnitInfo->ExtRootEntryTable | BIT11); } else { DEBUG ((DEBUG_INFO, "EnableVtdDmar (%d) RootEntryTable 0x%x\n", Index, VtdUnitInfo->RootEntryTable)); Status = EnableDmar (VtdUnitInfo, VtdUnitInfo->RootEntryTable); diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/TranslationTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/TranslationTable.c index c94f4a85..b3e9519f 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/TranslationTable.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/TranslationTable.c @@ -902,7 +902,7 @@ SetupTranslationTable ( ASSERT(FALSE); Status = EFI_UNSUPPORTED; } else { - Status = CreateExtContextEntry (VtdUnitInfo); + Status = CreateContextEntry (VtdUnitInfo); } } else { if (VtdUnitInfo->ECapReg.Bits.DEP_24) { diff --git a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c index 48e38d56..3e8cf9dd 100644 --- a/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c +++ b/Silicon/Intel/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c @@ -389,7 +389,7 @@ SetupTranslationTable ( ASSERT(FALSE); Status = EFI_UNSUPPORTED; } else { - Status = CreateExtContextEntry (Index); + Status = CreateContextEntry (Index); } } else { if (mVtdUnitInformation[Index].ECapReg.Bits.DEP_24) { -- 2.16.2.windows.1