}\r
}\r
\r
+/**\r
+ This function validates the ID Mapping array count for the Performance\r
+ Monitoring Counter Group (PMCG) node.\r
+\r
+ @param [in] Ptr Pointer to the start of the field data.\r
+ @param [in] Context Pointer to context specific information e.g. this\r
+ could be a pointer to the ACPI table header.\r
+**/\r
+STATIC\r
+VOID\r
+EFIAPI\r
+ValidatePmcgIdMappingCount (\r
+ IN UINT8* Ptr,\r
+ IN VOID* Context\r
+ )\r
+{\r
+ if (*(UINT32*)Ptr > 1) {\r
+ IncrementErrorCount ();\r
+ Print (L"\nERROR: IORT ID Mapping count must not be greater than 1.");\r
+ }\r
+}\r
+\r
/**\r
This function validates the ID Mapping array offset for the ITS node.\r
\r
An ACPI_PARSER array describing the IORT PMCG node.\r
**/\r
STATIC CONST ACPI_PARSER IortNodePmcgParser[] = {\r
- PARSE_IORT_NODE_HEADER (NULL, NULL),\r
+ PARSE_IORT_NODE_HEADER (ValidatePmcgIdMappingCount, NULL),\r
{L"Base Address", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL},\r
{L"Overflow interrupt GSIV", 4, 24, L"0x%x", NULL, NULL, NULL, NULL},\r
{L"Node reference", 4, 28, L"0x%x", NULL, NULL, NULL, NULL},\r
if (*IortIdMappingCount != 0) {\r
DumpIortNodeIdMappings (Ptr, MappingCount, MappingOffset);\r
}\r
-\r
- if (*IortIdMappingCount > 1) {\r
- IncrementErrorCount ();\r
- Print (\r
- L"ERROR: ID mapping must not be greater than 1. Id Mapping Count =%d\n",\r
- *IortIdMappingCount\r
- );\r
- }\r
}\r
\r
/**\r