]> xenbits.xensource.com Git - ovmf.git/commitdiff
DynamicTablesPkg: Fix parsing of serial port node
authorSami Mujawar <sami.mujawar@arm.com>
Mon, 12 Dec 2022 10:51:03 +0000 (10:51 +0000)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 29 Mar 2023 13:48:54 +0000 (13:48 +0000)
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>
DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c

index cfd032df4d746ad2a414a0258d99fe670f1928a2..732b482eebe3754543167e45737e48242fddf065 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Arm Serial Port Parser.\r
 \r
-  Copyright (c) 2021, ARM Limited. All rights reserved.<BR>\r
+  Copyright (c) 2021 - 2023, Arm Limited. All rights reserved.<BR>\r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
   @par Reference(s):\r
@@ -290,7 +290,7 @@ GetSerialConsoleNode (
   }\r
 \r
   // Determine the actual path length, as a colon terminates the path.\r
-  Path = ScanMem8 (Prop, ':', PropSize);\r
+  Path = ScanMem8 (Prop, PropSize, ':');\r
   if (Path == NULL) {\r
     PathLen = (UINT32)AsciiStrLen (Prop);\r
   } else {\r