public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Sami Mujawar" <sami.mujawar@arm.com>
To: <devel@edk2.groups.io>
Cc: Sami Mujawar <sami.mujawar@arm.com>, <ardb+tianocore@kernel.org>,
	<quic_llindhol@quicinc.com>, <kraxel@redhat.com>,
	<pierre.gondois@arm.com>, <Alexei.Fedorov@arm.com>,
	<Matteo.Carlini@arm.com>, <Akanksha.Jain2@arm.com>,
	<Ben.Adderson@arm.com>, <nd@arm.com>
Subject: [PATCH v1 2/4] DynamicTablesPkg: Fix parsing of serial port node
Date: Mon, 20 Mar 2023 14:05:55 +0000	[thread overview]
Message-ID: <20230320140557.40348-3-sami.mujawar@arm.com> (raw)
In-Reply-To: <20230320140557.40348-1-sami.mujawar@arm.com>

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.mujawar@arm.com>
---
 DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c b/DynamicTablesPkg/Library/FdtHwInfoParserLib/Serial/ArmSerialPortParser.c
index cfd032df4d746ad2a414a0258d99fe670f1928a2..732b482eebe3754543167e45737e48242fddf065 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 {
-- 
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'


  parent reply	other threads:[~2023-03-20 14:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 14:05 [PATCH v1 0/4] Bug fixes for DynamicTablesPkg and ArmVirtPkg/kvmtool Sami Mujawar
2023-03-20 14:05 ` [PATCH v1 1/4] DynamicTablesPkg: Reduce log output from TableHelperLib Sami Mujawar
2023-03-20 14:05 ` Sami Mujawar [this message]
2023-03-20 14:05 ` [PATCH v1 3/4] ArmVirtPkg: Fix parsing of serial port node Sami Mujawar
2023-03-20 14:05 ` [PATCH v1 4/4] ArmVirtPkg: Fix depex in kvmtool guest Rtc library Sami Mujawar
2023-03-21 13:54 ` [PATCH v1 0/4] Bug fixes for DynamicTablesPkg and ArmVirtPkg/kvmtool PierreGondois
2023-03-29 10:49 ` Sami Mujawar
2023-03-29 11:55   ` Ard Biesheuvel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230320140557.40348-3-sami.mujawar@arm.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox