Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions ShellPkg/Library/UefiShellAcpiViewCommandLib/AcpiParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -668,6 +668,25 @@ ParseAcpiBgrt (
IN UINT8 AcpiTableRevision
);

/**
This function parses the ACPI CCEL table.
When trace is enabled this function parses the CCEL table and
traces the ACPI table fields.

@param [in] Trace If TRUE, trace the ACPI fields.
@param [in] Ptr Pointer to the start of the buffer.
@param [in] AcpiTableLength Length of the ACPI table.
@param [in] AcpiTableRevision Revision of the ACPI table.
**/
VOID
EFIAPI
ParseAcpiCcel (
IN BOOLEAN Trace,
IN UINT8 *Ptr,
IN UINT32 AcpiTableLength,
IN UINT8 AcpiTableRevision
);

/**
This function parses the ACPI DBG2 table.
When trace is enabled this function parses the DBG2 table and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
The maximum number of ACPI table parsers.
*/
#define MAX_ACPI_TABLE_PARSERS 32
#define MAX_ACPI_TABLE_PARSERS 128

/** An invalid/NULL signature value.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/** @file
CCEL table parser

Copyright (c) 2025, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

@par Reference(s):
- ACPI 6.5 Specification - 29 Aug 2022
**/

#include <IndustryStandard/Acpi.h>
#include <Library/UefiLib.h>
#include "AcpiParser.h"
#include "AcpiTableParser.h"
#include "AcpiViewConfig.h"

// Local variables.
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;

/**
An ACPI_PARSER array describing the ACPI CCEL Table.
**/
STATIC CONST ACPI_PARSER CcelParser[] = {
PARSE_ACPI_HEADER (&AcpiHdrInfo),
{ L"CC Type", 1, 36, L"%d", NULL, NULL, NULL, NULL },
{ L"CC Subtype", 1, 37, L"%d", NULL, NULL, NULL, NULL },
{ L"Reserved", 2, 38, L"0x%x", NULL, NULL, NULL, NULL },
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT:
There is a generic DumpReserved() function and some other parsers validate the Reserved fields with a static ValidateResField() for instance.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack.
Actually ValidateResField () is local to ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Agdi/AgdiParser.c so would need to move to AcpiParser.c. Also it may need some fixing.

{ L"Log Area Minimum Length (LAML)",8, 40, L"0x%lx", NULL, NULL, NULL, NULL },
{ L"Log Area Start Address (LASA)",8, 48, L"0x%lx", NULL, NULL, NULL, NULL }
};

/**
This function parses the ACPI CCEL table.
When trace is enabled this function parses the CCEL table and
traces the ACPI table fields.

@param [in] Trace If TRUE, trace the ACPI fields.
@param [in] Ptr Pointer to the start of the buffer.
@param [in] AcpiTableLength Length of the ACPI table.
@param [in] AcpiTableRevision Revision of the ACPI table.
**/
VOID
EFIAPI
ParseAcpiCcel (
IN BOOLEAN Trace,
IN UINT8 *Ptr,
IN UINT32 AcpiTableLength,
IN UINT8 AcpiTableRevision
)
{
if (!Trace) {
return;
}

ParseAcpi (
TRUE,
0,
"CCEL",
Ptr,
AcpiTableLength,
PARSER_PARAMS (CcelParser)
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ ACPI_TABLE_PARSER ParserList[] = {
{ EFI_ACPI_ARM_AGDI_TABLE_SIGNATURE, ParseAcpiAgdi },
{ EFI_ACPI_6_4_ARM_PERFORMANCE_MONITORING_UNIT_TABLE_SIGNATURE, ParseAcpiApmt },
{ EFI_ACPI_6_2_BOOT_GRAPHICS_RESOURCE_TABLE_SIGNATURE, ParseAcpiBgrt },
{ EFI_ACPI_6_5_CONFIDENTIAL_COMPUTE_EVENT_LOG_TABLE_SIGNATURE, ParseAcpiCcel },
{ EFI_ACPI_6_2_DEBUG_PORT_2_TABLE_SIGNATURE, ParseAcpiDbg2 },
{ EFI_ACPI_6_2_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE,
ParseAcpiDsdt },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
Parsers/Agdi/AgdiParser.c
Parsers/Apmt/ApmtParser.c
Parsers/Bgrt/BgrtParser.c
Parsers/Ccel/CcelParser.c
Parsers/Dbg2/Dbg2Parser.c
Parsers/Dsdt/DsdtParser.c
Parsers/Einj/EinjParser.c
Expand Down
Loading