Skip to content

Commit ca52feb

Browse files
committed
mend
1 parent 9e339aa commit ca52feb

6 files changed

Lines changed: 716 additions & 677 deletions

File tree

UefiTestingPkg/AuditTests/DMAProtectionAudit/UEFI/DMAProtectionUnitTestApp.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,10 @@ CheckBMETeardown (
317317
for (i = 0; i < (PreVarSize)/(sizeof (BOOLEAN)); i++) {
318318
// BME Enabled before exit boot services
319319
UT_LOG_INFO (PreBuffer[i] ? "Pre-EBS BME %d: True\n" : "Pre-EBS BME %d: False\n", i);
320+
DEBUG ((DEBUG_INFO, PreBuffer[i] ? "%a: Pre-EBS BME %d: True\n" : "%a: Pre-EBS BME %d: False\n", __func__, i));
320321
// BME Disabled after exit boot services
321322
UT_LOG_INFO (PostBuffer[i] ? "Post-EBS BME %d: True\n" : "Post-EBS BME %d: False\n", i);
323+
DEBUG ((DEBUG_INFO, PostBuffer[i] ? "%a: Post-EBS BME %d: True\n" : "%a: Post-EBS BME %d: False\n", __func__, i));
322324
UT_ASSERT_FALSE (PostBuffer[i]);
323325
}
324326

@@ -348,6 +350,9 @@ CheckBMETeardown (
348350
);
349351
}
350352

353+
UT_LOG_INFO ("PASSED: BME test.\n");
354+
DEBUG ((DEBUG_INFO, "PASSED: BME test.\n"));
355+
351356
return UNIT_TEST_PASSED;
352357
} // CheckBMETeardown()
353358

@@ -418,8 +423,8 @@ DMAProtectionUnitTestApp (
418423
}
419424

420425
AddTestCase (IommuTests, "All Hardware Definition Units Have IOMMU Enabled", "IOMMU.StatusRegister", CheckIOMMUEnabled, NULL, NULL, NULL);
421-
AddTestCase (IommuTests, "BME Teardown at ExitBootServices", "IOMMU.BMETeardown", CheckBMETeardown, NULL, NULL, BMEContext);
422426
AddTestCase (IommuTests, "Verify excluded ranges are marked reserved", "IOMMU.ExcludedRangeTest", CheckExcludedRegions, NULL, NULL, NULL);
427+
AddTestCase (IommuTests, "BME Teardown at ExitBootServices", "IOMMU.BMETeardown", CheckBMETeardown, NULL, NULL, BMEContext);
423428

424429
//
425430
// Execute the tests.
Lines changed: 59 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
## @file DMASmmuProtectionUnitTestApp.inf
2-
##
3-
# DMA Protection Unit Test App for ARM SMMUv3 platforms.
4-
# Tests SMMU translation enable status and RMR reserved memory regions.
5-
#
6-
# Copyright (c) Microsoft Corporation. All rights reserved.
7-
# SPDX-License-Identifier: BSD-2-Clause-Patent
8-
#
9-
##
10-
11-
12-
[Defines]
13-
INF_VERSION = 0x00010006
14-
BASE_NAME = DMASmmuProtectionUnitTestApp
15-
FILE_GUID = 7A8C2E45-B9F3-4D12-A6E8-9C1B5F3D2E7A
16-
MODULE_TYPE = UEFI_APPLICATION
17-
VERSION_STRING = 1.0
18-
ENTRY_POINT = DMAProtectionUnitTestApp
19-
20-
#
21-
# The following information is for reference only and not required by the build tools.
22-
#
23-
# VALID_ARCHITECTURES = AARCH64
24-
#
25-
26-
[Sources]
27-
Acpi.c
28-
Acpi.h
29-
DMAProtectionTest.h
30-
DMAProtectionUnitTestApp.c
31-
SMMU/DmaProtection.h
32-
SMMU/DMAProtectionTestArch.c
33-
SMMU/IortAcpiTable.c
34-
35-
[Packages]
36-
MdePkg/MdePkg.dec
37-
MdeModulePkg/MdeModulePkg.dec
38-
UefiTestingPkg/UefiTestingPkg.dec
39-
UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
40-
ShellPkg/ShellPkg.dec
41-
42-
[Protocols]
43-
gEfiPciIoProtocolGuid ## CONSUMES
44-
45-
[LibraryClasses]
46-
UefiApplicationEntryPoint
47-
DebugLib
48-
UnitTestLib
49-
UnitTestBootLib
50-
UnitTestPersistenceLib
51-
IoLib
52-
MemoryAllocationLib
53-
ShellLib
54-
PciLib
55-
56-
[Guids]
57-
gDMAUnitTestVariableGuid
58-
gEfiAcpi20TableGuid
59-
gEfiAcpi10TableGuid
1+
## @file DMASmmuProtectionUnitTestApp.inf
2+
##
3+
# DMA Protection Unit Test App for ARM SMMUv3 platforms.
4+
# Tests SMMU translation enable status and RMR reserved memory regions.
5+
#
6+
# Copyright (c) Microsoft Corporation. All rights reserved.
7+
# SPDX-License-Identifier: BSD-2-Clause-Patent
8+
#
9+
##
10+
11+
12+
[Defines]
13+
INF_VERSION = 0x00010006
14+
BASE_NAME = DMASmmuProtectionUnitTestApp
15+
FILE_GUID = 7A8C2E45-B9F3-4D12-A6E8-9C1B5F3D2E7A
16+
MODULE_TYPE = UEFI_APPLICATION
17+
VERSION_STRING = 1.0
18+
ENTRY_POINT = DMAProtectionUnitTestApp
19+
20+
#
21+
# The following information is for reference only and not required by the build tools.
22+
#
23+
# VALID_ARCHITECTURES = AARCH64
24+
#
25+
26+
[Sources]
27+
Acpi.c
28+
Acpi.h
29+
DMAProtectionTest.h
30+
DMAProtectionUnitTestApp.c
31+
SMMU/DmaProtection.h
32+
SMMU/DMAProtectionTestArch.c
33+
SMMU/IortAcpiTable.c
34+
35+
[Packages]
36+
MdePkg/MdePkg.dec
37+
MdeModulePkg/MdeModulePkg.dec
38+
UefiTestingPkg/UefiTestingPkg.dec
39+
UnitTestFrameworkPkg/UnitTestFrameworkPkg.dec
40+
ShellPkg/ShellPkg.dec
41+
42+
[Protocols]
43+
gEfiPciIoProtocolGuid ## CONSUMES
44+
45+
[LibraryClasses]
46+
UefiApplicationEntryPoint
47+
DebugLib
48+
UnitTestLib
49+
UnitTestBootLib
50+
UnitTestPersistenceLib
51+
IoLib
52+
MemoryAllocationLib
53+
ShellLib
54+
PciLib
55+
56+
[Guids]
57+
gDMAUnitTestVariableGuid
58+
gEfiAcpi20TableGuid
59+
gEfiAcpi10TableGuid

0 commit comments

Comments
 (0)