diff --git a/UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/LoongArch64/ArchExceptionHandler.c b/UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/LoongArch64/ArchExceptionHandler.c index c0219deba5..519fe1e24e 100644 --- a/UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/LoongArch64/ArchExceptionHandler.c +++ b/UefiCpuPkg/Library/CpuExceptionHandlerLib/LoongArch/LoongArch64/ArchExceptionHandler.c @@ -260,7 +260,7 @@ IpiInterruptHandler ( // // Set $a0 as APIC ID and $a1 as parameter value. // - SystemContext.SystemContextLoongArch64->R4 = CsrRead (LOONGARCH_CSR_CPUNUM); + SystemContext.SystemContextLoongArch64->R4 = CsrRead (LOONGARCH_CSR_CPUID); SystemContext.SystemContextLoongArch64->R5 = Parameter; } diff --git a/UefiCpuPkg/Library/MpInitLib/LoongArch64/MpLib.c b/UefiCpuPkg/Library/MpInitLib/LoongArch64/MpLib.c index 54c23ecf10..ff2c033da6 100644 --- a/UefiCpuPkg/Library/MpInitLib/LoongArch64/MpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/LoongArch64/MpLib.c @@ -60,7 +60,7 @@ GetApicId ( { UINTN CpuNum; - CpuNum = CsrRead (LOONGARCH_CSR_CPUNUM); + CpuNum = CsrRead (LOONGARCH_CSR_CPUID); return CpuNum & 0x3ff; }