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 <ardb@kernel.org>
Reviewed-by: Pierre Gondois <pierre.gondois@arm.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
Sami Mujawar 2022-12-12 10:40:52 +00:00 committed by mergify[bot]
parent cc6a0cff99
commit 47b1d61169
1 changed files with 2 additions and 2 deletions

View File

@ -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 {