22STATIC UINT32 *PccGlobalFlags;
23STATIC UINT8 *PccSubspaceLength;
24STATIC UINT8 *PccSubspaceType;
25STATIC UINT8 *ExtendedPccSubspaceInterruptFlags;
47 L
"\nError: Shared memory range length is too short.\n"
48 L
"Length is %u when it should be greater than or equal to %u",
75 L
"\nError: Shared memory range length is too short.\n"
76 L
"Length is %u when it should be greater than %u",
100 switch (*(UINT8 *)Ptr) {
101 #if !(defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64))
102 case EFI_ACPI_6_4_SYSTEM_IO:
104 case EFI_ACPI_6_4_SYSTEM_MEMORY:
108 Print (L
"\nError: Invalid address space");
129 switch (*(UINT8 *)Ptr) {
130 #if !(defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64))
131 case EFI_ACPI_6_4_SYSTEM_IO:
133 case EFI_ACPI_6_4_FUNCTIONAL_FIXED_HARDWARE:
134 case EFI_ACPI_6_4_SYSTEM_MEMORY:
138 Print (L
"\nError: Invalid address space");
161 if (*PccSubspaceType == EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC) {
198 ((*ExtendedPccSubspaceInterruptFlags &
199 EFI_ACPI_6_4_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_MODE) ==
200 EFI_ACPI_6_4_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_MODE))
232 if (*PccSubspaceType == EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC) {
258 if ((*PccSubspaceType == EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC) &&
264 L
"\nError: Global Platform interrupt flag must be set to 1" \
265 L
" if a PCC type 4 structure is present in PCCT."
345 { L
"Minimum Request Turnaround Time",2, 60, L
"%u",
NULL,
NULL,
NULL,
NULL },
348 { L
"Platform Interrupt Ack Preserve",8, 74, L
"0x%lx",
NULL,
NULL,
NULL,
NULL },
349 { L
"Platform Interrupt Ack Write",8, 82, L
"0x%lx",
NULL,
NULL,
358 { L
"Platform Interrupt", 4, 2, L
"0x%x",
NULL,
NULL,
360 { L
"Platform Interrupt Flags", 1, 6, L
"0x%x",
NULL,
361 (VOID **)&ExtendedPccSubspaceInterruptFlags,
NULL,
NULL },
372 { L
"Minimum Request Turnaround Time", 4, 56, L
"%u",
NULL,
NULL,
NULL,
NULL },
375 { L
"Platform Interrupt Ack Preserve", 8, 72, L
"0x%lx",
NULL,
NULL,
NULL,
NULL },
410 { L
"Minimum Request Turnaround Time",4, 92, L
"0x%x",
NULL,
NULL,
NULL,
NULL }
569 IN UINT32 AcpiTableLength,
570 IN UINT8 AcpiTableRevision
574 UINT8 *PccSubspacePtr;
590 PccSubspacePtr = Ptr + Offset;
593 while (Offset < AcpiTableLength) {
600 AcpiTableLength - Offset,
606 if ((PccSubspaceType ==
NULL) ||
607 (PccSubspaceLength ==
NULL))
611 L
"ERROR: Insufficient remaining table buffer length to read the " \
612 L
"structure header. Length = %u.\n",
613 AcpiTableLength - Offset
619 if ((*PccSubspaceLength == 0) ||
620 ((Offset + (*PccSubspaceLength)) > AcpiTableLength))
624 L
"ERROR: Invalid Structure length. " \
625 L
"Length = %u. Offset = %u. AcpiTableLength = %u.\n",
633 switch (*PccSubspaceType) {
634 case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_GENERIC:
640 case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS:
646 case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS:
652 case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC:
658 case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC:
664 case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_5_HW_REGISTERS_COMMUNICATIONS:
673 L
"ERROR: Unknown PCC subspace structure:"
674 L
" Type = %u, Length = %u\n",
680 PccSubspacePtr += *PccSubspaceLength;
681 Offset += *PccSubspaceLength;
687 Print (L
"ERROR: Too many PCC subspaces.");
#define EFI_ACPI_6_4_PCCT_FLAGS_PLATFORM_INTERRUPT
VOID EFIAPI DumpGas(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)
VOID EFIAPI Dump6Chars(IN CONST CHAR16 *Format OPTIONAL, IN UINT8 *Ptr, IN UINT32 Length)
#define PARSER_PARAMS(Parser)
#define PARSE_ACPI_HEADER(Info)
BOOLEAN EFIAPI IsZeroBuffer(IN CONST VOID *Buffer, IN UINTN Length)
STATIC VOID DumpPccSubspaceType1(IN UINT8 *Ptr, IN UINT8 Length)
VOID EFIAPI ParseAcpiPcct(IN BOOLEAN Trace, IN UINT8 *Ptr, IN UINT32 AcpiTableLength, IN UINT8 AcpiTableRevision)
STATIC CONST ACPI_PARSER PcctParser[]
STATIC VOID EFIAPI ValidatePccMemoryIoGas(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
STATIC CONST ACPI_PARSER PccSubspaceHeaderParser[]
STATIC CONST ACPI_PARSER PccSubspaceType0Parser[]
STATIC VOID DumpPccSubspaceType0(IN UINT8 *Ptr, IN UINT8 Length)
STATIC VOID DumpPccSubspaceType3(IN UINT8 *Ptr, IN UINT8 Length)
STATIC VOID EFIAPI ValidatePccErrStatusGas(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
STATIC VOID EFIAPI ValidatePccGas(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
STATIC VOID EFIAPI ValidatePccIntAckGas(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
STATIC VOID DumpPccSubspaceType5(IN UINT8 *Ptr, IN UINT8 Length)
STATIC CONST ACPI_PARSER PccSubspaceType2Parser[]
STATIC VOID EFIAPI ValidateRangeLength8(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
STATIC VOID DumpPccSubspaceType4(IN UINT8 *Ptr, IN UINT8 Length)
STATIC CONST ACPI_PARSER PccSubspaceType1Parser[]
STATIC VOID EFIAPI ValidatePlatInterrupt(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
STATIC CONST ACPI_PARSER PccSubspaceType5Parser[]
STATIC VOID EFIAPI ValidateRangeLength4(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
STATIC VOID DumpPccSubspaceType2(IN UINT8 *Ptr, IN UINT8 Length)
STATIC VOID EFIAPI ValidatePccDoorbellGas(IN UINT8 *Ptr, IN UINT32 Length, IN VOID *Context)
STATIC CONST ACPI_PARSER PccSubspaceType3Parser[]
#define PCC_SUBSPACE_HEADER()
#define MAX_PCC_SUBSPACES
#define MIN_EXT_PCC_SUBSPACE_MEM_RANGE_LEN
#define MIN_MEMORY_RANGE_LENGTH
UINTN EFIAPI Print(IN CONST CHAR16 *Format,...)