ShellPkg/UefiShellAcpiViewCommandLib: Fix ECC issues
Make the function comments follow EDK2 coding style. Cc: Sami Mujawar <sami.mujawar@arm.com> Cc: Evan Lloyd <evan.lloyd@arm.com> Cc: Jaben Carsey <jaben.carsey@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
BGRT table parser
|
||||
|
||||
Copyright (c) 2017 - 2018, ARM Limited. All rights reserved.
|
||||
@ -22,8 +22,9 @@
|
||||
// Local variables
|
||||
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
|
||||
|
||||
/** An ACPI_PARSER array describing the ACPI BDRT Table.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the ACPI BDRT Table.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER BgrtParser[] = {
|
||||
PARSE_ACPI_HEADER (&AcpiHdrInfo),
|
||||
{L"Version", 2, 36, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
@ -34,7 +35,8 @@ STATIC CONST ACPI_PARSER BgrtParser[] = {
|
||||
{L"Image Offset Y", 4, 52, L"%d", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** This function parses the ACPI BGRT table.
|
||||
/**
|
||||
This function parses the ACPI BGRT table.
|
||||
When trace is enabled this function parses the BGRT table and
|
||||
traces the ACPI table fields.
|
||||
|
||||
@ -44,7 +46,7 @@ STATIC CONST ACPI_PARSER BgrtParser[] = {
|
||||
@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
|
||||
ParseAcpiBgrt (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
DBG2 table parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -32,12 +32,13 @@ STATIC CONST UINT16* BaseAddrRegOffset;
|
||||
STATIC CONST UINT16* AddrSizeOffset;
|
||||
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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -46,12 +47,13 @@ ValidateNameSpaceStrLen (
|
||||
IN VOID* Context
|
||||
);
|
||||
|
||||
/** This function parses the debug device information structure.
|
||||
/**
|
||||
This function parses the debug device information structure.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
@param [out] Length Pointer in which the length of the debug
|
||||
device information is returned.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -95,12 +97,13 @@ STATIC CONST ACPI_PARSER DbgDevInfoParser[] = {
|
||||
(VOID**)&AddrSizeOffset, NULL, NULL}
|
||||
};
|
||||
|
||||
/** 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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -120,12 +123,13 @@ ValidateNameSpaceStrLen (
|
||||
}
|
||||
}
|
||||
|
||||
/** This function parses the debug device information structure.
|
||||
/**
|
||||
This function parses the debug device information structure.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
@param [out] Ptr Pointer in which the length of the debug
|
||||
@param [out] Length Pointer in which the length of the debug
|
||||
device information is returned.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -193,7 +197,8 @@ DumpDbgDeviceInfo (
|
||||
*Length = *DbgDevInfoLen;
|
||||
}
|
||||
|
||||
/** This function parses the ACPI DBG2 table.
|
||||
/**
|
||||
This function parses the ACPI DBG2 table.
|
||||
When trace is enabled this function parses the DBG2 table and
|
||||
traces the ACPI table fields.
|
||||
|
||||
@ -203,7 +208,7 @@ DumpDbgDeviceInfo (
|
||||
@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
|
||||
ParseAcpiDbg2 (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
DSDT table parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -19,7 +19,8 @@
|
||||
#include "AcpiParser.h"
|
||||
#include "AcpiTableParser.h"
|
||||
|
||||
/** This function parses the ACPI DSDT table.
|
||||
/**
|
||||
This function parses the ACPI DSDT table.
|
||||
When trace is enabled this function parses the DSDT table and
|
||||
traces the ACPI table fields.
|
||||
For the DSDT table only the ACPI header fields are parsed and
|
||||
@ -29,7 +30,7 @@
|
||||
@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
|
||||
ParseAcpiDsdt (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
FADT table parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -25,43 +25,68 @@ STATIC CONST UINT64* X_DsdtAddress;
|
||||
STATIC CONST UINT8* FadtMinorRevision;
|
||||
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
|
||||
|
||||
/** A macro defining the Hardware reduced ACPI flag
|
||||
*/
|
||||
/**
|
||||
A macro defining the Hardware reduced ACPI flag
|
||||
**/
|
||||
#define HW_REDUCED_ACPI BIT20
|
||||
|
||||
// Forward declarations
|
||||
/**
|
||||
Get the ACPI XSDT header info.
|
||||
**/
|
||||
CONST ACPI_DESCRIPTION_HEADER_INFO* CONST
|
||||
EFIAPI
|
||||
GetAcpiXsdtHeaderInfo (
|
||||
VOID
|
||||
);
|
||||
);
|
||||
|
||||
/**
|
||||
This function validates the Firmware Control Field.
|
||||
|
||||
@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.
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
ValidateFirmwareCtrl (
|
||||
IN UINT8* Ptr,
|
||||
IN VOID* Context
|
||||
);
|
||||
);
|
||||
|
||||
/**
|
||||
This function validates the X_Firmware Control Field.
|
||||
|
||||
@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.
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
ValidateXFirmwareCtrl (
|
||||
IN UINT8* Ptr,
|
||||
IN VOID* Context
|
||||
);
|
||||
);
|
||||
|
||||
/**
|
||||
This function validates the flags.
|
||||
|
||||
@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.
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
ValidateFlags (
|
||||
IN UINT8* Ptr,
|
||||
IN VOID* Context
|
||||
);
|
||||
);
|
||||
|
||||
/** An ACPI_PARSER array describing the ACPI FADT Table.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the ACPI FADT Table.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER FadtParser[] = {
|
||||
PARSE_ACPI_HEADER (&AcpiHdrInfo),
|
||||
{L"FIRMWARE_CTRL", 4, 36, L"0x%x", NULL, NULL, ValidateFirmwareCtrl, NULL},
|
||||
@ -123,12 +148,13 @@ STATIC CONST ACPI_PARSER FadtParser[] = {
|
||||
{L"Hypervisor VendorIdentity", 8, 268, L"%lx", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** 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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -147,12 +173,13 @@ ValidateFirmwareCtrl (
|
||||
#endif
|
||||
}
|
||||
|
||||
/** 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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -171,12 +198,13 @@ ValidateXFirmwareCtrl (
|
||||
#endif
|
||||
}
|
||||
|
||||
/** This function validates the flags.
|
||||
/**
|
||||
This function validates the flags.
|
||||
|
||||
@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.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -195,9 +223,9 @@ ValidateFlags (
|
||||
#endif
|
||||
}
|
||||
|
||||
/** This function parses the ACPI FADT table.
|
||||
This function parses the FADT table and optionally traces the ACPI
|
||||
table fields.
|
||||
/**
|
||||
This function parses the ACPI FADT table.
|
||||
This function parses the FADT table and optionally traces the ACPI table fields.
|
||||
|
||||
This function also performs validation of the ACPI table fields.
|
||||
|
||||
@ -205,7 +233,7 @@ ValidateFlags (
|
||||
@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
|
||||
ParseAcpiFadt (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
GTDT table parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -29,12 +29,13 @@ STATIC CONST UINT32* GtBlockTimerOffset;
|
||||
STATIC CONST UINT16* GtBlockLength;
|
||||
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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -43,8 +44,9 @@ ValidateGtBlockTimerCount (
|
||||
IN VOID* Context
|
||||
);
|
||||
|
||||
/** An ACPI_PARSER array describing the ACPI GTDT Table.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the ACPI GTDT Table.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER GtdtParser[] = {
|
||||
PARSE_ACPI_HEADER (&AcpiHdrInfo),
|
||||
{L"CntControlBase Physical Address", 8, 36, L"0x%lx", NULL, NULL,
|
||||
@ -69,16 +71,18 @@ STATIC CONST ACPI_PARSER GtdtParser[] = {
|
||||
(VOID**)&GtdtPlatformTimerOffset, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the Platform timer header.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the Platform timer header.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER GtPlatformTimerHeaderParser[] = {
|
||||
{L"Type", 1, 0, NULL, NULL, (VOID**)&PlatformTimerType, NULL, NULL},
|
||||
{L"Length", 2, 1, NULL, NULL, (VOID**)&PlatformTimerLength, NULL, NULL},
|
||||
{L"Reserved", 1, 3, NULL, NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the Platform GT Block.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the Platform GT Block.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER GtBlockParser[] = {
|
||||
{L"Type", 1, 0, L"%d", NULL, NULL, NULL, NULL},
|
||||
{L"Length", 2, 1, L"%d", NULL, (VOID**)&GtBlockLength, NULL, NULL},
|
||||
@ -90,8 +94,9 @@ STATIC CONST ACPI_PARSER GtBlockParser[] = {
|
||||
NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the GT Block timer.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the GT Block timer.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER GtBlockTimerParser[] = {
|
||||
{L"Frame Number", 1, 0, L"%d", NULL, NULL, NULL, NULL},
|
||||
{L"Reserved", 3, 1, L"%x %x %x", Dump3Chars, NULL, NULL, NULL},
|
||||
@ -105,8 +110,9 @@ STATIC CONST ACPI_PARSER GtBlockTimerParser[] = {
|
||||
{L"Common Flags", 4, 36, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the Platform Watchdog.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the Platform Watchdog.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER SBSAGenericWatchdogParser[] = {
|
||||
{L"Type", 1, 0, L"%d", NULL, NULL, NULL, NULL},
|
||||
{L"Length", 2, 1, L"%d", NULL, NULL, NULL, NULL},
|
||||
@ -117,12 +123,13 @@ STATIC CONST ACPI_PARSER SBSAGenericWatchdogParser[] = {
|
||||
{L"Watchdog Timer Flags", 4, 24, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** 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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -141,11 +148,12 @@ ValidateGtBlockTimerCount (
|
||||
}
|
||||
}
|
||||
|
||||
/** This function parses the Platform GT Block.
|
||||
/**
|
||||
This function parses the Platform GT Block.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the GT Block data.
|
||||
@param [in] Length Length of the GT Block structure.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
DumpGTBlock (
|
||||
@ -196,11 +204,12 @@ DumpGTBlock (
|
||||
}
|
||||
}
|
||||
|
||||
/** This function parses the Platform Watchdog timer.
|
||||
/**
|
||||
This function parses the Platform Watchdog timer.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the watchdog timer data.
|
||||
@param [in] Length Length of the watchdog timer structure.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
DumpWatchdogTimer (
|
||||
@ -218,7 +227,8 @@ DumpWatchdogTimer (
|
||||
);
|
||||
}
|
||||
|
||||
/** This function parses the ACPI GTDT table.
|
||||
/**
|
||||
This function parses the ACPI GTDT table.
|
||||
When trace is enabled this function parses the GTDT table and
|
||||
traces the ACPI table fields.
|
||||
|
||||
@ -232,7 +242,7 @@ DumpWatchdogTimer (
|
||||
@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
|
||||
ParseAcpiGtdt (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
IORT table parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -23,8 +23,9 @@
|
||||
// Local variables
|
||||
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
|
||||
|
||||
/** The EIORT_NODE enum describes the IORT Node types.
|
||||
*/
|
||||
/**
|
||||
The EIORT_NODE enum describes the IORT Node types.
|
||||
**/
|
||||
typedef enum IortNode {
|
||||
EIORT_NODE_ITS_GROUP, ///< ITS Group node
|
||||
EIORT_NODE_NAMED_COMPONENT, ///< Named Component node
|
||||
@ -51,12 +52,13 @@ STATIC CONST UINT32* PmuInterruptOffset;
|
||||
|
||||
STATIC CONST UINT32* ItsCount;
|
||||
|
||||
/** 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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -65,12 +67,13 @@ ValidateItsIdMappingCount (
|
||||
IN VOID* Context
|
||||
);
|
||||
|
||||
/** 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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -79,14 +82,14 @@ ValidateItsIdArrayReference (
|
||||
IN VOID* Context
|
||||
);
|
||||
|
||||
/** Helper Macro for populating the IORT Node header in the ACPI_PARSER
|
||||
array.
|
||||
/**
|
||||
Helper Macro for populating the IORT Node header in the ACPI_PARSER array.
|
||||
|
||||
@param [out] ValidateIdMappingCount Optional pointer to a function for
|
||||
validating the ID Mapping count.
|
||||
@param [out] ValidateIdArrayReference Optional pointer to a function for
|
||||
validating the ID Array reference.
|
||||
*/
|
||||
**/
|
||||
#define PARSE_IORT_NODE_HEADER(ValidateIdMappingCount, \
|
||||
ValidateIdArrayReference) \
|
||||
{ L"Type", 1, 0, L"%d", NULL, (VOID**)&IortNodeType, NULL, NULL }, \
|
||||
@ -98,8 +101,9 @@ ValidateItsIdArrayReference (
|
||||
{ L"Reference to ID Array", 4, 12, L"0x%x", NULL, \
|
||||
(VOID**)&IortIdMappingOffset, ValidateIdArrayReference, NULL }
|
||||
|
||||
/** An ACPI_PARSER array describing the ACPI IORT Table
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the ACPI IORT Table
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER IortParser[] = {
|
||||
PARSE_ACPI_HEADER (&AcpiHdrInfo),
|
||||
{L"Number of IORT Nodes", 4, 36, L"%d", NULL,
|
||||
@ -109,14 +113,16 @@ STATIC CONST ACPI_PARSER IortParser[] = {
|
||||
{L"Reserved", 4, 44, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the IORT node header structure.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the IORT node header structure.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER IortNodeHeaderParser[] = {
|
||||
PARSE_IORT_NODE_HEADER (NULL, NULL)
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the IORT SMMUv1/2 node.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the IORT SMMUv1/2 node.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER IortNodeSmmuV1V2Parser[] = {
|
||||
PARSE_IORT_NODE_HEADER (NULL, NULL),
|
||||
{L"Base Address", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL},
|
||||
@ -141,15 +147,17 @@ STATIC CONST ACPI_PARSER IortNodeSmmuV1V2Parser[] = {
|
||||
{L"SMMU_NSgCfgIrpt interrupt flags", 4, 72, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the SMMUv1/2 Node Interrupt Array.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the SMMUv1/2 Node Interrupt Array.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER InterruptArrayParser[] = {
|
||||
{L" Interrupt GSIV", 4, 0, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L" Flags", 4, 4, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the IORT ID Mapping.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the IORT ID Mapping.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER IortNodeIdMappingParser[] = {
|
||||
{L" Input base", 4, 0, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L" Number of IDs", 4, 4, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
@ -158,8 +166,9 @@ STATIC CONST ACPI_PARSER IortNodeIdMappingParser[] = {
|
||||
{L" Flags", 4, 16, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the IORT SMMUv3 node.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the IORT SMMUv3 node.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER IortNodeSmmuV3Parser[] = {
|
||||
PARSE_IORT_NODE_HEADER (NULL, NULL),
|
||||
{L"Base Address", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL},
|
||||
@ -173,8 +182,9 @@ STATIC CONST ACPI_PARSER IortNodeSmmuV3Parser[] = {
|
||||
{L"Sync", 4, 56, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the IORT ITS node.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the IORT ITS node.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER IortNodeItsParser[] = {
|
||||
PARSE_IORT_NODE_HEADER (
|
||||
ValidateItsIdMappingCount,
|
||||
@ -183,14 +193,16 @@ STATIC CONST ACPI_PARSER IortNodeItsParser[] = {
|
||||
{L" Number of ITSs", 4, 16, L"%d", NULL, (VOID**)&ItsCount, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the ITS ID.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the ITS ID.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER ItsIdParser[] = {
|
||||
{ L" GIC ITS Identifier", 4, 0, L"%d", NULL, NULL, NULL }
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the IORT Names Component node.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the IORT Names Component node.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER IortNodeNamedComponentParser[] = {
|
||||
PARSE_IORT_NODE_HEADER (NULL, NULL),
|
||||
{L"Node Flags", 4, 16, L"%d", NULL, NULL, NULL, NULL},
|
||||
@ -198,8 +210,9 @@ STATIC CONST ACPI_PARSER IortNodeNamedComponentParser[] = {
|
||||
{L"Device memory address size limit", 1, 28, L"%d", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the IORT Root Complex node.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the IORT Root Complex node.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER IortNodeRootComplexParser[] = {
|
||||
PARSE_IORT_NODE_HEADER (NULL, NULL),
|
||||
{L"Memory access properties", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL},
|
||||
@ -207,8 +220,9 @@ STATIC CONST ACPI_PARSER IortNodeRootComplexParser[] = {
|
||||
{L"PCI Segment number", 4, 28, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the IORT PMCG node.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the IORT PMCG node.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER IortNodePmcgParser[] = {
|
||||
PARSE_IORT_NODE_HEADER (NULL, NULL),
|
||||
{L"Base Address", 8, 16, L"0x%lx", NULL, NULL, NULL, NULL},
|
||||
@ -216,18 +230,19 @@ STATIC CONST ACPI_PARSER IortNodePmcgParser[] = {
|
||||
{L"Node reference", 4, 28, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
};
|
||||
|
||||
/** 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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
ValidateItsIdMappingCount (
|
||||
IN UINT8* Ptr,
|
||||
VOID* Context
|
||||
IN VOID* Context
|
||||
)
|
||||
{
|
||||
if (*(UINT32*)Ptr != 0) {
|
||||
@ -236,12 +251,13 @@ ValidateItsIdMappingCount (
|
||||
}
|
||||
}
|
||||
|
||||
/** 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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -256,13 +272,14 @@ ValidateItsIdArrayReference (
|
||||
}
|
||||
}
|
||||
|
||||
/** This function parses the IORT Node Id Mapping array.
|
||||
/**
|
||||
This function parses the IORT Node Id Mapping array.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the IORT Table.
|
||||
@param [in] MappingCount The ID Mapping count.
|
||||
@param [in] MappingOffset The offset of the ID Mapping array
|
||||
from the start of the IORT table.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
DumpIortNodeIdMappings (
|
||||
@ -298,14 +315,15 @@ DumpIortNodeIdMappings (
|
||||
}
|
||||
}
|
||||
|
||||
/** This function parses the IORT SMMUv1/2 node.
|
||||
/**
|
||||
This function parses the IORT SMMUv1/2 node.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
@param [in] Length Length of the buffer.
|
||||
@param [in] MappingCount The ID Mapping count.
|
||||
@param [in] MappingOffset The offset of the ID Mapping array
|
||||
from the start of the IORT table.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
DumpIortNodeSmmuV1V2 (
|
||||
@ -377,14 +395,15 @@ DumpIortNodeSmmuV1V2 (
|
||||
}
|
||||
}
|
||||
|
||||
/** This function parses the IORT SMMUv3 node.
|
||||
/**
|
||||
This function parses the IORT SMMUv3 node.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
@param [in] Length Length of the buffer.
|
||||
@param [in] MappingCount The ID Mapping count.
|
||||
@param [in] MappingOffset The offset of the ID Mapping array
|
||||
from the start of the IORT table.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
DumpIortNodeSmmuV3 (
|
||||
@ -408,11 +427,12 @@ DumpIortNodeSmmuV3 (
|
||||
}
|
||||
}
|
||||
|
||||
/** This function parses the IORT ITS node.
|
||||
/**
|
||||
This function parses the IORT ITS node.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
@param [in] Length Length of the buffer.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
DumpIortNodeIts (
|
||||
@ -458,14 +478,15 @@ DumpIortNodeIts (
|
||||
// Note: ITS does not have the ID Mappings Array
|
||||
}
|
||||
|
||||
/** This function parses the IORT Named Component node.
|
||||
/**
|
||||
This function parses the IORT Named Component node.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
@param [in] Length Length of the buffer.
|
||||
@param [in] MappingCount The ID Mapping count.
|
||||
@param [in] MappingOffset The offset of the ID Mapping array
|
||||
from the start of the IORT table.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
DumpIortNodeNamedComponent (
|
||||
@ -504,14 +525,15 @@ DumpIortNodeNamedComponent (
|
||||
}
|
||||
}
|
||||
|
||||
/** This function parses the IORT Root Complex node.
|
||||
/**
|
||||
This function parses the IORT Root Complex node.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
@param [in] Length Length of the buffer.
|
||||
@param [in] MappingCount The ID Mapping count.
|
||||
@param [in] MappingOffset The offset of the ID Mapping array
|
||||
from the start of the IORT table.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
DumpIortNodeRootComplex (
|
||||
@ -535,14 +557,15 @@ DumpIortNodeRootComplex (
|
||||
}
|
||||
}
|
||||
|
||||
/** This function parses the IORT PMCG node.
|
||||
/**
|
||||
This function parses the IORT PMCG node.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
@param [in] Length Length of the buffer.
|
||||
@param [in] MappingCount The ID Mapping count.
|
||||
@param [in] MappingOffset The offset of the ID Mapping array
|
||||
from the start of the IORT table.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
DumpIortNodePmcg (
|
||||
@ -574,9 +597,9 @@ DumpIortNodePmcg (
|
||||
}
|
||||
}
|
||||
|
||||
/** This function parses the ACPI IORT table.
|
||||
When trace is enabled this function parses the IORT table and
|
||||
traces the ACPI fields.
|
||||
/**
|
||||
This function parses the ACPI IORT table.
|
||||
When trace is enabled this function parses the IORT table and traces the ACPI fields.
|
||||
|
||||
This function also parses the following nodes:
|
||||
- ITS Group
|
||||
@ -592,7 +615,7 @@ DumpIortNodePmcg (
|
||||
@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
|
||||
ParseAcpiIort (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
MADT table parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -24,18 +24,24 @@ STATIC CONST UINT8* MadtInterruptControllerType;
|
||||
STATIC CONST UINT8* MadtInterruptControllerLength;
|
||||
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
|
||||
|
||||
// Forward declarations
|
||||
/**
|
||||
This function validates the System Vector Base in the GICD.
|
||||
|
||||
@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.
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
ValidateGICDSystemVectorBase (
|
||||
IN UINT8* Ptr,
|
||||
IN VOID* Context
|
||||
);
|
||||
);
|
||||
|
||||
/** An ACPI_PARSER array describing the GICC Interrupt
|
||||
Controller Structure.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the GICC Interrupt Controller Structure.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER GicCParser[] = {
|
||||
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL},
|
||||
@ -59,9 +65,9 @@ STATIC CONST ACPI_PARSER GicCParser[] = {
|
||||
{L"Reserved", 3, 77, L"%x %x %x", Dump3Chars, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the GICD Interrupt
|
||||
Controller Structure.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the GICD Interrupt Controller Structure.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER GicDParser[] = {
|
||||
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL},
|
||||
@ -75,9 +81,9 @@ STATIC CONST ACPI_PARSER GicDParser[] = {
|
||||
{L"Reserved", 3, 21, L"%x %x %x", Dump3Chars, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the MSI Frame Interrupt
|
||||
Controller Structure.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the MSI Frame Interrupt Controller Structure.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER GicMSIFrameParser[] = {
|
||||
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL},
|
||||
@ -91,9 +97,9 @@ STATIC CONST ACPI_PARSER GicMSIFrameParser[] = {
|
||||
{L"SPI Base", 2, 22, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the GICR Interrupt
|
||||
Controller Structure.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the GICR Interrupt Controller Structure.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER GicRParser[] = {
|
||||
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL},
|
||||
@ -104,9 +110,9 @@ STATIC CONST ACPI_PARSER GicRParser[] = {
|
||||
{L"Discovery Range Length", 4, 12, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the GIC ITS Interrupt
|
||||
Controller Structure.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the GIC ITS Interrupt Controller Structure.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER GicITSParser[] = {
|
||||
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Length", 1, 1, L"%d", NULL, NULL, NULL, NULL},
|
||||
@ -117,8 +123,9 @@ STATIC CONST ACPI_PARSER GicITSParser[] = {
|
||||
{L"Reserved", 4, 16, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the ACPI MADT Table.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the ACPI MADT Table.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER MadtParser[] = {
|
||||
PARSE_ACPI_HEADER (&AcpiHdrInfo),
|
||||
{L"Local Interrupt Controller Address", 4, 36, L"0x%x", NULL, NULL, NULL,
|
||||
@ -126,9 +133,9 @@ STATIC CONST ACPI_PARSER MadtParser[] = {
|
||||
{L"Flags", 4, 40, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the MADT Interrupt
|
||||
Controller Structure Header Structure.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the MADT Interrupt Controller Structure Header Structure.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER MadtInterruptControllerHeaderParser[] = {
|
||||
{NULL, 1, 0, NULL, NULL, (VOID**)&MadtInterruptControllerType, NULL, NULL},
|
||||
{L"Length", 1, 1, NULL, NULL, (VOID**)&MadtInterruptControllerLength, NULL,
|
||||
@ -136,12 +143,13 @@ STATIC CONST ACPI_PARSER MadtInterruptControllerHeaderParser[] = {
|
||||
{L"Reserved", 2, 2, NULL, NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** 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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -158,7 +166,8 @@ ValidateGICDSystemVectorBase (
|
||||
}
|
||||
}
|
||||
|
||||
/** This function parses the ACPI MADT table.
|
||||
/**
|
||||
This function parses the ACPI MADT table.
|
||||
When trace is enabled this function parses the MADT table and
|
||||
traces the ACPI table fields.
|
||||
|
||||
@ -176,7 +185,7 @@ ValidateGICDSystemVectorBase (
|
||||
@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
|
||||
ParseAcpiMadt (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
MCFG table parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -22,16 +22,17 @@
|
||||
// Local variables
|
||||
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
|
||||
|
||||
/** An ACPI_PARSER array describing the ACPI MCFG Table.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the ACPI MCFG Table.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER McfgParser[] = {
|
||||
PARSE_ACPI_HEADER (&AcpiHdrInfo),
|
||||
{L"Reserved", 8, 36, L"0x%lx", NULL, NULL, NULL, NULL},
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the PCI configuration Space
|
||||
Base Address structure.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the PCI configuration Space Base Address structure.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER PciCfgSpaceBaseAddrParser[] = {
|
||||
{L"Base Address", 8, 0, L"0x%lx", NULL, NULL, NULL, NULL},
|
||||
{L"PCI Segment Group No.", 2, 8, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
@ -40,7 +41,8 @@ STATIC CONST ACPI_PARSER PciCfgSpaceBaseAddrParser[] = {
|
||||
{L"Reserved", 4, 12, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** This function parses the ACPI MCFG table.
|
||||
/**
|
||||
This function parses the ACPI MCFG table.
|
||||
When trace is enabled this function parses the MCFG table and
|
||||
traces the ACPI table fields.
|
||||
|
||||
@ -50,7 +52,7 @@ STATIC CONST ACPI_PARSER PciCfgSpaceBaseAddrParser[] = {
|
||||
@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
|
||||
ParseAcpiMcfg (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
RSDP table parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -21,12 +21,13 @@
|
||||
// Local Variables
|
||||
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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -35,12 +36,13 @@ ValidateRsdtAddress (
|
||||
IN VOID* Context
|
||||
);
|
||||
|
||||
/** 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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -49,8 +51,9 @@ ValidateXsdtAddress (
|
||||
IN VOID* Context
|
||||
);
|
||||
|
||||
/** An array describing the ACPI RSDP Table.
|
||||
*/
|
||||
/**
|
||||
An array describing the ACPI RSDP Table.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER RsdpParser[] = {
|
||||
{L"Signature", 8, 0, NULL, Dump8Chars, NULL, NULL, NULL},
|
||||
{L"Checksum", 1, 8, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
@ -64,12 +67,13 @@ STATIC CONST ACPI_PARSER RsdpParser[] = {
|
||||
{L"Reserved", 3, 33, L"%x %x %x", Dump3Chars, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** 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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -95,12 +99,13 @@ ValidateRsdtAddress (
|
||||
#endif
|
||||
}
|
||||
|
||||
/** 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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -126,7 +131,8 @@ ValidateXsdtAddress (
|
||||
#endif
|
||||
}
|
||||
|
||||
/** This function parses the ACPI RSDP table.
|
||||
/**
|
||||
This function parses the ACPI RSDP table.
|
||||
|
||||
This function invokes the parser for the XSDT table.
|
||||
* Note - This function does not support parsing of RSDT table.
|
||||
@ -138,7 +144,7 @@ ValidateXsdtAddress (
|
||||
@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
|
||||
ParseAcpiRsdp (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
SLIT table parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -24,19 +24,22 @@
|
||||
STATIC CONST UINT64* SlitSystemLocalityCount;
|
||||
STATIC ACPI_DESCRIPTION_HEADER_INFO AcpiHdrInfo;
|
||||
|
||||
/** An ACPI_PARSER array describing the ACPI SLIT table.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the ACPI SLIT table.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER SlitParser[] = {
|
||||
PARSE_ACPI_HEADER (&AcpiHdrInfo),
|
||||
{L"Number of System Localities", 8, 36, L"0x%lx", NULL,
|
||||
(VOID**)&SlitSystemLocalityCount, NULL, NULL}
|
||||
};
|
||||
|
||||
/** Macro to get the value of a System Locality
|
||||
*/
|
||||
/**
|
||||
Macro to get the value of a System Locality
|
||||
**/
|
||||
#define SLIT_ELEMENT(Ptr, i, j) *(Ptr + (i * LocalityCount) + j)
|
||||
|
||||
/** This function parses the ACPI SLIT table.
|
||||
/**
|
||||
This function parses the ACPI SLIT table.
|
||||
When trace is enabled this function parses the SLIT table and
|
||||
traces the ACPI table fields.
|
||||
|
||||
@ -49,7 +52,7 @@ STATIC CONST ACPI_PARSER SlitParser[] = {
|
||||
@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
|
||||
ParseAcpiSlit (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
SPCR table parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -24,12 +24,13 @@
|
||||
// Local variables
|
||||
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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -38,12 +39,13 @@ ValidateInterruptType (
|
||||
IN VOID* Context
|
||||
);
|
||||
|
||||
/** This function validates the Irq.
|
||||
/**
|
||||
This function validates the Irq.
|
||||
|
||||
@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.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -52,8 +54,9 @@ ValidateIrq (
|
||||
IN VOID* Context
|
||||
);
|
||||
|
||||
/** An ACPI_PARSER array describing the ACPI SPCR Table.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the ACPI SPCR Table.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER SpcrParser[] = {
|
||||
PARSE_ACPI_HEADER (&AcpiHdrInfo),
|
||||
{L"Interface Type", 1, 36, L"%d", NULL, NULL, NULL, NULL},
|
||||
@ -79,12 +82,13 @@ STATIC CONST ACPI_PARSER SpcrParser[] = {
|
||||
{L"Reserved", 4, 76, L"%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** 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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -106,12 +110,13 @@ ValidateInterruptType (
|
||||
#endif
|
||||
}
|
||||
|
||||
/** This function validates the Irq.
|
||||
/**
|
||||
This function validates the Irq.
|
||||
|
||||
@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.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -132,7 +137,8 @@ ValidateIrq (
|
||||
#endif
|
||||
}
|
||||
|
||||
/** This function parses the ACPI SPCR table.
|
||||
/**
|
||||
This function parses the ACPI SPCR table.
|
||||
When trace is enabled this function parses the SPCR table and
|
||||
traces the ACPI table fields.
|
||||
|
||||
@ -142,7 +148,7 @@ ValidateIrq (
|
||||
@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
|
||||
ParseAcpiSpcr (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
SRAT table parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -25,12 +25,13 @@ STATIC CONST UINT8* SratRAType;
|
||||
STATIC CONST UINT8* SratRALength;
|
||||
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] Context Pointer to context specific information e.g. this
|
||||
could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -39,11 +40,12 @@ ValidateSratReserved (
|
||||
IN VOID* Context
|
||||
);
|
||||
|
||||
/** This function traces the APIC Proximity Domain field.
|
||||
/**
|
||||
This function traces the APIC Proximity Domain field.
|
||||
|
||||
@param [in] Format Format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
DumpSratApicProximity (
|
||||
@ -51,24 +53,26 @@ DumpSratApicProximity (
|
||||
IN UINT8* Ptr
|
||||
);
|
||||
|
||||
/** An ACPI_PARSER array describing the SRAT Table.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the SRAT Table.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER SratParser[] = {
|
||||
PARSE_ACPI_HEADER (&AcpiHdrInfo),
|
||||
{L"Reserved", 4, 36, L"0x%x", NULL, NULL, ValidateSratReserved, NULL},
|
||||
{L"Reserved", 8, 40, L"0x%lx", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the Resource Allocation
|
||||
structure header.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the Resource Allocation structure header.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER SratResourceAllocationParser[] = {
|
||||
{L"Type", 1, 0, NULL, NULL, (VOID**)&SratRAType, NULL, NULL},
|
||||
{L"Length", 1, 1, NULL, NULL, (VOID**)&SratRALength, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the GICC Affinity structure.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the GICC Affinity structure.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER SratGicCAffinityParser[] = {
|
||||
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
@ -79,8 +83,9 @@ STATIC CONST ACPI_PARSER SratGicCAffinityParser[] = {
|
||||
{L"Clock Domain", 4, 14, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the GIC ITS Affinity structure.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the GIC ITS Affinity structure.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER SratGicITSAffinityParser[] = {
|
||||
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
@ -90,8 +95,9 @@ STATIC CONST ACPI_PARSER SratGicITSAffinityParser[] = {
|
||||
{L"ITS Id", 4, 8, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the Memory Affinity structure.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the Memory Affinity structure.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER SratMemAffinityParser[] = {
|
||||
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
@ -107,8 +113,9 @@ STATIC CONST ACPI_PARSER SratMemAffinityParser[] = {
|
||||
{L"Reserved", 8, 32, L"0x%lx", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the APIC/SAPIC Affinity structure.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the APIC/SAPIC Affinity structure.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER SratApciSapicAffinityParser[] = {
|
||||
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
@ -122,9 +129,9 @@ STATIC CONST ACPI_PARSER SratApciSapicAffinityParser[] = {
|
||||
{L"Clock Domain", 4, 12, L"0x%x", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** An ACPI_PARSER array describing the Processor Local x2APIC
|
||||
Affinity structure.
|
||||
*/
|
||||
/**
|
||||
An ACPI_PARSER array describing the Processor Local x2APIC Affinity structure.
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER SratX2ApciAffinityParser[] = {
|
||||
{L"Type", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Length", 1, 1, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
@ -142,7 +149,7 @@ STATIC CONST ACPI_PARSER SratX2ApciAffinityParser[] = {
|
||||
@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.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
EFIAPI
|
||||
@ -157,11 +164,12 @@ ValidateSratReserved (
|
||||
}
|
||||
}
|
||||
|
||||
/** This function traces the APIC Proximity Domain field.
|
||||
/**
|
||||
This function traces the APIC Proximity Domain field.
|
||||
|
||||
@param [in] Format Format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
VOID
|
||||
DumpSratApicProximity (
|
||||
@ -173,7 +181,8 @@ DumpSratApicProximity (
|
||||
Print (Format, ProximityDomain);
|
||||
}
|
||||
|
||||
/** This function parses the ACPI SRAT table.
|
||||
/**
|
||||
This function parses the ACPI SRAT table.
|
||||
When trace is enabled this function parses the SRAT table and
|
||||
traces the ACPI table fields.
|
||||
|
||||
@ -189,7 +198,7 @@ DumpSratApicProximity (
|
||||
@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
|
||||
ParseAcpiSrat (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
SSDT table parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -19,7 +19,8 @@
|
||||
#include "AcpiParser.h"
|
||||
#include "AcpiTableParser.h"
|
||||
|
||||
/** This function parses the ACPI SSDT table.
|
||||
/**
|
||||
This function parses the ACPI SSDT table.
|
||||
When trace is enabled this function parses the SSDT table and
|
||||
traces the ACPI table fields.
|
||||
For the SSDT table only the ACPI header fields are
|
||||
@ -29,7 +30,7 @@
|
||||
@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
|
||||
ParseAcpiSsdt (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
XSDT table parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -29,6 +29,9 @@ STATIC CONST ACPI_PARSER XsdtParser[] = {
|
||||
PARSE_ACPI_HEADER (&AcpiHdrInfo)
|
||||
};
|
||||
|
||||
/**
|
||||
Get the ACPI XSDT header info.
|
||||
**/
|
||||
CONST ACPI_DESCRIPTION_HEADER_INFO* CONST
|
||||
EFIAPI
|
||||
GetAcpiXsdtHeaderInfo (
|
||||
@ -38,8 +41,8 @@ GetAcpiXsdtHeaderInfo (
|
||||
return &AcpiHdrInfo;
|
||||
}
|
||||
|
||||
/** This function parses the ACPI XSDT table
|
||||
and optionally traces the ACPI table fields.
|
||||
/**
|
||||
This function parses the ACPI XSDT table and optionally traces the ACPI table fields.
|
||||
|
||||
This function also performs validation of the XSDT table.
|
||||
|
||||
@ -47,7 +50,7 @@ GetAcpiXsdtHeaderInfo (
|
||||
@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
|
||||
ParseAcpiXsdt (
|
||||
|
Reference in New Issue
Block a user