* [PATCH] IntelSiliconPkg/VTd: Use Legacy Mode Address Translation
@ 2022-02-08 2:03 Sheng Wei
2022-02-09 3:03 ` Ni, Ray
0 siblings, 1 reply; 2+ messages in thread
From: Sheng Wei @ 2022-02-08 2:03 UTC (permalink / raw)
To: devel; +Cc: Ray Ni, Rangasai V Chaganty, Jenny Huang, Robert Kowalewski
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@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Jenny Huang <jenny.huang@intel.com>
Cc: Robert Kowalewski <robert.kowalewski@intel.com>
Signed-off-by: Sheng Wei <w.sheng@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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] IntelSiliconPkg/VTd: Use Legacy Mode Address Translation
2022-02-08 2:03 [PATCH] IntelSiliconPkg/VTd: Use Legacy Mode Address Translation Sheng Wei
@ 2022-02-09 3:03 ` Ni, Ray
0 siblings, 0 replies; 2+ messages in thread
From: Ni, Ray @ 2022-02-09 3:03 UTC (permalink / raw)
To: Sheng, W, devel@edk2.groups.io
Cc: Chaganty, Rangasai V, Huang, Jenny, Kowalewski, Robert
Reviewed-by: Ray Ni <ray.ni@intel.com>
-----Original Message-----
From: Sheng, W <w.sheng@intel.com>
Sent: Tuesday, February 8, 2022 10:03 AM
To: devel@edk2.groups.io
Cc: Ni, Ray <ray.ni@intel.com>; Chaganty, Rangasai V <rangasai.v.chaganty@intel.com>; Huang, Jenny <jenny.huang@intel.com>; Kowalewski, Robert <robert.kowalewski@intel.com>
Subject: [PATCH] IntelSiliconPkg/VTd: Use Legacy Mode Address Translation
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@intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty@intel.com>
Cc: Jenny Huang <jenny.huang@intel.com>
Cc: Robert Kowalewski <robert.kowalewski@intel.com>
Signed-off-by: Sheng Wei <w.sheng@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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-02-09 3:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-08 2:03 [PATCH] IntelSiliconPkg/VTd: Use Legacy Mode Address Translation Sheng Wei
2022-02-09 3:03 ` Ni, Ray
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox