2 Configuration Manager Object parser.
4 Copyright (c) 2021, ARM Limited. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef CONFIGURATION_MANAGER_OBJECT_PARSER_H_
10 #define CONFIGURATION_MANAGER_OBJECT_PARSER_H_
12 #define OUTPUT_FIELD_COLUMN_WIDTH 32
14 /** Function prototype to format a field print.
16 @param [in] Format Format string for tracing the data as specified by
17 the 'Format' member of ACPI_PARSER.
18 @param [in] Ptr Pointer to the start of the buffer.
20 typedef VOID (EFIAPI
*FNPTR_PRINT_FORMATTER
)(CONST CHAR8
*Format
, UINT8
*Ptr
);
23 The CM_OBJ_PARSER structure describes the fields of an CmObject and
24 provides means for the parser to interpret and trace appropriately.
26 ParseAcpi() uses the format string specified by 'Format' for tracing
29 typedef struct CmObjParser CM_OBJ_PARSER
;
31 /// String describing the Cm Object
34 /// The length of the field.
37 /// Optional Print() style format string for tracing the data. If not
38 /// used this must be set to NULL.
41 /// Optional pointer to a print formatter function which
42 /// is typically used to trace complex field information.
43 /// If not used this must be set to NULL.
44 /// The Format string is passed to the PrintFormatter function
45 /// but may be ignored by the implementation code.
46 FNPTR_PRINT_FORMATTER PrintFormatter
;
48 /// Optional pointer to print the fields of another CM_OBJ_PARSER
49 /// structure. This is useful to print sub-structures.
50 CONST CM_OBJ_PARSER
*SubObjParser
;
52 /// Count of items in the SubObj.
53 UINTN SubObjItemCount
;
57 A structure mapping an array of Configuration Manager Object parsers
58 with their object names.
60 typedef struct CmObjParserArray
{
62 CONST CHAR8
*ObjectName
;
64 /// Function pointer to the parser
65 CONST CM_OBJ_PARSER
*Parser
;
69 } CM_OBJ_PARSER_ARRAY
;
71 #endif // CONFIGURATION_MANAGER_OBJECT_PARSER_H_