From 1ae33226faf32c202cb36b7a0e868fba4cd5b8cd Mon Sep 17 00:00:00 2001 From: Xiaotian Wu Date: Tue, 26 Nov 2024 15:06:15 +0800 Subject: [PATCH] Update LoongArch virtual machine to fix fdt parse error --- edk2.spec | 7 ++++++- fixup-fdt-parse-error.patch | 40 +++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 fixup-fdt-parse-error.patch diff --git a/edk2.spec b/edk2.spec index 9f0f3ae..50405ed 100644 --- a/edk2.spec +++ b/edk2.spec @@ -1,4 +1,4 @@ -%define anolis_release 7 +%define anolis_release 8 %undefine _auto_set_build_flags ExclusiveArch: x86_64 aarch64 loongarch64 @@ -63,6 +63,7 @@ Source81: edk2-build # LoongArch patches for edk2-platforms Source90: 0023-Platform-Loongson-Remove-minimium-memory-size-limita.patch Source91: 0024-Platform-Loongson-Modify-loongarch-uefi-firmware-siz.patch +Source92: fixup-fdt-parse-error.patch Patch0001: 0001-MdePkg-Add-StandardSignatureIsHygonGenuine-in-BaseCp.patch Patch0002: 0002-UefiCpuPkg-LocalApicLib-Exclude-second-SendIpi-seque.patch @@ -252,6 +253,7 @@ cp -a -- \ # so the patches must be applied after edk2-platforms is unpacked. %{__patch} -p1 -i %{SOURCE90} %{__patch} -p1 -i %{SOURCE91} +%{__patch} -p1 -i %{SOURCE92} %build @@ -495,6 +497,9 @@ install -m 0644 \ %changelog +* Tue Nov 26 2024 Xiaotian Wu - 202402-8 +- Update LoongArch virtual machine to fix fdt parse error + * Mon Nov 25 2024 gaochang - 202402-7 - Fix CVE-2023-45236/45237 regression - Fix boot failure on aarch64 platform diff --git a/fixup-fdt-parse-error.patch b/fixup-fdt-parse-error.patch new file mode 100644 index 0000000..f1ac873 --- /dev/null +++ b/fixup-fdt-parse-error.patch @@ -0,0 +1,40 @@ +From bdbeb6e653d7bbaa5eb4ad104119abfc7030c285 Mon Sep 17 00:00:00 2001 +From: Xianglai Li +Date: Mon, 25 Nov 2024 16:16:39 +0800 +Subject: [PATCH] fixup fdt parse error + +Signed-off-by: Xianglai Li +--- + .../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 + -- Gitee