From 47b1d6116982c9e1e75c3f1bf9014fce7e2b0f9c Mon Sep 17 00:00:00 2001 From: Sami Mujawar Date: Mon, 12 Dec 2022 10:40:52 +0000 Subject: ArmVirtPkg: 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: Ard Biesheuvel Reviewed-by: Pierre Gondois Signed-off-by: Sami Mujawar --- .../Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ArmVirtPkg') diff --git a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c index fb1daf3276..c1b8192021 100644 --- a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c +++ b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c @@ -1,7 +1,7 @@ /** @file Early Platform Hook Library instance for 16550 Uart. - Copyright (c) 2020, ARM Ltd. All rights reserved.
+ Copyright (c) 2020 - 2023, Arm Ltd. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -67,7 +67,7 @@ GetSerialConsolePortAddress ( } // Determine the actual path length, as a colon terminates the path. - Path = ScanMem8 (Prop, ':', PropSize); + Path = ScanMem8 (Prop, PropSize, ':'); if (Path == NULL) { PathLen = AsciiStrLen (Prop); } else { -- cgit v1.2.3