From cc6a0cff99503f5bda5d14a20e98f29e8780a3c0 Mon Sep 17 00:00:00 2001 From: Sami Mujawar Date: Mon, 12 Dec 2022 10:51:03 +0000 Subject: DynamicTablesPkg: Fix parsing of serial port node When scanning for the Serial Port in the device tree, the length and value parameters to ScanMem8() are not in the right order. This results in the serial port not being detected if the chosen node in the device tree has additional elements. Therefore, pass the parameters to ScanMem8() in the correct order to fix this issue. Reviewed-by: Pierre Gondois Signed-off-by: Sami Mujawar --- .../Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'DynamicTablesPkg') diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c index cfd032d..732b482 100644 --- a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c +++ b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c @@ -1,7 +1,7 @@ /** @file Arm Serial Port Parser. - Copyright (c) 2021, ARM Limited. All rights reserved.
+ Copyright (c) 2021 - 2023, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent @par Reference(s): @@ -290,7 +290,7 @@ GetSerialConsoleNode ( } // Determine the actual path length, as a colon terminates the path. - Path = ScanMem8 (Prop, ':', PropSize); + Path = ScanMem8 (Prop, PropSize, ':'); if (Path == NULL) { PathLen = (UINT32)AsciiStrLen (Prop); } else { -- cgit v1.1