/**
The ACPI_PARSER structure describes the fields of an ACPI table and
diff --git
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Aest/AestParser.c
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Aest/AestParser.c
index 48f71484fb..a37927b107 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Aest/AestParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Aest/AestParser.c
@@ -1,7 +1,7 @@
/** @file
AEST table parser
- Copyright (c) 2020, Arm Limited.
+ Copyright (c) 2023, Arm Limited.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
@@ -35,13 +35,15 @@ STATIC UINT8 *ProcessorResourceType;
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateProcessorFlags (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
// If the global or shared node flag is set then the ACPI Processor ID
@@ -61,13 +63,15 @@ ValidateProcessorFlags (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateGicInterfaceType (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
UINT32 GicInterfaceType;
@@ -85,13 +89,15 @@ ValidateGicInterfaceType (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateInterfaceType (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
if (*Ptr > 1) {
@@ -106,13 +112,15 @@ ValidateInterfaceType (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateInterruptType (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
if (*Ptr > 1) {
@@ -127,13 +135,15 @@ ValidateInterruptType (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateInterruptFlags (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
if ((*Ptr & 0xfe) != 0) {
diff --git
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c
index d25d4d84f8..4400b55553 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Dbg2/Dbg2Parser.c
@@ -1,7 +1,7 @@
/** @file
DBG2 table parser
- Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.
+ Copyright (c) 2016 - 2023, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
@@ -32,13 +32,15 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
@param [in] Ptr Pointer to the start of the buffer.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateNameSpaceStrLen (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
UINT16 NameSpaceStrLen;
diff --git
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Erst/ErstParser.c
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Erst/ErstParser.c
index f3ae09309c..f9f08732ca 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Erst/ErstParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Erst/ErstParser.c
@@ -2,7 +2,7 @@
ERST table parser
Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
- Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
+ Copyright (c) 2016 - 2023, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
@@ -72,13 +72,15 @@ STATIC CONST CHAR16 *ErstInstructionTable[] = {
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateErstAction (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
if (*Ptr > EFI_ACPI_6_4_ERST_GET_EXECUTE_OPERATION_TIMINGS) {
@@ -93,13 +95,15 @@ ValidateErstAction (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateErstInstruction (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
if (*Ptr > EFI_ACPI_6_4_ERST_MOVE_DATA) {
@@ -114,13 +118,15 @@ ValidateErstInstruction (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateErstFlags (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
if ((*Ptr & 0xfe) != 0) {
diff --git
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtParser.c
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtParser.c
index abc58d6552..f03b99ebde 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Fadt/FadtParser.c
@@ -1,7 +1,7 @@
/** @file
FADT table parser
- Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.
+ Copyright (c) 2016 - 2023, ARM Limited. All rights reserved.
Copyright (c) 2022, AMD Incorporated. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -59,13 +59,15 @@ GetAcpiXsdtHeaderInfo (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateFirmwareCtrl (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
#if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
@@ -85,13 +87,15 @@ ValidateFirmwareCtrl (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateXFirmwareCtrl (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
#if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
@@ -111,13 +115,15 @@ ValidateXFirmwareCtrl (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateFlags (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
#if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
diff --git
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c
index e62927098a..29bd781465 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Gtdt/GtdtParser.c
@@ -1,7 +1,7 @@
/** @file
GTDT table parser
- Copyright (c) 2016 - 2021, ARM Limited. All rights reserved.
+ Copyright (c) 2016 - 2023, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
@@ -32,13 +32,15 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateGtBlockTimerCount (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
UINT32 BlockTimerCount;
@@ -61,13 +63,15 @@ ValidateGtBlockTimerCount (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateGtFrameNumber (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
UINT8 FrameNumber;
diff --git
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Hmat/HmatParser.c
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Hmat/HmatParser.c
index 2a1357c853..de8e9cf01f 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Hmat/HmatParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Hmat/HmatParser.c
@@ -1,7 +1,7 @@
/** @file
HMAT table parser
- Copyright (c) 2020, Arm Limited.
+ Copyright (c) 2023, Arm Limited.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
@@ -56,13 +56,15 @@ STATIC CONST CHAR16 *SllbiNames[] = {
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateCacheAttributes (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
EFI_ACPI_6_4_HMAT_STRUCTURE_MEMORY_SIDE_CACHE_INFO_CACHE_ATTRIBUTES *
diff --git
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c
index 599cf0ee8f..122e087eed 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Iort/IortParser.c
@@ -1,7 +1,7 @@
/** @file
IORT table parser
- Copyright (c) 2016 - 2022, Arm Limited. All rights reserved.
+ Copyright (c) 2016 - 2023, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
@@ -48,13 +48,15 @@ STATIC CONST UINT32 *RmrMemDescOffset;
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateItsIdMappingCount (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
if (*(UINT32 *)Ptr != 0) {
@@ -70,13 +72,15 @@ ValidateItsIdMappingCount (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidatePmcgIdMappingCount (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
if (*(UINT32 *)Ptr > 1) {
@@ -91,13 +95,15 @@ ValidatePmcgIdMappingCount (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateItsIdArrayReference (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
if (*(UINT32 *)Ptr != 0) {
@@ -113,13 +119,15 @@ ValidateItsIdArrayReference (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidatePhysicalRange (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
UINT64 Value;
@@ -137,13 +145,15 @@ ValidatePhysicalRange (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateRmrMemDescCount (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
if (*(UINT32 *)Ptr == 0) {
diff --git
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c
index 41edcb9ffd..3633329bea 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Madt/MadtParser.c
@@ -1,7 +1,7 @@
/** @file
MADT table parser
- Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.
+ Copyright (c) 2016 - 2023, ARM Limited. All rights reserved.
Copyright (c) 2022, AMD Incorporated. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@@ -30,13 +30,15 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateGICDSystemVectorBase (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
if (*(UINT32 *)Ptr != 0) {
@@ -53,13 +55,15 @@ ValidateGICDSystemVectorBase (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateSpeOverflowInterrupt (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
UINT16 SpeOverflowInterrupt;
diff --git
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c
index 8ad39090af..5d350ae16d 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pcct/PcctParser.c
@@ -1,7 +1,7 @@
/** @file
PCCT table parser
- Copyright (c) 2021, Arm Limited.
+ Copyright (c) 2023, Arm Limited.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
@@ -30,13 +30,15 @@ STATIC UINT8 *ExtendedPccSubspaceInterruptFlags;
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateRangeLength4 (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
if (*(UINT32 *)Ptr < MIN_EXT_PCC_SUBSPACE_MEM_RANGE_LEN) {
@@ -56,13 +58,15 @@ ValidateRangeLength4 (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateRangeLength8 (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
if (*(UINT64 *)Ptr <= MIN_MEMORY_RANGE_LENGTH) {
@@ -82,13 +86,15 @@ ValidateRangeLength8 (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidatePccMemoryIoGas (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
switch (*(UINT8 *)Ptr) {
@@ -109,13 +115,15 @@ ValidatePccMemoryIoGas (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidatePccGas (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
switch (*(UINT8 *)Ptr) {
@@ -137,13 +145,15 @@ ValidatePccGas (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidatePccDoorbellGas (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
// For responder subspaces this field is optional, if not present the field
@@ -158,7 +168,7 @@ ValidatePccDoorbellGas (
}
}
- ValidatePccGas (Ptr, Context);
+ ValidatePccGas (Ptr, Context, Length);
}
/**
@@ -168,13 +178,15 @@ ValidatePccDoorbellGas (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidatePccIntAckGas (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
// If the subspace does not support interrupts or the interrupt is
@@ -196,7 +208,7 @@ ValidatePccIntAckGas (
}
}
- ValidatePccGas (Ptr, Context);
+ ValidatePccGas (Ptr, Context, Length);
}
/**
@@ -205,13 +217,15 @@ ValidatePccIntAckGas (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidatePccErrStatusGas (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
// This field is ignored by the OSPM on responder channels.
@@ -219,7 +233,7 @@ ValidatePccErrStatusGas (
return;
}
- ValidatePccGas (Ptr, Context);
+ ValidatePccGas (Ptr, Context, Length);
}
/**
@@ -228,13 +242,15 @@ ValidatePccErrStatusGas (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidatePlatInterrupt (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
// If a responder subspace is present in the PCCT, then the global Platform
diff --git
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c
index 5377764458..a079d2498f 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Pptt/PpttParser.c
@@ -1,7 +1,7 @@
/** @file
PPTT table parser
- Copyright (c) 2019 - 2021, ARM Limited. All rights reserved.
+ Copyright (c) 2019 - 2023, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
@@ -54,13 +54,15 @@ LogCacheFlagError (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateCacheFlags (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
#if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
@@ -117,13 +119,15 @@ ValidateCacheFlags (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateCacheNumberOfSets (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
UINT32 NumberOfSets;
@@ -168,13 +172,15 @@ ValidateCacheNumberOfSets (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateCacheAssociativity (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
UINT8 Associativity;
@@ -194,13 +200,15 @@ ValidateCacheAssociativity (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateCacheLineSize (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
#if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
@@ -239,13 +247,15 @@ ValidateCacheLineSize (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateCacheId (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
UINT32 CacheId;
@@ -278,13 +288,15 @@ ValidateCacheId (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateCacheAttributes (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
// Reference: Advanced Configuration and Power Interface (ACPI)
Specification
diff --git
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c
index bddf276356..8d58392b08 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Rsdp/RsdpParser.c
@@ -1,7 +1,7 @@
/** @file
RSDP table parser
- Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.
+ Copyright (c) 2016 - 2023, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
@@ -21,13 +21,15 @@ STATIC CONST UINT64 *XsdtAddress;
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateRsdtAddress (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
#if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
@@ -57,13 +59,15 @@ ValidateRsdtAddress (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateXsdtAddress (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
#if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
diff --git
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParser.c
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParser.c
index e5267b1d04..60522dd408 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Spcr/SpcrParser.c
@@ -1,7 +1,7 @@
/** @file
SPCR table parser
- Copyright (c) 2016 - 2019, ARM Limited. All rights reserved.
+ Copyright (c) 2016 - 2023, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
@@ -24,13 +24,15 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateInterruptType (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
#if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
@@ -57,13 +59,15 @@ ValidateInterruptType (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateIrq (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
#if defined (MDE_CPU_ARM) || defined (MDE_CPU_AARCH64)
diff --git
a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c
b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c
index 2980704479..76534ccee3 100644
--- a/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c
+++ b/ShellPkg/Library/UefiShellAcpiViewCommandLib/Parsers/Srat/SratParser.c
@@ -1,7 +1,7 @@
/** @file
SRAT table parser
- Copyright (c) 2016 - 2020, ARM Limited. All rights reserved.
+ Copyright (c) 2016 - 2023, ARM Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s):
@@ -27,13 +27,15 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateSratReserved (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
if (*(UINT32 *)Ptr != 1) {
@@ -49,13 +51,15 @@ ValidateSratReserved (
@param [in] Ptr Pointer to the start of the field data.
@param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header.
+ @param [in] Length Length of the field.
**/
STATIC
VOID
EFIAPI
ValidateSratDeviceHandleType (
- IN UINT8 *Ptr,
- IN VOID *Context
+ IN UINT8 *Ptr,
+ IN VOID *Context,
+ IN UINT32 Length
)
{
UINT8 DeviceHandleType;