18#define GT_BLOCK_TIMER_COUNT_MAX 8
46 UINT32 BlockTimerCount;
48 BlockTimerCount = *(UINT32 *)Ptr;
50 if (BlockTimerCount > GT_BLOCK_TIMER_COUNT_MAX) {
53 L
"\nERROR: Timer Count = %d. Max Timer Count is %d.",
55 GT_BLOCK_TIMER_COUNT_MAX
79 FrameNumber = *(UINT8 *)Ptr;
81 if (FrameNumber >= GT_BLOCK_TIMER_COUNT_MAX) {
84 L
"\nERROR: GT Frame Number = %d. GT Frame Number must be in range 0-%d.",
86 GT_BLOCK_TIMER_COUNT_MAX - 1
96 { L
"CntControlBase Physical Address",8, 36, L
"0x%lx",
NULL,
NULL,
111 { L
"CntReadBase Physical address", 8, 80, L
"0x%lx",
NULL,
NULL,
NULL,
NULL },
112 { L
"Platform Timer Count", 4, 88, L
"%d",
NULL,
113 (VOID **)&GtdtPlatformTimerCount,
NULL,
NULL },
114 { L
"Platform Timer Offset", 4, 92, L
"0x%x",
NULL,
115 (VOID **)&GtdtPlatformTimerOffset,
NULL,
NULL },
136 { L
"Physical address (CntCtlBase)", 8, 4, L
"0x%lx",
NULL,
NULL,
NULL,
NULL },
137 { L
"Timer Count", 4, 12, L
"%d",
NULL, (VOID **)&GtBlockTimerCount,
139 { L
"Timer Offset", 4, 16, L
"%d",
NULL, (VOID **)&GtBlockTimerOffset,
NULL,
150 { L
"Physical address (CntEL0BaseX)", 8, 12, L
"0x%lx",
NULL,
NULL,
NULL,
166 { L
"RefreshFrame Physical address", 8, 4, L
"0x%lx",
NULL,
NULL,
NULL,
NULL },
167 { L
"ControlFrame Physical address", 8, 12, L
"0x%lx",
NULL,
NULL,
NULL,
NULL },
199 if ((GtBlockTimerCount ==
NULL) ||
200 (GtBlockTimerOffset ==
NULL))
204 L
"ERROR: Insufficient GT Block Structure length. Length = %d.\n",
210 Offset = *GtBlockTimerOffset;
215 while ((Index++ < *GtBlockTimerCount) &&
245 "Arm Generic Watchdog",
273 IN UINT32 AcpiTableLength,
274 IN UINT8 AcpiTableRevision
296 if ((GtdtPlatformTimerCount ==
NULL) ||
297 (GtdtPlatformTimerOffset ==
NULL))
301 L
"ERROR: Insufficient table length. AcpiTableLength = %d.\n",
307 TimerPtr = Ptr + *GtdtPlatformTimerOffset;
308 Offset = *GtdtPlatformTimerOffset;
313 while ((Index++ < *GtdtPlatformTimerCount) &&
314 (Offset < AcpiTableLength))
322 AcpiTableLength - Offset,
328 if ((PlatformTimerType ==
NULL) ||
329 (PlatformTimerLength ==
NULL))
333 L
"ERROR: Insufficient remaining table buffer length to read the " \
334 L
"Platform Timer Structure header. Length = %d.\n",
335 AcpiTableLength - Offset
341 if ((*PlatformTimerLength == 0) ||
342 ((Offset + (*PlatformTimerLength)) > AcpiTableLength))
346 L
"ERROR: Invalid Platform Timer Structure length. " \
347 L
"Length = %d. Offset = %d. AcpiTableLength = %d.\n",
348 *PlatformTimerLength,
355 switch (*PlatformTimerType) {
359 case EFI_ACPI_6_4_GTDT_ARM_GENERIC_WATCHDOG:
365 L
"ERROR: Invalid Platform Timer Type = %d\n",
371 TimerPtr += *PlatformTimerLength;
372 Offset += *PlatformTimerLength;
#define EFI_ACPI_6_4_GTDT_GT_BLOCK
VOID EFIAPI Dump3Chars(IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length)
VOID EFIAPI IncrementErrorCount(VOID)
UINT32 EFIAPI ParseAcpi(IN BOOLEAN Trace, IN UINT32 Indent, IN CONST CHAR8 *AsciiName OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length, IN CONST ACPI_PARSER *Parser, IN UINT32 ParserItems)
#define PARSER_PARAMS(Parser)
#define PARSE_ACPI_HEADER(Info)
STATIC CONST ACPI_PARSER ArmGenericWatchdogParser[]
STATIC CONST ACPI_PARSER GtPlatformTimerHeaderParser[]
STATIC VOID DumpGTBlock(IN UINT8 *Ptr, IN UINT16 Length)
STATIC CONST ACPI_PARSER GtdtParser[]
STATIC CONST ACPI_PARSER GtBlockTimerParser[]
STATIC CONST ACPI_PARSER GtBlockParser[]
VOID EFIAPI ParseAcpiGtdt(IN BOOLEAN Trace, IN UINT8 *Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision)
STATIC VOID DumpWatchdogTimer(IN UINT8 *Ptr, IN UINT16 Length)
STATIC VOID EFIAPI ValidateGtBlockTimerCount(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
STATIC VOID EFIAPI ValidateGtFrameNumber(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
UINTN EFIAPI Print(IN CONST CHAR16 *Format,...)