9c0d035a创建于 2025年2月20日历史提交
From bdbeb6e653d7bbaa5eb4ad104119abfc7030c285 Mon Sep 17 00:00:00 2001
From: Xianglai Li <lixianglai@loongson.cn>
Date: Mon, 25 Nov 2024 16:16:39 +0800
Subject: [PATCH] fixup fdt parse error

Signed-off-by: Xianglai Li <lixianglai@loongson.cn>
---
 .../Library/SerialPortLib/EarlySerialPortLib16550.c             | 2 +-
 Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c       | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Platform/Loongson/LoongArchQemuPkg/Library/SerialPortLib/EarlySerialPortLib16550.c b/Platform/Loongson/LoongArchQemuPkg/Library/SerialPortLib/EarlySerialPortLib16550.c
index c713c6e9..dd64a000 100644
--- a/Platform/Loongson/LoongArchQemuPkg/Library/SerialPortLib/EarlySerialPortLib16550.c
+++ b/Platform/Loongson/LoongArchQemuPkg/Library/SerialPortLib/EarlySerialPortLib16550.c
@@ -155,7 +155,7 @@ GetSerialConsolePortAddress (
   }

 

   // Determine the actual path length, as a colon terminates the path.

-  Path = ScanMem8 (Prop, ':', PropSize);

+  Path = ScanMem8 (Prop, PropSize, (UINT8)":");

   if (Path == NULL) {

     PathLen = AsciiStrLen (Prop);

   } else {

diff --git a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c
index 84bb8e8a..02982cd0 100644
--- a/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c
+++ b/Platform/Loongson/LoongArchQemuPkg/PlatformPei/Platform.c
@@ -193,7 +193,7 @@ GetSerialConsolePortAddress (
   }

 

   // Determine the actual path length, as a colon terminates the path.

-  Path = ScanMem8 (Prop, ':', PropSize);

+  Path = ScanMem8 (Prop, PropSize, (UINT8)":");

   if (Path == NULL) {

     PathLen = AsciiStrLen (Prop);

   } else {

-- 
2.41.0