[edk2-devel] [PATCH] IntelSiliconPkg/VTd: Use Legacy Mode Address Translation
Sheng Wei
w.sheng at intel.com
Tue Feb 8 02:03:11 UTC 2022
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 <ray.ni at intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty at intel.com>
Cc: Jenny Huang <jenny.huang at intel.com>
Cc: Robert Kowalewski <robert.kowalewski at intel.com>
Signed-off-by: Sheng Wei <w.sheng at intel.com>
---
.../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
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#86434): https://edk2.groups.io/g/devel/message/86434
Mute This Topic: https://groups.io/mt/88988329/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list