From 2fe24171acec5e032cc19ce6b958d3274062d00d Mon Sep 17 00:00:00 2001 From: Chao Li Date: Thu, 29 Aug 2024 15:51:31 +0800 Subject: [PATCH] UefiCpuPkg: Using the new name of LoongArch CSR 0x20 register Since the LoongArch SPEC has adjusted the CSR 0x20 register name and the MdePkg also added the new name, so enable it in UefiCpuPkg. Cc: Ray Ni Cc: Rahul Kumar Cc: Gerd Hoffmann Cc: Jiaxin Wu Signed-off-by: Chao Li --- .../LoongArch/LoongArch64/ArchExceptionHandler.c | 2 +- UefiCpuPkg/Library/MpInitLib/LoongArch64/MpLib.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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; }