|
@@ -735,10 +735,16 @@ EfiAttributeToLoongArchAttribute (
|
|
|
}
|
|
|
|
|
|
// Write protection attributes
|
|
|
- if ((EfiAttributes & EFI_MEMORY_RO) != 0) {
|
|
|
+ if (((EfiAttributes & EFI_MEMORY_RO) != 0) ||
|
|
|
+ ((EfiAttributes & EFI_MEMORY_WP) != 0))
|
|
|
+ {
|
|
|
LoongArchAttributes &= ~PAGE_DIRTY;
|
|
|
}
|
|
|
|
|
|
+ if (EfiAttributes & EFI_MEMORY_RP) {
|
|
|
+ LoongArchAttributes |= PAGE_NO_READ;
|
|
|
+ }
|
|
|
+
|
|
|
//eXecute protection attribute
|
|
|
if ((EfiAttributes & EFI_MEMORY_XP) != 0) {
|
|
|
LoongArchAttributes |= PAGE_NO_EXEC;
|