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. Signed-off-by: Sami Mujawar <sami.muja...@arm.com> --- ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c index fb1daf32769c20521e93de7af0f54a6a8e2c8369..c1b81920214b16137fd7c40b8ec897031e6fe9aa 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.<BR> + Copyright (c) 2020 - 2023, Arm Ltd. All rights reserved.<BR> 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 { -- 'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)' -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101448): https://edk2.groups.io/g/devel/message/101448 Mute This Topic: https://groups.io/mt/97731610/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-