summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChao Li <lichao@loongson.cn>2024-11-26 19:39:20 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-12-02 06:57:09 +0000
commit9a9bcacbe092fdada6268ef4007430976d945af7 (patch)
treea913d983891a4f76ebf86449fc42e610b04df5d5
parent9098efdf0dd82dea36b517e92ce7c5740e00b1eb (diff)
downloadedk2-9a9bcacbe092fdada6268ef4007430976d945af7.tar.gz
UefiCpuPkg/CpuMmuLib: Adjust default memory attributes on LoongArch
When updating memory attributes, if only access attributes are changed, the default memory cache attribute is NULL and a CACHE_CC is added by default. Signed-off-by: Chao Li <lichao@loongson.cn>
-rw-r--r--UefiCpuPkg/Library/CpuMmuLib/LoongArch64/CpuMmu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/UefiCpuPkg/Library/CpuMmuLib/LoongArch64/CpuMmu.c b/UefiCpuPkg/Library/CpuMmuLib/LoongArch64/CpuMmu.c
index 8f8254362f..6d77a1221f 100644
--- a/UefiCpuPkg/Library/CpuMmuLib/LoongArch64/CpuMmu.c
+++ b/UefiCpuPkg/Library/CpuMmuLib/LoongArch64/CpuMmu.c
@@ -595,6 +595,7 @@ EfiAttributeConverse (
LoongArchAttributes &= ~PAGE_DIRTY;
break;
default:
+ LoongArchAttributes |= CACHE_CC;
break;
}