#include "AcpiTableParser.h"\r
\r
// Local Variables\r
-STATIC CONST UINT64* SlitSystemLocalityCount;\r
-STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
+STATIC CONST UINT64 *SlitSystemLocalityCount;\r
+STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;\r
\r
/**\r
An ACPI_PARSER array describing the ACPI SLIT table.\r
**/\r
-STATIC CONST ACPI_PARSER SlitParser[] = {\r
+STATIC CONST ACPI_PARSER SlitParser[] = {\r
PARSE_ACPI_HEADER (&AcpiHdrInfo),\r
- {L"Number of System Localities", 8, 36, L"0x%lx", NULL,\r
- (VOID**)&SlitSystemLocalityCount, NULL, NULL}\r
+ { L"Number of System Localities", 8, 36, L"0x%lx", NULL,\r
+ (VOID **)&SlitSystemLocalityCount,NULL, NULL }\r
};\r
\r
/**\r
Macro to get the value of a System Locality\r
**/\r
-#define SLIT_ELEMENT(Ptr, i, j) *(Ptr + (i * LocalityCount) + j)\r
+#define SLIT_ELEMENT(Ptr, i, j) *(Ptr + (i * LocalityCount) + j)\r
\r
/**\r
This function parses the ACPI SLIT table.\r
VOID\r
EFIAPI\r
ParseAcpiSlit (\r
- IN BOOLEAN Trace,\r
- IN UINT8* Ptr,\r
- IN UINT32 AcpiTableLength,\r
- IN UINT8 AcpiTableRevision\r
+ IN BOOLEAN Trace,\r
+ IN UINT8 *Ptr,\r
+ IN UINT32 AcpiTableLength,\r
+ IN UINT8 AcpiTableRevision\r
)\r
{\r
- UINT32 Offset;\r
- UINT32 Count;\r
- UINT32 Index;\r
- UINT32 LocalityCount;\r
- UINT8* LocalityPtr;\r
- CHAR16 Buffer[80]; // Used for AsciiName param of ParseAcpi\r
+ UINT32 Offset;\r
+ UINT32 Count;\r
+ UINT32 Index;\r
+ UINT32 LocalityCount;\r
+ UINT8 *LocalityPtr;\r
+ CHAR16 Buffer[80]; // Used for AsciiName param of ParseAcpi\r
\r
if (!Trace) {\r
return;\r
IncrementErrorCount ();\r
Print (\r
L"ERROR: The Number of System Localities provided can't be represented " \\r
- L"in the SLIT table. SlitSystemLocalityCount = %ld. " \\r
- L"MaxLocalityCountAllowed = %d.\n",\r
+ L"in the SLIT table. SlitSystemLocalityCount = %ld. " \\r
+ L"MaxLocalityCountAllowed = %d.\n",\r
*SlitSystemLocalityCount,\r
MAX_UINT16\r
);\r
IncrementErrorCount ();\r
Print (\r
L"ERROR: Invalid Number of System Localities. " \\r
- L"SlitSystemLocalityCount = %ld. AcpiTableLength = %d.\n",\r
+ L"SlitSystemLocalityCount = %ld. AcpiTableLength = %d.\n",\r
*SlitSystemLocalityCount,\r
AcpiTableLength\r
);\r
for (Index = 0; Index < LocalityCount; Index++) {\r
Print (L" (%3d) ", Index);\r
}\r
+\r
Print (L"\n");\r
- for (Count = 0; Count< LocalityCount; Count++) {\r
+ for (Count = 0; Count < LocalityCount; Count++) {\r
Print (L" (%3d) ", Count);\r
for (Index = 0; Index < LocalityCount; Index++) {\r
Print (L" %3d ", SLIT_ELEMENT (LocalityPtr, Count, Index));\r
}\r
+\r
Print (L"\n");\r
}\r
}\r
for (Count = 0; Count < LocalityCount; Count++) {\r
for (Index = 0; Index < LocalityCount; Index++) {\r
// Element[x][x] must be equal to 10\r
- if ((Count == Index) && (SLIT_ELEMENT (LocalityPtr, Count,Index) != 10)) {\r
+ if ((Count == Index) && (SLIT_ELEMENT (LocalityPtr, Count, Index) != 10)) {\r
IncrementErrorCount ();\r
Print (\r
L"ERROR: Diagonal Element[0x%lx][0x%lx] (%3d)."\r
- L" Normalized Value is not 10\n",\r
+ L" Normalized Value is not 10\n",\r
Count,\r
Index,\r
SLIT_ELEMENT (LocalityPtr, Count, Index)\r
);\r
}\r
+\r
// Element[i][j] must be equal to Element[j][i]\r
if (SLIT_ELEMENT (LocalityPtr, Count, Index) !=\r
- SLIT_ELEMENT (LocalityPtr, Index, Count)) {\r
+ SLIT_ELEMENT (LocalityPtr, Index, Count))\r
+ {\r
IncrementErrorCount ();\r
Print (\r
L"ERROR: Relative distances for Element[0x%lx][0x%lx] (%3d) and \n"\r
- L"Element[0x%lx][0x%lx] (%3d) do not match.\n",\r
+ L"Element[0x%lx][0x%lx] (%3d) do not match.\n",\r
Count,\r
Index,\r
SLIT_ELEMENT (LocalityPtr, Count, Index),\r