mirror of https://github.com/acidanthera/audk.git
ShellPkg: Update Acpiview PCCT parser to ACPI 6.4
Bugzilla: 3563 (https://bugzilla.tianocore.org/show_bug.cgi?id=3563) Update the Acpiview PCCT parser to use Acpi64.h. Signed-off-by: Chris Jones <christopher.jones@arm.com> Reviewed-by: Zhichao Gao <zhichao.gao@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar <sami.mujawar@arm.com>
This commit is contained in:
parent
942c9bd357
commit
80e67bcb23
|
@ -1,11 +1,11 @@
|
||||||
/** @file
|
/** @file
|
||||||
PCCT table parser
|
PCCT table parser
|
||||||
|
|
||||||
Copyright (c) 2020, Arm Limited.
|
Copyright (c) 2021, Arm Limited.
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
|
|
||||||
@par Reference(s):
|
@par Reference(s):
|
||||||
- ACPI 6.3 Specification - January 2019
|
- ACPI 6.4 Specification - January 2021
|
||||||
**/
|
**/
|
||||||
|
|
||||||
#include <Library/BaseMemoryLib.h>
|
#include <Library/BaseMemoryLib.h>
|
||||||
|
@ -93,9 +93,9 @@ ValidatePccType0Gas (
|
||||||
{
|
{
|
||||||
switch (*(UINT8*)Ptr) {
|
switch (*(UINT8*)Ptr) {
|
||||||
#if !(defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64))
|
#if !(defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64))
|
||||||
case EFI_ACPI_6_3_SYSTEM_IO:
|
case EFI_ACPI_6_4_SYSTEM_IO:
|
||||||
#endif //if not (defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64))
|
#endif //if not (defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64))
|
||||||
case EFI_ACPI_6_3_SYSTEM_MEMORY:
|
case EFI_ACPI_6_4_SYSTEM_MEMORY:
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
IncrementErrorCount ();
|
IncrementErrorCount ();
|
||||||
|
@ -120,10 +120,10 @@ ValidatePccGas (
|
||||||
{
|
{
|
||||||
switch (*(UINT8*)Ptr) {
|
switch (*(UINT8*)Ptr) {
|
||||||
#if !(defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64))
|
#if !(defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64))
|
||||||
case EFI_ACPI_6_3_SYSTEM_IO:
|
case EFI_ACPI_6_4_SYSTEM_IO:
|
||||||
#endif //if not (defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64))
|
#endif //if not (defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64))
|
||||||
case EFI_ACPI_6_3_FUNCTIONAL_FIXED_HARDWARE:
|
case EFI_ACPI_6_4_FUNCTIONAL_FIXED_HARDWARE:
|
||||||
case EFI_ACPI_6_3_SYSTEM_MEMORY:
|
case EFI_ACPI_6_4_SYSTEM_MEMORY:
|
||||||
return;
|
return;
|
||||||
default:
|
default:
|
||||||
IncrementErrorCount ();
|
IncrementErrorCount ();
|
||||||
|
@ -148,10 +148,10 @@ ValidatePccDoorbellGas (
|
||||||
{
|
{
|
||||||
// For slave subspaces this field is optional, if not present the field
|
// For slave subspaces this field is optional, if not present the field
|
||||||
// should just contain zeros.
|
// should just contain zeros.
|
||||||
if (*PccSubspaceType == EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC) {
|
if (*PccSubspaceType == EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC) {
|
||||||
if (IsZeroBuffer (
|
if (IsZeroBuffer (
|
||||||
Ptr,
|
Ptr,
|
||||||
sizeof (EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE)
|
sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE)
|
||||||
)) {
|
)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -180,14 +180,14 @@ ValidatePccIntAckGas (
|
||||||
// edge driven the register may be omitted. A value of 0x0 on all
|
// edge driven the register may be omitted. A value of 0x0 on all
|
||||||
// 12 bytes of the GAS structure indicates the register is not
|
// 12 bytes of the GAS structure indicates the register is not
|
||||||
// present.
|
// present.
|
||||||
if (((*PccGlobalFlags & EFI_ACPI_6_3_PCCT_FLAGS_PLATFORM_INTERRUPT) !=
|
if (((*PccGlobalFlags & EFI_ACPI_6_4_PCCT_FLAGS_PLATFORM_INTERRUPT) !=
|
||||||
EFI_ACPI_6_3_PCCT_FLAGS_PLATFORM_INTERRUPT) ||
|
EFI_ACPI_6_4_PCCT_FLAGS_PLATFORM_INTERRUPT) ||
|
||||||
((*ExtendedPccSubspaceInterruptFlags &
|
((*ExtendedPccSubspaceInterruptFlags &
|
||||||
EFI_ACPI_6_3_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_MODE) ==
|
EFI_ACPI_6_4_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_MODE) ==
|
||||||
EFI_ACPI_6_3_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_MODE)) {
|
EFI_ACPI_6_4_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_MODE)) {
|
||||||
if (IsZeroBuffer (
|
if (IsZeroBuffer (
|
||||||
Ptr,
|
Ptr,
|
||||||
sizeof (EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE)
|
sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE)
|
||||||
)) {
|
)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -212,7 +212,7 @@ ValidatePccErrStatusGas (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
// This field is ignored by the OSPM on slave channels.
|
// This field is ignored by the OSPM on slave channels.
|
||||||
if (*PccSubspaceType == EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC) {
|
if (*PccSubspaceType == EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,9 +236,9 @@ ValidatePlatInterrupt (
|
||||||
{
|
{
|
||||||
// If a slave subspace is present in the PCCT, then the global Platform
|
// If a slave subspace is present in the PCCT, then the global Platform
|
||||||
// Interrupt flag must be set to 1.
|
// Interrupt flag must be set to 1.
|
||||||
if ((*PccSubspaceType == EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC) &&
|
if ((*PccSubspaceType == EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC) &&
|
||||||
((*PccGlobalFlags & EFI_ACPI_6_3_PCCT_FLAGS_PLATFORM_INTERRUPT) !=
|
((*PccGlobalFlags & EFI_ACPI_6_4_PCCT_FLAGS_PLATFORM_INTERRUPT) !=
|
||||||
EFI_ACPI_6_3_PCCT_FLAGS_PLATFORM_INTERRUPT)) {
|
EFI_ACPI_6_4_PCCT_FLAGS_PLATFORM_INTERRUPT)) {
|
||||||
IncrementErrorCount ();
|
IncrementErrorCount ();
|
||||||
Print (
|
Print (
|
||||||
L"\nError: Global Platform interrupt flag must be set to 1" \
|
L"\nError: Global Platform interrupt flag must be set to 1" \
|
||||||
|
@ -563,31 +563,31 @@ ParseAcpiPcct (
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (*PccSubspaceType) {
|
switch (*PccSubspaceType) {
|
||||||
case EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_GENERIC:
|
case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_GENERIC:
|
||||||
DumpPccSubspaceType0 (
|
DumpPccSubspaceType0 (
|
||||||
PccSubspacePtr,
|
PccSubspacePtr,
|
||||||
*PccSubspaceLength
|
*PccSubspaceLength
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS:
|
case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_1_HW_REDUCED_COMMUNICATIONS:
|
||||||
DumpPccSubspaceType1 (
|
DumpPccSubspaceType1 (
|
||||||
PccSubspacePtr,
|
PccSubspacePtr,
|
||||||
*PccSubspaceLength
|
*PccSubspaceLength
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS:
|
case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_2_HW_REDUCED_COMMUNICATIONS:
|
||||||
DumpPccSubspaceType2 (
|
DumpPccSubspaceType2 (
|
||||||
PccSubspacePtr,
|
PccSubspacePtr,
|
||||||
*PccSubspaceLength
|
*PccSubspaceLength
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC:
|
case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC:
|
||||||
DumpPccSubspaceType3 (
|
DumpPccSubspaceType3 (
|
||||||
PccSubspacePtr,
|
PccSubspacePtr,
|
||||||
*PccSubspaceLength
|
*PccSubspaceLength
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
case EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC:
|
case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC:
|
||||||
DumpPccSubspaceType4 (
|
DumpPccSubspaceType4 (
|
||||||
PccSubspacePtr,
|
PccSubspacePtr,
|
||||||
*PccSubspaceLength
|
*PccSubspaceLength
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/** @file
|
/** @file
|
||||||
Main file for 'acpiview' Shell command function.
|
Main file for 'acpiview' Shell command function.
|
||||||
|
|
||||||
Copyright (c) 2016 - 2020, Arm Limited. All rights reserved.<BR>
|
Copyright (c) 2016 - 2021, Arm Limited. All rights reserved.<BR>
|
||||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||||
**/
|
**/
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ ACPI_TABLE_PARSER ParserList[] = {
|
||||||
{EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE, ParseAcpiMadt},
|
{EFI_ACPI_6_2_MULTIPLE_APIC_DESCRIPTION_TABLE_SIGNATURE, ParseAcpiMadt},
|
||||||
{EFI_ACPI_6_2_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE,
|
{EFI_ACPI_6_2_PCI_EXPRESS_MEMORY_MAPPED_CONFIGURATION_SPACE_BASE_ADDRESS_DESCRIPTION_TABLE_SIGNATURE,
|
||||||
ParseAcpiMcfg},
|
ParseAcpiMcfg},
|
||||||
{EFI_ACPI_6_2_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE,
|
{EFI_ACPI_6_4_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE,
|
||||||
ParseAcpiPcct},
|
ParseAcpiPcct},
|
||||||
{EFI_ACPI_6_2_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE,
|
{EFI_ACPI_6_2_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE,
|
||||||
ParseAcpiPptt},
|
ParseAcpiPptt},
|
||||||
|
|
Loading…
Reference in New Issue