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 <pierre.gondois@arm.com>
Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
This commit is contained in:
Sami Mujawar 2022-12-12 10:51:03 +00:00 committed by mergify[bot]
parent 31f0af7964
commit cc6a0cff99
1 changed files with 2 additions and 2 deletions

View File

@ -1,7 +1,7 @@
/** @file
Arm Serial Port Parser.
Copyright (c) 2021, ARM Limited. All rights reserved.<BR>
Copyright (c) 2021 - 2023, Arm Limited. All rights reserved.<BR>
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 {