[edk2-devel] [PATCH v1 1/2] ShellPkg: Update Acpiview PCCT parser to ACPI 6.4
Chris Jones
christopher.jones at arm.com
Fri Aug 13 17:02:44 UTC 2021
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 at arm.com>
---
ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c | 46 ++++++++++----------
ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c | 4 +-
2 files changed, 25 insertions(+), 25 deletions(-)
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c
index ca553d5953f05651d8df4c95d1e39a73eded5129..7d3a2dd10dc928265bad3711e929d96c1ed40b1d 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c
@@ -1,11 +1,11 @@
/** @file
PCCT table parser
- Copyright (c) 2020, Arm Limited.
+ Copyright (c) 2021, Arm Limited.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
- - ACPI 6.3 Specification - January 2019
+ - ACPI 6.4 Specification - January 2021
**/
#include <Library/BaseMemoryLib.h>
@@ -93,9 +93,9 @@ ValidatePccType0Gas (
{
switch (*(UINT8*)Ptr) {
#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))
- case EFI_ACPI_6_3_SYSTEM_MEMORY:
+ case EFI_ACPI_6_4_SYSTEM_MEMORY:
return;
default:
IncrementErrorCount ();
@@ -120,10 +120,10 @@ ValidatePccGas (
{
switch (*(UINT8*)Ptr) {
#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))
- case EFI_ACPI_6_3_FUNCTIONAL_FIXED_HARDWARE:
- case EFI_ACPI_6_3_SYSTEM_MEMORY:
+ case EFI_ACPI_6_4_FUNCTIONAL_FIXED_HARDWARE:
+ case EFI_ACPI_6_4_SYSTEM_MEMORY:
return;
default:
IncrementErrorCount ();
@@ -148,10 +148,10 @@ ValidatePccDoorbellGas (
{
// For slave subspaces this field is optional, if not present the field
// 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 (
Ptr,
- sizeof (EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE)
+ sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE)
)) {
return;
}
@@ -180,14 +180,14 @@ ValidatePccIntAckGas (
// edge driven the register may be omitted. A value of 0x0 on all
// 12 bytes of the GAS structure indicates the register is not
// present.
- if (((*PccGlobalFlags & EFI_ACPI_6_3_PCCT_FLAGS_PLATFORM_INTERRUPT) !=
- EFI_ACPI_6_3_PCCT_FLAGS_PLATFORM_INTERRUPT) ||
+ if (((*PccGlobalFlags & EFI_ACPI_6_4_PCCT_FLAGS_PLATFORM_INTERRUPT) !=
+ EFI_ACPI_6_4_PCCT_FLAGS_PLATFORM_INTERRUPT) ||
((*ExtendedPccSubspaceInterruptFlags &
- EFI_ACPI_6_3_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) ==
+ EFI_ACPI_6_4_PCCT_SUBSPACE_PLATFORM_INTERRUPT_FLAGS_MODE)) {
if (IsZeroBuffer (
Ptr,
- sizeof (EFI_ACPI_6_3_GENERIC_ADDRESS_STRUCTURE)
+ sizeof (EFI_ACPI_6_4_GENERIC_ADDRESS_STRUCTURE)
)) {
return;
}
@@ -212,7 +212,7 @@ ValidatePccErrStatusGas (
)
{
// 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;
}
@@ -236,9 +236,9 @@ ValidatePlatInterrupt (
{
// If a slave subspace is present in the PCCT, then the global Platform
// Interrupt flag must be set to 1.
- if ((*PccSubspaceType == EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC) &&
- ((*PccGlobalFlags & EFI_ACPI_6_3_PCCT_FLAGS_PLATFORM_INTERRUPT) !=
- EFI_ACPI_6_3_PCCT_FLAGS_PLATFORM_INTERRUPT)) {
+ if ((*PccSubspaceType == EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC) &&
+ ((*PccGlobalFlags & EFI_ACPI_6_4_PCCT_FLAGS_PLATFORM_INTERRUPT) !=
+ EFI_ACPI_6_4_PCCT_FLAGS_PLATFORM_INTERRUPT)) {
IncrementErrorCount ();
Print (
L"\nError: Global Platform interrupt flag must be set to 1" \
@@ -563,31 +563,31 @@ ParseAcpiPcct (
}
switch (*PccSubspaceType) {
- case EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_GENERIC:
+ case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_GENERIC:
DumpPccSubspaceType0 (
PccSubspacePtr,
*PccSubspaceLength
);
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 (
PccSubspacePtr,
*PccSubspaceLength
);
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 (
PccSubspacePtr,
*PccSubspaceLength
);
break;
- case EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC:
+ case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_3_EXTENDED_PCC:
DumpPccSubspaceType3 (
PccSubspacePtr,
*PccSubspaceLength
);
break;
- case EFI_ACPI_6_3_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC:
+ case EFI_ACPI_6_4_PCCT_SUBSPACE_TYPE_4_EXTENDED_PCC:
DumpPccSubspaceType4 (
PccSubspacePtr,
*PccSubspaceLength
diff --git a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c
index b30ed3fc8597b229dd15b6ad4f2aab2e3d0ca583..c81e5220272ae94448203ee02ea5caacb606842c 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/UefiShellAcpiViewCommandLib.c
@@ -1,7 +1,7 @@
/** @file
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
**/
@@ -60,7 +60,7 @@ ACPI_TABLE_PARSER ParserList[] = {
{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,
ParseAcpiMcfg},
- {EFI_ACPI_6_2_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE,
+ {EFI_ACPI_6_4_PLATFORM_COMMUNICATIONS_CHANNEL_TABLE_SIGNATURE,
ParseAcpiPcct},
{EFI_ACPI_6_2_PROCESSOR_PROPERTIES_TOPOLOGY_TABLE_STRUCTURE_SIGNATURE,
ParseAcpiPptt},
--
Guid("CE165669-3EF3-493F-B85D-6190EE5B9759")
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#79287): https://edk2.groups.io/g/devel/message/79287
Mute This Topic: https://groups.io/mt/84868168/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-
More information about the edk2-devel-archive
mailing list