Skip to content

Commit 62575d1

Browse files
committed
reserved memory type only for RMR regions
1 parent 0bc8e37 commit 62575d1

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

UefiTestingPkg/AuditTests/DMAProtectionAudit/UEFI/SMMU/DMAProtectionTestArch.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ This file contains architecture specific DMA protection tests for ARM SMMU (SMMU
99
4) Check that Stream Table Base is configured (STRTAB_BASE is not NULL)
1010
5) Check that GERROR register is 0 (no global errors)
1111
6) Check RMR (Reserved Memory Range) regions from IORT are found in the EFI memory map
12-
and marked with an acceptable memory type (EfiReservedMemoryType or
13-
EfiRuntimeServicesData).
12+
and marked with an acceptable memory type (EfiReservedMemoryType)
1413
1514
Copyright (c) Microsoft Corporation. All rights reserved.
1615
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -42,7 +41,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
4241
For each RMR region, the test verifies that:
4342
1) An EFI memory map descriptor fully encompasses the RMR region, and
4443
2) That descriptor's memory type is acceptable, i.e. EfiReservedMemoryType
45-
or EfiRuntimeServicesData.
4644
4745
If an RMR region is not found in the memory map, or is found but is not one of
4846
the acceptable memory types, the test fails.
@@ -158,9 +156,7 @@ CheckExcludedRegions (
158156
EfiMemNext->Type
159157
);
160158

161-
if ((EfiMemNext->Type == EfiReservedMemoryType) ||
162-
(EfiMemNext->Type == EfiRuntimeServicesData))
163-
{
159+
if (EfiMemNext->Type == EfiReservedMemoryType) {
164160
Found = TRUE;
165161
}
166162

@@ -186,7 +182,7 @@ CheckExcludedRegions (
186182

187183
if (!Found) {
188184
UT_LOG_ERROR (
189-
"RMR between 0x%lX and 0x%lX NOT found with an acceptable memory type (Reserved or RuntimeServicesData)! Memory type found: %d\n",
185+
"RMR between 0x%lX and 0x%lX NOT found with an acceptable memory type (Reserved)! Memory type found: %d\n",
190186
RmrEntry->BaseAddress,
191187
RmrEntry->BaseAddress + RmrEntry->Length,
192188
FoundMemoryType

0 commit comments

Comments
 (0)