in UefiTestingPkg/AuditTests/DMAProtectionAudit/Windows/IVRSTableAudit.py [0:0]
def CheckExemptListCount(self, iommu_table, goldenxml=None):
goldenignores = list()
if goldenxml is None or not os.path.isfile(goldenxml):
print("XML File not found")
else:
goldenfile = ET.parse(goldenxml)
goldenroot = goldenfile.getroot()
for entry in goldenroot:
if entry.tag == "IVMD":
goldenignores.append(entry.attrib)
for IVMDentry in iommu_table.IVMD_list:
if not IVMDentry.validateIVMD(goldenignores):
print("IVMD PCIe Endpoint " + str(IVMDentry) + " found but not in golden XML")
return False
return True