diff options
author | Star Zeng <star.zeng@intel.com> | 2018-01-17 19:33:30 +0800 |
---|---|---|
committer | Star Zeng <star.zeng@intel.com> | 2018-01-18 10:36:56 +0800 |
commit | 1d4c17a6ef1a06023cb533d108556c419bdb1fed (patch) | |
tree | 9e126b32e303d6ae65535d055f607b9979c5d5c7 /IntelSiliconPkg | |
parent | 9c6961d5987c1cabe4d7136fe506f00ce1c501c8 (diff) | |
download | edk2-1d4c17a6ef1a06023cb533d108556c419bdb1fed.tar.gz |
IntelSiliconPkg IntelVTdDxe: Fix DMA does not work issue
Fix DMA does not work issue when system memory is not
greater than 4G.
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'IntelSiliconPkg')
-rw-r--r-- | IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c index cecb5d23ef..7bdc4a5146 100644 --- a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c +++ b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/TranslationTable.c @@ -286,9 +286,13 @@ CreateSecondLevelPagingEntry ( if (SecondLevelPagingEntry == NULL) {
return NULL;
}
- SecondLevelPagingEntry = CreateSecondLevelPagingEntryTable (VtdIndex, SecondLevelPagingEntry, SIZE_4GB, mAbove4GMemoryLimit, IoMmuAccess);
- if (SecondLevelPagingEntry == NULL) {
- return NULL;
+
+ if (mAbove4GMemoryLimit != 0) {
+ ASSERT (mAbove4GMemoryLimit > BASE_4GB);
+ SecondLevelPagingEntry = CreateSecondLevelPagingEntryTable (VtdIndex, SecondLevelPagingEntry, SIZE_4GB, mAbove4GMemoryLimit, IoMmuAccess);
+ if (SecondLevelPagingEntry == NULL) {
+ return NULL;
+ }
}
return SecondLevelPagingEntry;
|