summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKun Qin <kuqin@microsoft.com>2026-07-30 00:18:44 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2026-09-06 10:12:38 +0000
commitfe79213ad7f6b9492011477c7b8a9a73e10614bd (patch)
tree18dc4b22564d46fba3d730d00a8cbc0b23bf4fc3
parentd9fa44ff53a9f792e87aac1f3bd7a63e60e43130 (diff)
downloadedk2-fe79213ad7f6b9492011477c7b8a9a73e10614bd.tar.gz
edk2-fe79213ad7f6b9492011477c7b8a9a73e10614bd.zip
UefiCpuPkg: CpuExceptionHandlerLib: LoongArch ArchExceptionHandler ECC fix
This change fixes a few noticable NO-TARGET ECC check failures when building using GCC. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
-rw-r--r--UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/LoongArch64/ArchExceptionHandler.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/LoongArch64/ArchExceptionHandler.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/LoongArch64/ArchExceptionHandler.c
index 94dc306a42..4f3a1b3f6d 100644
--- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/LoongArch64/ArchExceptionHandler.c
+++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/LoongArch64/ArchExceptionHandler.c
@@ -267,7 +267,7 @@ IpiInterruptHandler (
//
do {
ResumeVector = IoCsrRead32 (LOONGARCH_IOCSR_MBUF0);
- } while (!ResumeVector);
+ } while (ResumeVector == 0);
//
// Get the resume vector if populated.
@@ -279,7 +279,8 @@ IpiInterruptHandler (
//
do {
Parameter = IoCsrRead32 (LOONGARCH_IOCSR_MBUF3);
- } while (!Parameter && --RereadCount);
+ --RereadCount;
+ } while ((Parameter == 0) && (RereadCount != 0));
//
// Get the parameter if populated.