diff options
author | Sami Mujawar <sami.mujawar@arm.com> | 2022-12-12 10:51:03 +0000 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2023-03-29 13:48:54 +0000 |
commit | cc6a0cff99503f5bda5d14a20e98f29e8780a3c0 (patch) | |
tree | b2c2494e86c84b890d7ce66a079d8fd1ada1cea7 /DynamicTablesPkg | |
parent | 31f0af7964f2a1ce63a15ee754e4df8b9568a01f (diff) | |
download | edk2-cc6a0cff99503f5bda5d14a20e98f29e8780a3c0.tar.gz edk2-cc6a0cff99503f5bda5d14a20e98f29e8780a3c0.tar.bz2 edk2-cc6a0cff99503f5bda5d14a20e98f29e8780a3c0.zip |
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>
Diffstat (limited to 'DynamicTablesPkg')
-rw-r--r-- | DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c index cfd032df4d..732b482eeb 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.<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 {
|