DynamicTablesPkg: Add PrintString to CmObjParser

Add a PrintString to print strings in the CmObjParser.
String must be NULL terminated and no buffer overrun check
is done by this function.

Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
Pierre Gondois 2022-10-10 11:20:46 +02:00 committed by mergify[bot]
parent 020891f173
commit 48c6e7dbcd
1 changed files with 26 additions and 0 deletions

View File

@ -19,6 +19,14 @@ PrintOemId (
UINT8 *Ptr
);
STATIC
VOID
EFIAPI
PrintString (
CONST CHAR8 *Format,
UINT8 *Ptr
);
/** A parser for EArmObjBootArchInfo.
*/
STATIC CONST CM_OBJ_PARSER CmArmBootArchInfoParser[] = {
@ -646,6 +654,24 @@ PrintOemId (
));
}
/** Print string.
The string must be NULL terminated.
@param [in] Format Format to print the Ptr.
@param [in] Ptr Pointer to the string.
**/
STATIC
VOID
EFIAPI
PrintString (
CONST CHAR8 *Format,
UINT8 *Ptr
)
{
DEBUG ((DEBUG_ERROR, "%a", Ptr));
}
/** Print fields of the objects.
@param [in] Data Pointer to the object to print.