mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
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:
parent
64285f1526
commit
a6eaba4d7f
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
ACPI parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -21,8 +21,9 @@ STATIC UINT32 gIndent;
|
||||
STATIC UINT32 mTableErrorCount;
|
||||
STATIC UINT32 mTableWarningCount;
|
||||
|
||||
/** This function resets the ACPI table error counter to Zero.
|
||||
*/
|
||||
/**
|
||||
This function resets the ACPI table error counter to Zero.
|
||||
**/
|
||||
VOID
|
||||
ResetErrorCount (
|
||||
VOID
|
||||
@ -31,10 +32,11 @@ ResetErrorCount (
|
||||
mTableErrorCount = 0;
|
||||
}
|
||||
|
||||
/** This function returns the ACPI table error count.
|
||||
/**
|
||||
This function returns the ACPI table error count.
|
||||
|
||||
@retval Returns the count of errors detected in the ACPI tables.
|
||||
*/
|
||||
**/
|
||||
UINT32
|
||||
GetErrorCount (
|
||||
VOID
|
||||
@ -43,8 +45,9 @@ GetErrorCount (
|
||||
return mTableErrorCount;
|
||||
}
|
||||
|
||||
/** This function resets the ACPI table warning counter to Zero.
|
||||
*/
|
||||
/**
|
||||
This function resets the ACPI table warning counter to Zero.
|
||||
**/
|
||||
VOID
|
||||
ResetWarningCount (
|
||||
VOID
|
||||
@ -53,10 +56,11 @@ ResetWarningCount (
|
||||
mTableWarningCount = 0;
|
||||
}
|
||||
|
||||
/** This function returns the ACPI table warning count.
|
||||
/**
|
||||
This function returns the ACPI table warning count.
|
||||
|
||||
@retval Returns the count of warning detected in the ACPI tables.
|
||||
*/
|
||||
**/
|
||||
UINT32
|
||||
GetWarningCount (
|
||||
VOID
|
||||
@ -65,8 +69,9 @@ GetWarningCount (
|
||||
return mTableWarningCount;
|
||||
}
|
||||
|
||||
/** This function increments the ACPI table error counter.
|
||||
*/
|
||||
/**
|
||||
This function increments the ACPI table error counter.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
IncrementErrorCount (
|
||||
@ -76,8 +81,9 @@ IncrementErrorCount (
|
||||
mTableErrorCount++;
|
||||
}
|
||||
|
||||
/** This function increments the ACPI table warning counter.
|
||||
*/
|
||||
/**
|
||||
This function increments the ACPI table warning counter.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
IncrementWarningCount (
|
||||
@ -87,7 +93,8 @@ IncrementWarningCount (
|
||||
mTableWarningCount++;
|
||||
}
|
||||
|
||||
/** This function verifies the ACPI table checksum.
|
||||
/**
|
||||
This function verifies the ACPI table checksum.
|
||||
|
||||
This function verifies the checksum for the ACPI table and optionally
|
||||
prints the status.
|
||||
@ -98,7 +105,7 @@ IncrementWarningCount (
|
||||
|
||||
@retval TRUE The checksum is OK.
|
||||
@retval FALSE The checksum failed.
|
||||
*/
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
VerifyChecksum (
|
||||
@ -146,11 +153,12 @@ VerifyChecksum (
|
||||
return (Checksum == 0);
|
||||
}
|
||||
|
||||
/** This function performs a raw data dump of the ACPI table.
|
||||
/**
|
||||
This function performs a raw data dump of the ACPI table.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the table buffer.
|
||||
@param [in] Length The length of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpRaw (
|
||||
@ -205,12 +213,12 @@ DumpRaw (
|
||||
Print (L" %a", AsciiBuffer);
|
||||
}
|
||||
|
||||
/** This function traces 1 byte of data as specified in the
|
||||
format string.
|
||||
/**
|
||||
This function traces 1 byte of data as specified in the format string.
|
||||
|
||||
@param [in] Format The format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpUint8 (
|
||||
@ -221,12 +229,12 @@ DumpUint8 (
|
||||
Print (Format, *Ptr);
|
||||
}
|
||||
|
||||
/** This function traces 2 bytes of data as specified in the
|
||||
format string.
|
||||
/**
|
||||
This function traces 2 bytes of data as specified in the format string.
|
||||
|
||||
@param [in] Format The format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpUint16 (
|
||||
@ -237,12 +245,12 @@ DumpUint16 (
|
||||
Print (Format, *(UINT16*)Ptr);
|
||||
}
|
||||
|
||||
/** This function traces 4 bytes of data as specified in the
|
||||
format string.
|
||||
/**
|
||||
This function traces 4 bytes of data as specified in the format string.
|
||||
|
||||
@param [in] Format The format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpUint32 (
|
||||
@ -253,12 +261,12 @@ DumpUint32 (
|
||||
Print (Format, *(UINT32*)Ptr);
|
||||
}
|
||||
|
||||
/** This function traces 8 bytes of data as specified by the
|
||||
format string.
|
||||
/**
|
||||
This function traces 8 bytes of data as specified by the format string.
|
||||
|
||||
@param [in] Format The format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpUint64 (
|
||||
@ -276,14 +284,15 @@ DumpUint64 (
|
||||
Print (Format, Val);
|
||||
}
|
||||
|
||||
/** This function traces 3 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
/**
|
||||
This function traces 3 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
|
||||
If no format string is specified the Format must be NULL.
|
||||
|
||||
@param [in] Format Optional format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
Dump3Chars (
|
||||
@ -299,14 +308,15 @@ Dump3Chars (
|
||||
);
|
||||
}
|
||||
|
||||
/** This function traces 4 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
/**
|
||||
This function traces 4 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
|
||||
If no format string is specified the Format must be NULL.
|
||||
|
||||
@param [in] Format Optional format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
Dump4Chars (
|
||||
@ -323,14 +333,15 @@ Dump4Chars (
|
||||
);
|
||||
}
|
||||
|
||||
/** This function traces 6 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
/**
|
||||
This function traces 6 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
|
||||
If no format string is specified the Format must be NULL.
|
||||
|
||||
@param [in] Format Optional format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
Dump6Chars (
|
||||
@ -349,14 +360,15 @@ Dump6Chars (
|
||||
);
|
||||
}
|
||||
|
||||
/** This function traces 8 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
/**
|
||||
This function traces 8 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
|
||||
If no format string is specified the Format must be NULL.
|
||||
|
||||
@param [in] Format Optional format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
Dump8Chars (
|
||||
@ -377,7 +389,8 @@ Dump8Chars (
|
||||
);
|
||||
}
|
||||
|
||||
/** This function indents and prints the ACPI table Field Name.
|
||||
/**
|
||||
This function indents and prints the ACPI table Field Name.
|
||||
|
||||
@param [in] Indent Number of spaces to add to the global table indent.
|
||||
The global table indent is 0 by default; however
|
||||
@ -387,7 +400,7 @@ Dump8Chars (
|
||||
Therefore the total indent in the output is
|
||||
dependent on from where this function is called.
|
||||
@param [in] FieldName Pointer to the Field Name.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
PrintFieldName (
|
||||
@ -404,7 +417,8 @@ PrintFieldName (
|
||||
);
|
||||
}
|
||||
|
||||
/** This function is used to parse an ACPI table buffer.
|
||||
/**
|
||||
This function is used to parse an ACPI table buffer.
|
||||
|
||||
The ACPI table buffer is parsed using the ACPI table parser information
|
||||
specified by a pointer to an array of ACPI_PARSER elements. This parser
|
||||
@ -428,7 +442,7 @@ PrintFieldName (
|
||||
@param [in] ParserItems Number of items in the ACPI_PARSER array.
|
||||
|
||||
@retval Number of bytes parsed.
|
||||
*/
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
ParseAcpi (
|
||||
@ -540,10 +554,11 @@ ParseAcpi (
|
||||
return Offset;
|
||||
}
|
||||
|
||||
/** An array describing the ACPI Generic Address Structure.
|
||||
/**
|
||||
An array describing the ACPI Generic Address Structure.
|
||||
The GasParser array is used by the ParseAcpi function to parse and/or trace
|
||||
the GAS structure.
|
||||
*/
|
||||
**/
|
||||
STATIC CONST ACPI_PARSER GasParser[] = {
|
||||
{L"Address Space ID", 1, 0, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
{L"Register Bit Width", 1, 1, L"0x%x", NULL, NULL, NULL, NULL},
|
||||
@ -552,12 +567,12 @@ STATIC CONST ACPI_PARSER GasParser[] = {
|
||||
{L"Address", 8, 4, L"0x%lx", NULL, NULL, NULL, NULL}
|
||||
};
|
||||
|
||||
/** This function indents and traces the GAS structure as described
|
||||
by the GasParser.
|
||||
/**
|
||||
This function indents and traces the GAS structure as described by the GasParser.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
@param [in] Indent Number of spaces to indent the output.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpGasStruct (
|
||||
@ -576,11 +591,12 @@ DumpGasStruct (
|
||||
);
|
||||
}
|
||||
|
||||
/** This function traces the GAS structure as described by the GasParser.
|
||||
/**
|
||||
This function traces the GAS structure as described by the GasParser.
|
||||
|
||||
@param [in] Format Optional format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpGas (
|
||||
@ -591,12 +607,13 @@ DumpGas (
|
||||
DumpGasStruct (Ptr, 2);
|
||||
}
|
||||
|
||||
/** This function traces the ACPI header as described by the AcpiHeaderParser.
|
||||
/**
|
||||
This function traces the ACPI header as described by the AcpiHeaderParser.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
|
||||
@retval Number of bytes parsed.
|
||||
*/
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
DumpAcpiHeader (
|
||||
@ -618,7 +635,8 @@ DumpAcpiHeader (
|
||||
);
|
||||
}
|
||||
|
||||
/** This function parses the ACPI header as described by the AcpiHeaderParser.
|
||||
/**
|
||||
This function parses the ACPI header as described by the AcpiHeaderParser.
|
||||
|
||||
This function optionally returns the signature, length and revision of the
|
||||
ACPI table.
|
||||
@ -629,7 +647,7 @@ DumpAcpiHeader (
|
||||
@param [out] Revision Gets location of the revision of the ACPI table.
|
||||
|
||||
@retval Number of bytes parsed.
|
||||
*/
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
ParseAcpiHeader (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
Header file for ACPI parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -22,23 +22,26 @@
|
||||
/// that allows us to process the log options.
|
||||
#define RSDP_TABLE_INFO SIGNATURE_32('R', 'S', 'D', 'P')
|
||||
|
||||
/** This function increments the ACPI table error counter.
|
||||
*/
|
||||
/**
|
||||
This function increments the ACPI table error counter.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
IncrementErrorCount (
|
||||
VOID
|
||||
);
|
||||
|
||||
/** This function increments the ACPI table warning counter.
|
||||
*/
|
||||
/**
|
||||
This function increments the ACPI table warning counter.
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
IncrementWarningCount (
|
||||
VOID
|
||||
);
|
||||
|
||||
/** This function verifies the ACPI table checksum.
|
||||
/**
|
||||
This function verifies the ACPI table checksum.
|
||||
|
||||
This function verifies the checksum for the ACPI table and optionally
|
||||
prints the status.
|
||||
@ -49,7 +52,7 @@ IncrementWarningCount (
|
||||
|
||||
@retval TRUE The checksum is OK.
|
||||
@retval FALSE The checksum failed.
|
||||
*/
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
VerifyChecksum (
|
||||
@ -58,11 +61,12 @@ VerifyChecksum (
|
||||
IN UINT32 Length
|
||||
);
|
||||
|
||||
/** This function performs a raw data dump of the ACPI table.
|
||||
/**
|
||||
This function performs a raw data dump of the ACPI table.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the table buffer.
|
||||
@param [in] Length The length of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpRaw (
|
||||
@ -70,12 +74,12 @@ DumpRaw (
|
||||
IN UINT32 Length
|
||||
);
|
||||
|
||||
/** This function traces 1 byte of datum as specified in the
|
||||
format string.
|
||||
/**
|
||||
This function traces 1 byte of datum as specified in the format string.
|
||||
|
||||
@param [in] Format The format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpUint8 (
|
||||
@ -83,12 +87,12 @@ DumpUint8 (
|
||||
IN UINT8* Ptr
|
||||
);
|
||||
|
||||
/** This function traces 2 bytes of data as specified in the
|
||||
format string.
|
||||
/**
|
||||
This function traces 2 bytes of data as specified in the format string.
|
||||
|
||||
@param [in] Format The format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpUint16 (
|
||||
@ -96,12 +100,12 @@ DumpUint16 (
|
||||
IN UINT8* Ptr
|
||||
);
|
||||
|
||||
/** This function traces 4 bytes of data as specified in the
|
||||
format string.
|
||||
/**
|
||||
This function traces 4 bytes of data as specified in the format string.
|
||||
|
||||
@param [in] Format The format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpUint32 (
|
||||
@ -109,12 +113,12 @@ DumpUint32 (
|
||||
IN UINT8* Ptr
|
||||
);
|
||||
|
||||
/** This function traces 8 bytes of data as specified by the
|
||||
format string.
|
||||
/**
|
||||
This function traces 8 bytes of data as specified by the format string.
|
||||
|
||||
@param [in] Format The format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpUint64 (
|
||||
@ -122,14 +126,15 @@ DumpUint64 (
|
||||
IN UINT8* Ptr
|
||||
);
|
||||
|
||||
/** This function traces 3 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
/**
|
||||
This function traces 3 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
|
||||
If no format string is specified the Format must be NULL.
|
||||
|
||||
@param [in] Format Optional format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
Dump3Chars (
|
||||
@ -137,14 +142,15 @@ Dump3Chars (
|
||||
IN UINT8* Ptr
|
||||
);
|
||||
|
||||
/** This function traces 4 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
/**
|
||||
This function traces 4 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
|
||||
If no format string is specified the Format must be NULL.
|
||||
|
||||
@param [in] Format Optional format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
Dump4Chars (
|
||||
@ -152,14 +158,15 @@ Dump4Chars (
|
||||
IN UINT8* Ptr
|
||||
);
|
||||
|
||||
/** This function traces 6 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
/**
|
||||
This function traces 6 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
|
||||
If no format string is specified the Format must be NULL.
|
||||
|
||||
@param [in] Format Optional format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
Dump6Chars (
|
||||
@ -167,14 +174,15 @@ Dump6Chars (
|
||||
IN UINT8* Ptr
|
||||
);
|
||||
|
||||
/** This function traces 8 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
/**
|
||||
This function traces 8 characters which can be optionally
|
||||
formated using the format string if specified.
|
||||
|
||||
If no format string is specified the Format must be NULL.
|
||||
|
||||
@param [in] Format Optional format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
Dump8Chars (
|
||||
@ -182,7 +190,8 @@ Dump8Chars (
|
||||
IN UINT8* Ptr
|
||||
);
|
||||
|
||||
/** This function indents and prints the ACPI table Field Name.
|
||||
/**
|
||||
This function indents and prints the ACPI table Field Name.
|
||||
|
||||
@param [in] Indent Number of spaces to add to the global table
|
||||
indent. The global table indent is 0 by default;
|
||||
@ -192,33 +201,36 @@ Dump8Chars (
|
||||
the total indent in the output is dependent on from
|
||||
where this function is called.
|
||||
@param [in] FieldName Pointer to the Field Name.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
PrintFieldName (
|
||||
IN UINT32 Indent,
|
||||
IN CONST CHAR16* FieldName
|
||||
);
|
||||
);
|
||||
|
||||
/** This function pointer is the template for customizing the trace output
|
||||
/**
|
||||
This function pointer is the template for customizing the trace output
|
||||
|
||||
@param [in] Format Format string for tracing the data as specified by
|
||||
the 'Format' member of ACPI_PARSER.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
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] Context Pointer to context specific information as specified by
|
||||
the 'Context' member of the ACPI_PARSER.
|
||||
e.g. this could be a pointer to the ACPI table header.
|
||||
*/
|
||||
**/
|
||||
typedef VOID (EFIAPI *FNPTR_FIELD_VALIDATOR)(UINT8* Ptr, VOID* Context);
|
||||
|
||||
/** The ACPI_PARSER structure describes the fields of an ACPI table and
|
||||
provides means for the parser to interpret and trace appropriately.
|
||||
/**
|
||||
The ACPI_PARSER structure describes the fields of an ACPI table and
|
||||
provides means for the parser to interpret and trace appropriately.
|
||||
|
||||
The first three members are populated based on information present in
|
||||
in the ACPI table specifications. The remaining members describe how
|
||||
@ -234,7 +246,7 @@ typedef VOID (EFIAPI *FNPTR_FIELD_VALIDATOR)(UINT8* Ptr, VOID* Context);
|
||||
|
||||
The 'Format' and 'PrintFormatter' members allow flexibility for
|
||||
representing the field data.
|
||||
*/
|
||||
**/
|
||||
typedef struct AcpiParser {
|
||||
|
||||
/// String describing the ACPI table field
|
||||
@ -278,9 +290,10 @@ typedef struct AcpiParser {
|
||||
VOID* Context;
|
||||
} ACPI_PARSER;
|
||||
|
||||
/** A structure used to store the pointers to the members of the
|
||||
ACPI description header structure that was parsed.
|
||||
*/
|
||||
/**
|
||||
A structure used to store the pointers to the members of the
|
||||
ACPI description header structure that was parsed.
|
||||
**/
|
||||
typedef struct AcpiDescriptionHeaderInfo {
|
||||
/// ACPI table signature
|
||||
UINT32* Signature;
|
||||
@ -302,7 +315,8 @@ typedef struct AcpiDescriptionHeaderInfo {
|
||||
UINT32* CreatorRevision;
|
||||
} ACPI_DESCRIPTION_HEADER_INFO;
|
||||
|
||||
/** This function is used to parse an ACPI table buffer.
|
||||
/**
|
||||
This function is used to parse an ACPI table buffer.
|
||||
|
||||
The ACPI table buffer is parsed using the ACPI table parser information
|
||||
specified by a pointer to an array of ACPI_PARSER elements. This parser
|
||||
@ -326,7 +340,7 @@ typedef struct AcpiDescriptionHeaderInfo {
|
||||
@param [in] ParserItems Number of items in the ACPI_PARSER array.
|
||||
|
||||
@retval Number of bytes parsed.
|
||||
*/
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
ParseAcpi (
|
||||
@ -337,19 +351,21 @@ ParseAcpi (
|
||||
IN UINT32 Length,
|
||||
IN CONST ACPI_PARSER* Parser,
|
||||
IN UINT32 ParserItems
|
||||
);
|
||||
);
|
||||
|
||||
/** This is a helper macro to pass parameters to the Parser functions.
|
||||
/**
|
||||
This is a helper macro to pass parameters to the Parser functions.
|
||||
|
||||
@param [in] Parser The name of the ACPI_PARSER array describing the
|
||||
ACPI table fields.
|
||||
*/
|
||||
**/
|
||||
#define PARSER_PARAMS(Parser) Parser, sizeof (Parser) / sizeof (Parser[0])
|
||||
|
||||
/** This is a helper macro for describing the ACPI header fields.
|
||||
/**
|
||||
This is a helper macro for describing the ACPI header fields.
|
||||
|
||||
@param [out] Info Pointer to retrieve the ACPI table header information.
|
||||
*/
|
||||
**/
|
||||
#define PARSE_ACPI_HEADER(Info) \
|
||||
{ L"Signature", 4, 0, NULL, Dump4Chars, \
|
||||
(VOID**)&(Info)->Signature , NULL, NULL }, \
|
||||
@ -370,30 +386,32 @@ ParseAcpi (
|
||||
{ L"Creator Revision", 4, 32, L"0x%X", NULL, \
|
||||
(VOID**)&(Info)->CreatorRevision, NULL, NULL }
|
||||
|
||||
/** Length of the ACPI GAS structure.
|
||||
/**
|
||||
Length of the ACPI GAS structure.
|
||||
|
||||
NOTE: This might normally be defined as
|
||||
sizeof (EFI_ACPI_6_2_GENERIC_ADDRESS_STRUCTURE).
|
||||
However, we deliberately minimise any reference to the EDK2 ACPI
|
||||
headers in an attempt to provide cross checking.
|
||||
*/
|
||||
**/
|
||||
#define GAS_LENGTH 12
|
||||
|
||||
/** Length of the ACPI Header structure.
|
||||
/**
|
||||
Length of the ACPI Header structure.
|
||||
|
||||
NOTE: This might normally be defined as
|
||||
sizeof (EFI_ACPI_DESCRIPTION_HEADER).
|
||||
However, we deliberately minimise any reference to the EDK2 ACPI
|
||||
headers in an attempt to provide cross checking.
|
||||
*/
|
||||
**/
|
||||
#define ACPI_DESCRIPTION_HEADER_LENGTH 36
|
||||
|
||||
/** This function indents and traces the GAS structure as described
|
||||
by the GasParser.
|
||||
/**
|
||||
This function indents and traces the GAS structure as described by the GasParser.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
@param [in] Indent Number of spaces to indent the output.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpGasStruct (
|
||||
@ -401,11 +419,12 @@ DumpGasStruct (
|
||||
IN UINT32 Indent
|
||||
);
|
||||
|
||||
/** This function traces the GAS structure as described by the GasParser.
|
||||
/**
|
||||
This function traces the GAS structure as described by the GasParser.
|
||||
|
||||
@param [in] Format Optional format string for tracing the data.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
DumpGas (
|
||||
@ -413,19 +432,21 @@ DumpGas (
|
||||
IN UINT8* Ptr
|
||||
);
|
||||
|
||||
/** This function traces the ACPI header as described by the AcpiHeaderParser.
|
||||
/**
|
||||
This function traces the ACPI header as described by the AcpiHeaderParser.
|
||||
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
|
||||
@retval Number of bytes parsed.
|
||||
*/
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
DumpAcpiHeader (
|
||||
IN UINT8* Ptr
|
||||
);
|
||||
|
||||
/** This function parses the ACPI header as described by the AcpiHeaderParser.
|
||||
/**
|
||||
This function parses the ACPI header as described by the AcpiHeaderParser.
|
||||
|
||||
This function optionally returns the Signature, Length and revision of the
|
||||
ACPI table.
|
||||
@ -436,7 +457,7 @@ DumpAcpiHeader (
|
||||
@param [out] Revision Gets location of the revision of the ACPI table.
|
||||
|
||||
@retval Number of bytes parsed.
|
||||
*/
|
||||
**/
|
||||
UINT32
|
||||
EFIAPI
|
||||
ParseAcpiHeader (
|
||||
@ -446,7 +467,8 @@ ParseAcpiHeader (
|
||||
OUT CONST UINT8** Revision
|
||||
);
|
||||
|
||||
/** 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.
|
||||
|
||||
@ -456,7 +478,7 @@ ParseAcpiHeader (
|
||||
@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 (
|
||||
@ -466,7 +488,8 @@ ParseAcpiBgrt (
|
||||
IN UINT8 AcpiTableRevision
|
||||
);
|
||||
|
||||
/** 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.
|
||||
|
||||
@ -476,7 +499,7 @@ ParseAcpiBgrt (
|
||||
@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 (
|
||||
@ -486,7 +509,8 @@ ParseAcpiDbg2 (
|
||||
IN UINT8 AcpiTableRevision
|
||||
);
|
||||
|
||||
/** 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
|
||||
@ -496,7 +520,7 @@ ParseAcpiDbg2 (
|
||||
@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 (
|
||||
@ -506,7 +530,8 @@ ParseAcpiDsdt (
|
||||
IN UINT8 AcpiTableRevision
|
||||
);
|
||||
|
||||
/** This function parses the ACPI FADT table.
|
||||
/**
|
||||
This function parses the ACPI FADT table.
|
||||
This function parses the FADT table and optionally traces the ACPI
|
||||
table fields.
|
||||
|
||||
@ -516,7 +541,7 @@ ParseAcpiDsdt (
|
||||
@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 (
|
||||
@ -526,7 +551,8 @@ ParseAcpiFadt (
|
||||
IN UINT8 AcpiTableRevision
|
||||
);
|
||||
|
||||
/** 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.
|
||||
|
||||
@ -540,7 +566,7 @@ ParseAcpiFadt (
|
||||
@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 (
|
||||
@ -550,7 +576,8 @@ ParseAcpiGtdt (
|
||||
IN UINT8 AcpiTableRevision
|
||||
);
|
||||
|
||||
/** This function parses the ACPI IORT table.
|
||||
/**
|
||||
This function parses the ACPI IORT table.
|
||||
When trace is enabled this function parses the IORT table and
|
||||
traces the ACPI fields.
|
||||
|
||||
@ -568,7 +595,7 @@ ParseAcpiGtdt (
|
||||
@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 (
|
||||
@ -578,7 +605,8 @@ ParseAcpiIort (
|
||||
IN UINT8 AcpiTableRevision
|
||||
);
|
||||
|
||||
/** 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.
|
||||
|
||||
@ -596,7 +624,7 @@ ParseAcpiIort (
|
||||
@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 (
|
||||
@ -606,7 +634,8 @@ ParseAcpiMadt (
|
||||
IN UINT8 AcpiTableRevision
|
||||
);
|
||||
|
||||
/** 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.
|
||||
|
||||
@ -616,7 +645,7 @@ ParseAcpiMadt (
|
||||
@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 (
|
||||
@ -626,7 +655,8 @@ ParseAcpiMcfg (
|
||||
IN UINT8 AcpiTableRevision
|
||||
);
|
||||
|
||||
/** 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.
|
||||
@ -638,7 +668,7 @@ ParseAcpiMcfg (
|
||||
@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 (
|
||||
@ -648,7 +678,8 @@ ParseAcpiRsdp (
|
||||
IN UINT8 AcpiTableRevision
|
||||
);
|
||||
|
||||
/** 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.
|
||||
|
||||
@ -661,7 +692,7 @@ ParseAcpiRsdp (
|
||||
@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 (
|
||||
@ -671,7 +702,8 @@ ParseAcpiSlit (
|
||||
IN UINT8 AcpiTableRevision
|
||||
);
|
||||
|
||||
/** 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.
|
||||
|
||||
@ -681,7 +713,7 @@ ParseAcpiSlit (
|
||||
@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 (
|
||||
@ -691,7 +723,8 @@ ParseAcpiSpcr (
|
||||
IN UINT8 AcpiTableRevision
|
||||
);
|
||||
|
||||
/** 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.
|
||||
|
||||
@ -707,7 +740,7 @@ ParseAcpiSpcr (
|
||||
@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 (
|
||||
@ -717,7 +750,8 @@ ParseAcpiSrat (
|
||||
IN UINT8 AcpiTableRevision
|
||||
);
|
||||
|
||||
/** 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
|
||||
@ -727,7 +761,7 @@ ParseAcpiSrat (
|
||||
@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 (
|
||||
@ -737,7 +771,8 @@ ParseAcpiSsdt (
|
||||
IN UINT8 AcpiTableRevision
|
||||
);
|
||||
|
||||
/** This function parses the ACPI XSDT table
|
||||
/**
|
||||
This function parses the ACPI XSDT table
|
||||
and optionally traces the ACPI table fields.
|
||||
|
||||
This function also performs validation of the XSDT table.
|
||||
@ -746,7 +781,7 @@ ParseAcpiSsdt (
|
||||
@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 (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
ACPI table parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -18,11 +18,13 @@
|
||||
#include "AcpiTableParser.h"
|
||||
#include "AcpiView.h"
|
||||
|
||||
/** A list of registered ACPI table parsers.
|
||||
*/
|
||||
/**
|
||||
A list of registered ACPI table parsers.
|
||||
**/
|
||||
STATIC ACPI_TABLE_PARSER mTableParserList[MAX_ACPI_TABLE_PARSERS];
|
||||
|
||||
/** Register the ACPI table Parser
|
||||
/**
|
||||
Register the ACPI table Parser
|
||||
|
||||
This function registers the ACPI table parser.
|
||||
|
||||
@ -35,7 +37,7 @@ STATIC ACPI_TABLE_PARSER mTableParserList[MAX_ACPI_TABLE_PARSERS];
|
||||
was already registered.
|
||||
@retval EFI_OUT_OF_RESOURCES No space to register the
|
||||
parser.
|
||||
*/
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
RegisterParser (
|
||||
@ -77,7 +79,8 @@ RegisterParser (
|
||||
return EFI_OUT_OF_RESOURCES;
|
||||
}
|
||||
|
||||
/** Deregister the ACPI table Parser
|
||||
/**
|
||||
Deregister the ACPI table Parser
|
||||
|
||||
This function deregisters the ACPI table parser.
|
||||
|
||||
@ -86,7 +89,7 @@ RegisterParser (
|
||||
@retval EFI_SUCCESS The parser was deregistered.
|
||||
@retval EFI_INVALID_PARAMETER A parameter is invalid.
|
||||
@retval EFI_NOT_FOUND A registered parser was not found.
|
||||
*/
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
DeregisterParser (
|
||||
@ -114,7 +117,8 @@ DeregisterParser (
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
/** Get the ACPI table Parser
|
||||
/**
|
||||
Get the ACPI table Parser
|
||||
|
||||
This function returns the ACPI table parser proc from the list of
|
||||
registered parsers.
|
||||
@ -125,7 +129,7 @@ DeregisterParser (
|
||||
@retval EFI_SUCCESS The parser was returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER A parameter is invalid.
|
||||
@retval EFI_NOT_FOUND A registered parser was not found.
|
||||
*/
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GetParser (
|
||||
@ -153,7 +157,8 @@ GetParser (
|
||||
return EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
/** This function processes the ACPI tables.
|
||||
/**
|
||||
This function processes the ACPI tables.
|
||||
This function calls ProcessTableReportOptions() to list the ACPI
|
||||
tables, perform binary dump of the tables and determine if the
|
||||
ACPI fields should be traced.
|
||||
@ -165,7 +170,7 @@ GetParser (
|
||||
|
||||
@param [in] Ptr Pointer to the start of the ACPI
|
||||
table data buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
ProcessAcpiTable (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
Header file for ACPI table parser
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -14,7 +14,8 @@
|
||||
#ifndef ACPITABLEPARSER_H_
|
||||
#define ACPITABLEPARSER_H_
|
||||
|
||||
/** The maximum number of ACPI table parsers.
|
||||
/**
|
||||
The maximum number of ACPI table parsers.
|
||||
*/
|
||||
#define MAX_ACPI_TABLE_PARSERS 16
|
||||
|
||||
@ -22,13 +23,14 @@
|
||||
*/
|
||||
#define ACPI_PARSER_SIGNATURE_NULL 0
|
||||
|
||||
/** A function that parses the ACPI table.
|
||||
/**
|
||||
A function that parses the ACPI table.
|
||||
|
||||
@param [in] Trace If TRUE, trace the ACPI fields.
|
||||
@param [in] Ptr Pointer to the start of the buffer.
|
||||
@param [in] AcpiTableLength Length of the ACPI table.
|
||||
@param [in] AcpiTableRevision Revision of the ACPI table.
|
||||
*/
|
||||
**/
|
||||
typedef
|
||||
VOID
|
||||
(EFIAPI * PARSE_ACPI_TABLE_PROC) (
|
||||
@ -38,8 +40,9 @@ VOID
|
||||
IN UINT8 AcpiTableRevision
|
||||
);
|
||||
|
||||
/** The ACPI table parser information
|
||||
*/
|
||||
/**
|
||||
The ACPI table parser information
|
||||
**/
|
||||
typedef struct AcpiTableParser {
|
||||
/// ACPI table signature
|
||||
UINT32 Signature;
|
||||
@ -48,7 +51,8 @@ typedef struct AcpiTableParser {
|
||||
PARSE_ACPI_TABLE_PROC Parser;
|
||||
} ACPI_TABLE_PARSER;
|
||||
|
||||
/** Register the ACPI table Parser
|
||||
/**
|
||||
Register the ACPI table Parser
|
||||
|
||||
This function registers the ACPI table parser.
|
||||
|
||||
@ -61,15 +65,16 @@ typedef struct AcpiTableParser {
|
||||
was already registered.
|
||||
@retval EFI_OUT_OF_RESOURCES No space to register the
|
||||
parser.
|
||||
*/
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
RegisterParser (
|
||||
IN UINT32 Signature,
|
||||
IN PARSE_ACPI_TABLE_PROC ParserProc
|
||||
);
|
||||
);
|
||||
|
||||
/** Deregister the ACPI table Parser
|
||||
/**
|
||||
Deregister the ACPI table Parser
|
||||
|
||||
This function deregisters the ACPI table parser.
|
||||
|
||||
@ -78,14 +83,15 @@ RegisterParser (
|
||||
@retval EFI_SUCCESS The parser was deregistered.
|
||||
@retval EFI_INVALID_PARAMETER A parameter is invalid.
|
||||
@retval EFI_NOT_FOUND A registered parser was not found.
|
||||
*/
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
DeregisterParser (
|
||||
IN UINT32 Signature
|
||||
);
|
||||
);
|
||||
|
||||
/** This function processes the ACPI tables.
|
||||
/**
|
||||
This function processes the ACPI tables.
|
||||
This function calls ProcessTableReportOptions() to list the ACPI
|
||||
tables, perform binary dump of the tables and determine if the
|
||||
ACPI fields should be traced.
|
||||
@ -97,14 +103,15 @@ DeregisterParser (
|
||||
|
||||
@param [in] Ptr Pointer to the start of the ACPI
|
||||
table data buffer.
|
||||
*/
|
||||
**/
|
||||
VOID
|
||||
EFIAPI
|
||||
ProcessAcpiTable (
|
||||
IN UINT8* Ptr
|
||||
);
|
||||
|
||||
/** Get the ACPI table Parser
|
||||
/**
|
||||
Get the ACPI table Parser
|
||||
|
||||
This function returns the ACPI table parser proc from the list of
|
||||
registered parsers.
|
||||
@ -115,7 +122,7 @@ ProcessAcpiTable (
|
||||
@retval EFI_SUCCESS The parser was returned successfully.
|
||||
@retval EFI_INVALID_PARAMETER A parameter is invalid.
|
||||
@retval EFI_NOT_FOUND A registered parser was not found.
|
||||
*/
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
GetParser (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
This program and the accompanying materials
|
||||
@ -35,8 +35,9 @@ STATIC BOOLEAN mVerbose;
|
||||
STATIC BOOLEAN mConsistencyCheck;
|
||||
STATIC BOOLEAN mColourHighlighting;
|
||||
|
||||
/** An array of acpiview command line parameters.
|
||||
*/
|
||||
/**
|
||||
An array of acpiview command line parameters.
|
||||
**/
|
||||
STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
|
||||
{L"/?", TypeFlag},
|
||||
{L"-c", TypeFlag},
|
||||
@ -48,10 +49,11 @@ STATIC CONST SHELL_PARAM_ITEM ParamList[] = {
|
||||
{NULL, TypeMax}
|
||||
};
|
||||
|
||||
/** This function returns the colour highlighting status.
|
||||
/**
|
||||
This function returns the colour highlighting status.
|
||||
|
||||
@retval TRUE if colour highlighting is enabled.
|
||||
*/
|
||||
**/
|
||||
BOOLEAN
|
||||
GetColourHighlighting (
|
||||
VOID
|
||||
@ -60,9 +62,12 @@ GetColourHighlighting (
|
||||
return mColourHighlighting;
|
||||
}
|
||||
|
||||
/** This function sets the colour highlighting status.
|
||||
/**
|
||||
This function sets the colour highlighting status.
|
||||
|
||||
*/
|
||||
@param Highlight The Highlight status.
|
||||
|
||||
**/
|
||||
VOID
|
||||
SetColourHighlighting (
|
||||
BOOLEAN Highlight
|
||||
@ -71,10 +76,11 @@ SetColourHighlighting (
|
||||
mColourHighlighting = Highlight;
|
||||
}
|
||||
|
||||
/** This function returns the report options.
|
||||
/**
|
||||
This function returns the report options.
|
||||
|
||||
@retval Returns the report option.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
EREPORT_OPTION
|
||||
GetReportOption (
|
||||
@ -84,10 +90,11 @@ GetReportOption (
|
||||
return mReportType;
|
||||
}
|
||||
|
||||
/** This function returns the selected ACPI table.
|
||||
/**
|
||||
This function returns the selected ACPI table.
|
||||
|
||||
@retval Returns signature of the selected ACPI table.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
UINT32
|
||||
GetSelectedAcpiTable (
|
||||
@ -97,13 +104,15 @@ GetSelectedAcpiTable (
|
||||
return mSelectedAcpiTable;
|
||||
}
|
||||
|
||||
/** This function dumps the ACPI table to a file.
|
||||
/**
|
||||
This function dumps the ACPI table to a file.
|
||||
|
||||
@param [in] Ptr Pointer to the ACPI table data.
|
||||
@param [in] Length The length of the ACPI table.
|
||||
|
||||
@retval TRUE Success.
|
||||
@retval FALSE Failure.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
BOOLEAN
|
||||
DumpAcpiTableToFile (
|
||||
@ -160,14 +169,15 @@ DumpAcpiTableToFile (
|
||||
return (Length == TransferBytes);
|
||||
}
|
||||
|
||||
/** This function processes the table reporting options for the ACPI table.
|
||||
/**
|
||||
This function processes the table reporting options for the ACPI table.
|
||||
|
||||
@param [in] Signature The ACPI table Signature.
|
||||
@param [in] TablePtr Pointer to the ACPI table data.
|
||||
@param [in] Length The length fo the ACPI table.
|
||||
|
||||
@retval Returns TRUE if the ACPI table should be traced.
|
||||
*/
|
||||
**/
|
||||
BOOLEAN
|
||||
ProcessTableReportOptions (
|
||||
IN CONST UINT32 Signature,
|
||||
@ -249,13 +259,14 @@ ProcessTableReportOptions (
|
||||
return Log;
|
||||
}
|
||||
|
||||
/** This function converts a string to ACPI table signature.
|
||||
/**
|
||||
This function converts a string to ACPI table signature.
|
||||
|
||||
@param [in] Str Pointer to the string to be converted to the
|
||||
ACPI table signature.
|
||||
|
||||
@retval The ACPI table signature.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
UINT32
|
||||
ConvertStrToAcpiSignature (
|
||||
@ -277,16 +288,16 @@ ConvertStrToAcpiSignature (
|
||||
return *(UINT32*)Ptr;
|
||||
}
|
||||
|
||||
/** This function iterates the configuration table entries in the
|
||||
system table, retrieves the RSDP pointer and starts parsing
|
||||
the ACPI tables.
|
||||
/**
|
||||
This function iterates the configuration table entries in the
|
||||
system table, retrieves the RSDP pointer and starts parsing the ACPI tables.
|
||||
|
||||
@param [in] SystemTable Pointer to the EFI system table.
|
||||
|
||||
@retval Returns EFI_NOT_FOUND if the RSDP pointer is not found.
|
||||
Returns EFI_UNSUPPORTED if the RSDP version is less than 2.
|
||||
Returns EFI_SUCCESS if successful.
|
||||
*/
|
||||
**/
|
||||
STATIC
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@ -406,7 +417,7 @@ AcpiView (
|
||||
|
||||
@param[in] ImageHandle Handle to the Image (NULL if Internal).
|
||||
@param[in] SystemTable Pointer to the System Table (NULL if Internal).
|
||||
*/
|
||||
**/
|
||||
SHELL_STATUS
|
||||
EFIAPI
|
||||
ShellCommandRunAcpiView (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
Header file for AcpiView
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.
|
||||
@ -14,20 +14,24 @@
|
||||
#ifndef ACPIVIEW_H_
|
||||
#define ACPIVIEW_H_
|
||||
|
||||
/** A macro to define the max file name length
|
||||
*/
|
||||
/**
|
||||
A macro to define the max file name length
|
||||
**/
|
||||
#define MAX_FILE_NAME_LEN 128
|
||||
|
||||
/** Offset to the RSDP revision from the start of the RSDP
|
||||
*/
|
||||
/**
|
||||
Offset to the RSDP revision from the start of the RSDP
|
||||
**/
|
||||
#define RSDP_REVISION_OFFSET 15
|
||||
|
||||
/** Offset to the RSDP length from the start of the RSDP
|
||||
*/
|
||||
/**
|
||||
Offset to the RSDP length from the start of the RSDP
|
||||
**/
|
||||
#define RSDP_LENGTH_OFFSET 20
|
||||
|
||||
/** The EREPORT_OPTION enum describes ACPI table Reporting options.
|
||||
*/
|
||||
/**
|
||||
The EREPORT_OPTION enum describes ACPI table Reporting options.
|
||||
**/
|
||||
typedef enum ReportOption {
|
||||
EREPORT_ALL, ///< Report All tables.
|
||||
EREPORT_SELECTED, ///< Report Selected table.
|
||||
@ -36,63 +40,72 @@ typedef enum ReportOption {
|
||||
EREPORT_MAX
|
||||
} EREPORT_OPTION;
|
||||
|
||||
/** This function resets the ACPI table error counter to Zero.
|
||||
*/
|
||||
/**
|
||||
This function resets the ACPI table error counter to Zero.
|
||||
**/
|
||||
VOID
|
||||
ResetErrorCount (
|
||||
VOID
|
||||
);
|
||||
|
||||
/** This function returns the ACPI table error count.
|
||||
/**
|
||||
This function returns the ACPI table error count.
|
||||
|
||||
@retval Returns the count of errors detected in the ACPI tables.
|
||||
*/
|
||||
**/
|
||||
UINT32
|
||||
GetErrorCount (
|
||||
VOID
|
||||
);
|
||||
|
||||
/** This function resets the ACPI table warning counter to Zero.
|
||||
*/
|
||||
/**
|
||||
This function resets the ACPI table warning counter to Zero.
|
||||
**/
|
||||
VOID
|
||||
ResetWarningCount (
|
||||
VOID
|
||||
);
|
||||
|
||||
/** This function returns the ACPI table warning count.
|
||||
/**
|
||||
This function returns the ACPI table warning count.
|
||||
|
||||
@retval Returns the count of warning detected in the ACPI tables.
|
||||
*/
|
||||
**/
|
||||
UINT32
|
||||
GetWarningCount (
|
||||
VOID
|
||||
);
|
||||
|
||||
/** This function returns the colour highlighting status.
|
||||
/**
|
||||
This function returns the colour highlighting status.
|
||||
|
||||
@retval TRUE if colour highlighting is enabled.
|
||||
*/
|
||||
**/
|
||||
BOOLEAN
|
||||
GetColourHighlighting (
|
||||
VOID
|
||||
);
|
||||
|
||||
/** This function sets the colour highlighting status.
|
||||
/**
|
||||
This function sets the colour highlighting status.
|
||||
|
||||
*/
|
||||
@param Highlight The Highlight status.
|
||||
|
||||
**/
|
||||
VOID
|
||||
SetColourHighlighting (
|
||||
BOOLEAN Highlight
|
||||
);
|
||||
|
||||
/** This function processes the table reporting options for the ACPI table.
|
||||
/**
|
||||
This function processes the table reporting options for the ACPI table.
|
||||
|
||||
@param [in] Signature The ACPI table Signature.
|
||||
@param [in] TablePtr Pointer to the ACPI table data.
|
||||
@param [in] Length The length fo the ACPI table.
|
||||
|
||||
@retval Returns TRUE if the ACPI table should be traced.
|
||||
*/
|
||||
**/
|
||||
BOOLEAN
|
||||
ProcessTableReportOptions (
|
||||
IN CONST UINT32 Signature,
|
||||
|
@ -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 (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
Main file for 'acpiview' Shell command function.
|
||||
|
||||
Copyright (c) 2016 - 2018, ARM Limited. All rights reserved.<BR>
|
||||
@ -49,7 +49,8 @@ ACPI_TABLE_PARSER ParserList[] = {
|
||||
{EFI_ACPI_6_2_EXTENDED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE, ParseAcpiXsdt}
|
||||
};
|
||||
|
||||
/** This function registers all the available table parsers.
|
||||
/**
|
||||
This function registers all the available table parsers.
|
||||
|
||||
@retval EFI_SUCCESS The parser is registered.
|
||||
@retval EFI_ALREADY_STARTED The parser for the ACPI Table
|
||||
@ -57,7 +58,7 @@ ACPI_TABLE_PARSER ParserList[] = {
|
||||
@retval EFI_INVALID_PARAMETER A parameter is invalid.
|
||||
@retval EFI_OUT_OF_RESOURCES No space to register the
|
||||
parser.
|
||||
*/
|
||||
**/
|
||||
EFI_STATUS
|
||||
RegisterAllParsers (
|
||||
)
|
||||
@ -80,7 +81,7 @@ RegisterAllParsers (
|
||||
Return the file name of the help text file if not using HII.
|
||||
|
||||
@return The string pointer to the file name.
|
||||
*/
|
||||
**/
|
||||
CONST CHAR16*
|
||||
EFIAPI
|
||||
ShellCommandGetManFileNameAcpiView (
|
||||
@ -101,7 +102,7 @@ ShellCommandGetManFileNameAcpiView (
|
||||
@retval EFI_SUCCESS The Shell command handlers were installed
|
||||
successfully.
|
||||
@retval EFI_DEVICE_ERROR Hii package failed to install.
|
||||
*/
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UefiShellAcpiViewCommandLibConstructor (
|
||||
@ -152,7 +153,7 @@ UefiShellAcpiViewCommandLibConstructor (
|
||||
|
||||
@param ImageHandle The image handle of the process.
|
||||
@param SystemTable The EFI System Table pointer.
|
||||
*/
|
||||
**/
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UefiShellAcpiViewCommandLibDestructor (
|
||||
|
@ -1,4 +1,4 @@
|
||||
/**
|
||||
/** @file
|
||||
Header file for 'acpiview' Shell command functions.
|
||||
|
||||
Copyright (c) 2016 - 2017, ARM Limited. All rights reserved.<BR>
|
||||
@ -21,7 +21,7 @@ extern EFI_HII_HANDLE gShellAcpiViewHiiHandle;
|
||||
|
||||
@param[in] ImageHandle Handle to the Image (NULL if Internal).
|
||||
@param[in] SystemTable Pointer to the System Table (NULL if Internal).
|
||||
*/
|
||||
**/
|
||||
SHELL_STATUS
|
||||
EFIAPI
|
||||
ShellCommandRunAcpiView (
|
||||
|
Loading…
x
Reference in New Issue
Block a user