ShellPkg/AcpiView: Update field-validator prototype

As of now, the field-validator implemented by FNPTR_FIELD_VALIDATOR
function pointer takes two parameters, the pointer to the field and a
context pointer. For cases where the validator has to have access to the
length of the field, there is no clean way to currently do it. In order
to resolve this, this commit updates the field-validator's prototype to
take the length of the field as an additional parameter.

This enhancement allows field validators to perform more comprehensive
validation, especially when the length of the field is critical to the
validation logic. This change should improve the overall robustness and
flexibility of AcpiView.

Signed-off-by: Rohit Mathew <Rohit.Mathew@arm.com>
Cc: James Morse <james.Morse@arm.com>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Thomas Abraham <thomas.abraham@arm.com>
Cc: Zhichao Gao <zhichao.gao@intel.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
Rohit Mathew 2023-08-22 12:20:58 +01:00 committed by mergify[bot]
parent 29619603d2
commit 107d0c3800
19 changed files with 266 additions and 137 deletions

View File

@ -1,7 +1,7 @@
/** @file /** @file
ACPI parser ACPI parser
Copyright (c) 2016 - 2021, Arm Limited. All rights reserved. Copyright (c) 2016 - 2024, Arm Limited. All rights reserved.
Copyright (c) 2022, AMD Incorporated. All rights reserved. Copyright (c) 2022, AMD Incorporated. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
**/ **/
@ -616,7 +616,11 @@ ParseAcpi (
if (GetConsistencyChecking () && if (GetConsistencyChecking () &&
(Parser[Index].FieldValidator != NULL)) (Parser[Index].FieldValidator != NULL))
{ {
Parser[Index].FieldValidator (Ptr, Parser[Index].Context); Parser[Index].FieldValidator (
Ptr,
Parser[Index].Length,
Parser[Index].Context
);
} }
Print (L"\n"); Print (L"\n");
@ -927,7 +931,11 @@ ParseAcpiBitFields (
if (GetConsistencyChecking () && if (GetConsistencyChecking () &&
(Parser[Index].FieldValidator != NULL)) (Parser[Index].FieldValidator != NULL))
{ {
Parser[Index].FieldValidator ((UINT8 *)&Data, Parser[Index].Context); Parser[Index].FieldValidator (
(UINT8 *)&Data,
Parser[Index].Length,
Parser[Index].Context
);
} }
Print (L"\n"); Print (L"\n");

View File

@ -2,7 +2,7 @@
Header file for ACPI parser Header file for ACPI parser
Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
Copyright (c) 2016 - 2020, Arm Limited. All rights reserved. Copyright (c) 2016 - 2024, Arm Limited. All rights reserved.
Copyright (c) 2022, AMD Incorporated. All rights reserved. Copyright (c) 2022, AMD Incorporated. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
**/ **/
@ -234,11 +234,16 @@ typedef VOID (EFIAPI *FNPTR_PRINT_FORMATTER)(CONST CHAR16 *Format, UINT8 *Ptr);
This function pointer is the template for validating an ACPI table field. This function pointer is the template for validating an ACPI table field.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information as specified by @param [in] Context Pointer to context specific information as specified by
the 'Context' member of the ACPI_PARSER. the 'Context' member of the ACPI_PARSER.
e.g. this could be a pointer to the ACPI table header. e.g. this could be a pointer to the ACPI table header.
**/ **/
typedef VOID (EFIAPI *FNPTR_FIELD_VALIDATOR)(UINT8 *Ptr, VOID *Context); typedef VOID (EFIAPI *FNPTR_FIELD_VALIDATOR)(
UINT8 *Ptr,
UINT32 Length,
VOID *Context
);
/** /**
The ACPI_PARSER structure describes the fields of an ACPI table and The ACPI_PARSER structure describes the fields of an ACPI table and

View File

@ -1,7 +1,7 @@
/** @file /** @file
AEST table parser AEST table parser
Copyright (c) 2020, Arm Limited. Copyright (c) 2020 - 2024, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s): @par Reference(s):
@ -33,6 +33,7 @@ STATIC UINT8 *ProcessorResourceType;
Validate Processor Flags. Validate Processor Flags.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -41,6 +42,7 @@ VOID
EFIAPI EFIAPI
ValidateProcessorFlags ( ValidateProcessorFlags (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -59,6 +61,7 @@ ValidateProcessorFlags (
Validate GIC Interface Type. Validate GIC Interface Type.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -67,6 +70,7 @@ VOID
EFIAPI EFIAPI
ValidateGicInterfaceType ( ValidateGicInterfaceType (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -83,6 +87,7 @@ ValidateGicInterfaceType (
Validate Interface Type. Validate Interface Type.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -91,6 +96,7 @@ VOID
EFIAPI EFIAPI
ValidateInterfaceType ( ValidateInterfaceType (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -104,6 +110,7 @@ ValidateInterfaceType (
Validate Interrupt Type. Validate Interrupt Type.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -112,6 +119,7 @@ VOID
EFIAPI EFIAPI
ValidateInterruptType ( ValidateInterruptType (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -125,6 +133,7 @@ ValidateInterruptType (
Validate interrupt flags. Validate interrupt flags.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -133,6 +142,7 @@ VOID
EFIAPI EFIAPI
ValidateInterruptFlags ( ValidateInterruptFlags (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -1,7 +1,7 @@
/** @file /** @file
DBG2 table parser DBG2 table parser
Copyright (c) 2016 - 2020, ARM Limited. All rights reserved. Copyright (c) 2016 - 2024, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s): @par Reference(s):
@ -30,6 +30,7 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
This function validates the NameSpace string length. This function validates the NameSpace string length.
@param [in] Ptr Pointer to the start of the buffer. @param [in] Ptr Pointer to the start of the buffer.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -38,6 +39,7 @@ VOID
EFIAPI EFIAPI
ValidateNameSpaceStrLen ( ValidateNameSpaceStrLen (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -31,6 +31,7 @@ STATIC CONST CHAR16 *InstNameTable[] = {
This function validates the flags field in the EINJ injection header. This function validates the flags field in the EINJ injection header.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -39,6 +40,7 @@ VOID
EFIAPI EFIAPI
ValidateInjectionFlags ( ValidateInjectionFlags (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -72,6 +74,7 @@ STATIC CONST ACPI_PARSER EinjParser[] = {
the EINJ injection instruction entry. the EINJ injection instruction entry.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -80,6 +83,7 @@ VOID
EFIAPI EFIAPI
ValidateInjectionAction ( ValidateInjectionAction (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -113,6 +117,7 @@ ValidateInjectionAction (
the EINJ injection instruction entry. the EINJ injection instruction entry.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -121,6 +126,7 @@ VOID
EFIAPI EFIAPI
ValidateInstruction ( ValidateInstruction (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -141,6 +147,7 @@ ValidateInstruction (
the EINJ injection instruction entry. the EINJ injection instruction entry.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -149,6 +156,7 @@ VOID
EFIAPI EFIAPI
ValidateRegisterRegion ( ValidateRegisterRegion (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -2,7 +2,7 @@
ERST table parser ERST table parser
Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved. Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved. Copyright (c) 2016 - 2024, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s): @par Reference(s):
@ -70,6 +70,7 @@ STATIC CONST CHAR16 *ErstInstructionTable[] = {
Validate Erst action. Validate Erst action.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -78,6 +79,7 @@ VOID
EFIAPI EFIAPI
ValidateErstAction ( ValidateErstAction (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -91,6 +93,7 @@ ValidateErstAction (
Validate Erst instruction. Validate Erst instruction.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -99,6 +102,7 @@ VOID
EFIAPI EFIAPI
ValidateErstInstruction ( ValidateErstInstruction (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -112,6 +116,7 @@ ValidateErstInstruction (
Validate Erst flags. Validate Erst flags.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -120,6 +125,7 @@ VOID
EFIAPI EFIAPI
ValidateErstFlags ( ValidateErstFlags (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -1,7 +1,7 @@
/** @file /** @file
FADT table parser FADT table parser
Copyright (c) 2016 - 2020, ARM Limited. All rights reserved. Copyright (c) 2016 - 2024, Arm Limited. All rights reserved.
Copyright (c) 2022, AMD Incorporated. All rights reserved. Copyright (c) 2022, AMD Incorporated. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@ -57,6 +57,7 @@ GetAcpiXsdtHeaderInfo (
This function validates the Firmware Control Field. This function validates the Firmware Control Field.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -65,6 +66,7 @@ VOID
EFIAPI EFIAPI
ValidateFirmwareCtrl ( ValidateFirmwareCtrl (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -83,6 +85,7 @@ ValidateFirmwareCtrl (
This function validates the X_Firmware Control Field. This function validates the X_Firmware Control Field.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -91,6 +94,7 @@ VOID
EFIAPI EFIAPI
ValidateXFirmwareCtrl ( ValidateXFirmwareCtrl (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -109,6 +113,7 @@ ValidateXFirmwareCtrl (
This function validates the flags. This function validates the flags.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -117,6 +122,7 @@ VOID
EFIAPI EFIAPI
ValidateFlags ( ValidateFlags (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -1,7 +1,7 @@
/** @file /** @file
GTDT table parser GTDT table parser
Copyright (c) 2016 - 2021, ARM Limited. All rights reserved. Copyright (c) 2016 - 2024, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s): @par Reference(s):
@ -30,6 +30,7 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
This function validates the GT Block timer count. This function validates the GT Block timer count.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -38,6 +39,7 @@ VOID
EFIAPI EFIAPI
ValidateGtBlockTimerCount ( ValidateGtBlockTimerCount (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -59,6 +61,7 @@ ValidateGtBlockTimerCount (
This function validates the GT Frame Number. This function validates the GT Frame Number.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -67,6 +70,7 @@ VOID
EFIAPI EFIAPI
ValidateGtFrameNumber ( ValidateGtFrameNumber (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -113,6 +113,7 @@ STATIC CONST ACPI_PARSER HestErrorNotificationCweParser[] = {
This function validates the Type field of Hardware Error Notification Structure This function validates the Type field of Hardware Error Notification Structure
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -121,6 +122,7 @@ VOID
EFIAPI EFIAPI
ValidateErrorNotificationType ( ValidateErrorNotificationType (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -246,6 +248,7 @@ STATIC CONST ACPI_PARSER HestErrorNotificationParser[] = {
pci related Error source structure's bus field. pci related Error source structure's bus field.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -254,6 +257,7 @@ VOID
EFIAPI EFIAPI
ValidatePciBusReservedBits ( ValidatePciBusReservedBits (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -277,6 +281,7 @@ STATIC CONST ACPI_PARSER HestErrorSourcePciCommonBusParser[] = {
error source descriptor structure. error source descriptor structure.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -285,6 +290,7 @@ VOID
EFIAPI EFIAPI
ValidateIA32ErrorSourceFlags ( ValidateIA32ErrorSourceFlags (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -313,6 +319,7 @@ ValidateIA32ErrorSourceFlags (
error source descriptor structure. error source descriptor structure.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -321,6 +328,7 @@ VOID
EFIAPI EFIAPI
ValidatePciErrorSourceFlags ( ValidatePciErrorSourceFlags (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -342,6 +350,7 @@ ValidatePciErrorSourceFlags (
error source descriptor structure. error source descriptor structure.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -350,6 +359,7 @@ VOID
EFIAPI EFIAPI
ValidateGhesSourceFlags ( ValidateGhesSourceFlags (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -368,6 +378,7 @@ ValidateGhesSourceFlags (
structure. structure.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -376,6 +387,7 @@ VOID
EFIAPI EFIAPI
ValidateEnabledField ( ValidateEnabledField (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -391,6 +403,7 @@ ValidateEnabledField (
structure. structure.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -399,6 +412,7 @@ VOID
EFIAPI EFIAPI
ValidateRecordCount ( ValidateRecordCount (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -1,7 +1,7 @@
/** @file /** @file
HMAT table parser HMAT table parser
Copyright (c) 2020, Arm Limited. Copyright (c) 2020 - 2024, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s): @par Reference(s):
@ -54,6 +54,7 @@ STATIC CONST CHAR16 *SllbiNames[] = {
This function validates the Cache Attributes field. This function validates the Cache Attributes field.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -62,6 +63,7 @@ VOID
EFIAPI EFIAPI
ValidateCacheAttributes ( ValidateCacheAttributes (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -1,6 +1,7 @@
/** @file /** @file
HPET table parser HPET table parser
Copyright (c) 2024, Arm Limited. All rights reserved.
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@ -121,6 +122,7 @@ DumpCounterSize (
This function validates the flags. This function validates the flags.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -129,6 +131,7 @@ VOID
EFIAPI EFIAPI
ValidateHpetRevId ( ValidateHpetRevId (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -1,7 +1,7 @@
/** @file /** @file
IORT table parser IORT table parser
Copyright (c) 2016 - 2022, Arm Limited. All rights reserved. Copyright (c) 2016 - 2024, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s): @par Reference(s):
@ -46,6 +46,7 @@ STATIC CONST UINT32 *RmrMemDescOffset;
This function validates the ID Mapping array count for the ITS node. This function validates the ID Mapping array count for the ITS node.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -54,6 +55,7 @@ VOID
EFIAPI EFIAPI
ValidateItsIdMappingCount ( ValidateItsIdMappingCount (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -68,6 +70,7 @@ ValidateItsIdMappingCount (
Monitoring Counter Group (PMCG) node. Monitoring Counter Group (PMCG) node.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -76,6 +79,7 @@ VOID
EFIAPI EFIAPI
ValidatePmcgIdMappingCount ( ValidatePmcgIdMappingCount (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -89,6 +93,7 @@ ValidatePmcgIdMappingCount (
This function validates the ID Mapping array offset for the ITS node. This function validates the ID Mapping array offset for the ITS node.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -97,6 +102,7 @@ VOID
EFIAPI EFIAPI
ValidateItsIdArrayReference ( ValidateItsIdArrayReference (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -111,6 +117,7 @@ ValidateItsIdArrayReference (
and is 64K aligned. and is 64K aligned.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -119,6 +126,7 @@ VOID
EFIAPI EFIAPI
ValidatePhysicalRange ( ValidatePhysicalRange (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -135,6 +143,7 @@ ValidatePhysicalRange (
This function validates that the RMR memory range descriptor count. This function validates that the RMR memory range descriptor count.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -143,6 +152,7 @@ VOID
EFIAPI EFIAPI
ValidateRmrMemDescCount ( ValidateRmrMemDescCount (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -1,7 +1,7 @@
/** @file /** @file
MADT table parser MADT table parser
Copyright (c) 2016 - 2023, ARM Limited. All rights reserved. Copyright (c) 2016 - 2024, Arm Limited. All rights reserved.
Copyright (c) 2022, AMD Incorporated. All rights reserved. Copyright (c) 2022, AMD Incorporated. All rights reserved.
Copyright (c) 2024, Loongson Technology Corporation Limited. All rights reserved. Copyright (c) 2024, Loongson Technology Corporation Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@ -29,6 +29,7 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
This function validates the System Vector Base in the GICD. This function validates the System Vector Base in the GICD.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -37,6 +38,7 @@ VOID
EFIAPI EFIAPI
ValidateGICDSystemVectorBase ( ValidateGICDSystemVectorBase (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -52,6 +54,7 @@ ValidateGICDSystemVectorBase (
This function validates the SPE Overflow Interrupt in the GICC. This function validates the SPE Overflow Interrupt in the GICC.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -60,6 +63,7 @@ VOID
EFIAPI EFIAPI
ValidateSpeOverflowInterrupt ( ValidateSpeOverflowInterrupt (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -102,6 +106,7 @@ ValidateSpeOverflowInterrupt (
This function validates the TRBE Interrupt in the GICC. This function validates the TRBE Interrupt in the GICC.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -110,6 +115,7 @@ VOID
EFIAPI EFIAPI
ValidateTrbeInterrupt ( ValidateTrbeInterrupt (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -1,7 +1,7 @@
/** @file /** @file
PCCT table parser PCCT table parser
Copyright (c) 2021, Arm Limited. Copyright (c) 2021 - 2024, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s): @par Reference(s):
@ -28,6 +28,7 @@ STATIC UINT8 *ExtendedPccSubspaceInterruptFlags;
This function validates the length coded on 4 bytes of a shared memory range This function validates the length coded on 4 bytes of a shared memory range
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -36,6 +37,7 @@ VOID
EFIAPI EFIAPI
ValidateRangeLength4 ( ValidateRangeLength4 (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -54,6 +56,7 @@ ValidateRangeLength4 (
This function validates the length coded on 8 bytes of a shared memory range This function validates the length coded on 8 bytes of a shared memory range
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -62,6 +65,7 @@ VOID
EFIAPI EFIAPI
ValidateRangeLength8 ( ValidateRangeLength8 (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -80,6 +84,7 @@ ValidateRangeLength8 (
This function validates address space for Memory/IO GAS. This function validates address space for Memory/IO GAS.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -88,6 +93,7 @@ VOID
EFIAPI EFIAPI
ValidatePccMemoryIoGas ( ValidatePccMemoryIoGas (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -107,6 +113,7 @@ ValidatePccMemoryIoGas (
This function validates address space for structures of types other than 0. This function validates address space for structures of types other than 0.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -115,6 +122,7 @@ VOID
EFIAPI EFIAPI
ValidatePccGas ( ValidatePccGas (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -135,6 +143,7 @@ ValidatePccGas (
This function validates doorbell address space for type 4 structure. This function validates doorbell address space for type 4 structure.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -143,6 +152,7 @@ VOID
EFIAPI EFIAPI
ValidatePccDoorbellGas ( ValidatePccDoorbellGas (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -158,7 +168,7 @@ ValidatePccDoorbellGas (
} }
} }
ValidatePccGas (Ptr, Context); ValidatePccGas (Ptr, Length, Context);
} }
/** /**
@ -166,6 +176,7 @@ ValidatePccDoorbellGas (
type 4 structure. type 4 structure.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -174,6 +185,7 @@ VOID
EFIAPI EFIAPI
ValidatePccIntAckGas ( ValidatePccIntAckGas (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -196,13 +208,14 @@ ValidatePccIntAckGas (
} }
} }
ValidatePccGas (Ptr, Context); ValidatePccGas (Ptr, Length, Context);
} }
/** /**
This function validates error status address space for type 4 structure. This function validates error status address space for type 4 structure.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -211,6 +224,7 @@ VOID
EFIAPI EFIAPI
ValidatePccErrStatusGas ( ValidatePccErrStatusGas (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -219,13 +233,14 @@ ValidatePccErrStatusGas (
return; return;
} }
ValidatePccGas (Ptr, Context); ValidatePccGas (Ptr, Length, Context);
} }
/** /**
This function validates platform interrupt flags for type 4 structure. This function validates platform interrupt flags for type 4 structure.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -234,6 +249,7 @@ VOID
EFIAPI EFIAPI
ValidatePlatInterrupt ( ValidatePlatInterrupt (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -1,7 +1,7 @@
/** @file /** @file
PPTT table parser PPTT table parser
Copyright (c) 2019 - 2021, ARM Limited. All rights reserved. Copyright (c) 2019 - 2024, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s): @par Reference(s):
@ -52,6 +52,7 @@ LogCacheFlagError (
This function validates the Cache Type Structure (Type 1) Cache Flags field. This function validates the Cache Type Structure (Type 1) Cache Flags field.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -60,6 +61,7 @@ VOID
EFIAPI EFIAPI
ValidateCacheFlags ( ValidateCacheFlags (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -115,6 +117,7 @@ ValidateCacheFlags (
field. field.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -123,6 +126,7 @@ VOID
EFIAPI EFIAPI
ValidateCacheNumberOfSets ( ValidateCacheNumberOfSets (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -166,6 +170,7 @@ ValidateCacheNumberOfSets (
field. field.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -174,6 +179,7 @@ VOID
EFIAPI EFIAPI
ValidateCacheAssociativity ( ValidateCacheAssociativity (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -192,6 +198,7 @@ ValidateCacheAssociativity (
This function validates the Cache Type Structure (Type 1) Line size field. This function validates the Cache Type Structure (Type 1) Line size field.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -200,6 +207,7 @@ VOID
EFIAPI EFIAPI
ValidateCacheLineSize ( ValidateCacheLineSize (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -237,6 +245,7 @@ ValidateCacheLineSize (
This function validates the Cache Type Structure (Type 1) Cache ID field. This function validates the Cache Type Structure (Type 1) Cache ID field.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -245,6 +254,7 @@ VOID
EFIAPI EFIAPI
ValidateCacheId ( ValidateCacheId (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -276,6 +286,7 @@ ValidateCacheId (
This function validates the Cache Type Structure (Type 1) Attributes field. This function validates the Cache Type Structure (Type 1) Attributes field.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -284,6 +295,7 @@ VOID
EFIAPI EFIAPI
ValidateCacheAttributes ( ValidateCacheAttributes (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -1,7 +1,7 @@
/** @file /** @file
RSDP table parser RSDP table parser
Copyright (c) 2016 - 2019, ARM Limited. All rights reserved. Copyright (c) 2016 - 2024, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s): @par Reference(s):
@ -19,6 +19,7 @@ STATIC CONST UINT64 *XsdtAddress;
This function validates the RSDT Address. This function validates the RSDT Address.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -27,6 +28,7 @@ VOID
EFIAPI EFIAPI
ValidateRsdtAddress ( ValidateRsdtAddress (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -55,6 +57,7 @@ ValidateRsdtAddress (
This function validates the XSDT Address. This function validates the XSDT Address.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -63,6 +66,7 @@ VOID
EFIAPI EFIAPI
ValidateXsdtAddress ( ValidateXsdtAddress (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -1,7 +1,7 @@
/** @file /** @file
SPCR table parser SPCR table parser
Copyright (c) 2016 - 2019, ARM Limited. All rights reserved. Copyright (c) 2016 - 2024, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s): @par Reference(s):
@ -22,6 +22,7 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
This function validates the Interrupt Type. This function validates the Interrupt Type.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -30,6 +31,7 @@ VOID
EFIAPI EFIAPI
ValidateInterruptType ( ValidateInterruptType (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -55,6 +57,7 @@ ValidateInterruptType (
This function validates the Irq. This function validates the Irq.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -63,6 +66,7 @@ VOID
EFIAPI EFIAPI
ValidateIrq ( ValidateIrq (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -1,7 +1,7 @@
/** @file /** @file
SRAT table parser SRAT table parser
Copyright (c) 2016 - 2020, ARM Limited. All rights reserved. Copyright (c) 2016 - 2024, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@par Reference(s): @par Reference(s):
@ -25,6 +25,7 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
This function validates the Reserved field in the SRAT table header. This function validates the Reserved field in the SRAT table header.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -33,6 +34,7 @@ VOID
EFIAPI EFIAPI
ValidateSratReserved ( ValidateSratReserved (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -47,6 +49,7 @@ ValidateSratReserved (
Affinity Structure. Affinity Structure.
@param [in] Ptr Pointer to the start of the field data. @param [in] Ptr Pointer to the start of the field data.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -55,6 +58,7 @@ VOID
EFIAPI EFIAPI
ValidateSratDeviceHandleType ( ValidateSratDeviceHandleType (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {

View File

@ -1,6 +1,7 @@
/** @file /** @file
WSMT table parser WSMT table parser
Copyright (c) 2024, Arm Limited. All rights reserved.
Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved. Copyright (C) 2024 Advanced Micro Devices, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent SPDX-License-Identifier: BSD-2-Clause-Patent
@ -18,6 +19,7 @@ STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
This function validates the WSMT Protection flag. This function validates the WSMT Protection flag.
@param [in] Ptr Pointer to the start of the buffer. @param [in] Ptr Pointer to the start of the buffer.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
@ -27,6 +29,7 @@ VOID
EFIAPI EFIAPI
ValidateWsmtProtectionFlag ( ValidateWsmtProtectionFlag (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {
@ -50,6 +53,7 @@ ValidateWsmtProtectionFlag (
This function validates the reserved bits in the WSMT Protection flag. This function validates the reserved bits in the WSMT Protection flag.
@param [in] Ptr Pointer to the start of the buffer. @param [in] Ptr Pointer to the start of the buffer.
@param [in] Length Length of the field.
@param [in] Context Pointer to context specific information e.g. this @param [in] Context Pointer to context specific information e.g. this
could be a pointer to the ACPI table header. could be a pointer to the ACPI table header.
**/ **/
@ -58,6 +62,7 @@ VOID
EFIAPI EFIAPI
ValidateReserved ( ValidateReserved (
IN UINT8 *Ptr, IN UINT8 *Ptr,
IN UINT32 Length,
IN VOID *Context IN VOID *Context
) )
{ {