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 3/4] ArmVirtPkg: Fix parsing of serial port node
Date: Mon, 20 Mar 2023 14:05:56 +0000 [thread overview]
Message-ID: <20230320140557.40348-4-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>
---
ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c
index fb1daf32769c20521e93de7af0f54a6a8e2c8369..c1b81920214b16137fd7c40b8ec897031e6fe9aa 100644
--- a/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c
+++ b/ArmVirtPkg/Library/Fdt16550SerialPortHookLib/EarlyFdt16550SerialPortHookLib.c
@@ -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 {
--
'Guid(CE165669-3EF3-493F-B85D-6190EE5B9759)'
next prev 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 ` [PATCH v1 2/4] DynamicTablesPkg: Fix parsing of serial port node Sami Mujawar
2023-03-20 14:05 ` Sami Mujawar [this message]
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-4-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