Xiang Wang has uploaded this change for review.

View Change

riscv: Fix the definition of DEFINE_MPRV_READ

Must to set MXR, when needs to read the page which is execution-only.
So make this change.

Change-Id: I19519782fe791982a8fbd48ef33b5a92a3c48bfc
Signed-off-by: Xiang Wang <wxjstz@126.com>
---
M src/arch/riscv/include/vm.h
1 file changed, 1 insertion(+), 1 deletion(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/28394/1
diff --git a/src/arch/riscv/include/vm.h b/src/arch/riscv/include/vm.h
index a30d6bb..60a8fb7 100644
--- a/src/arch/riscv/include/vm.h
+++ b/src/arch/riscv/include/vm.h
@@ -42,7 +42,7 @@
static inline type name(type *p); \
static inline type name(type *p) \
{ \
- size_t mprv = MSTATUS_MPRV; \
+ size_t mprv = MSTATUS_MPRV | MSTATUS_MXR; \
type value; \
asm ( \
"csrs mstatus, %1\n" \

To view, visit change 28394. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I19519782fe791982a8fbd48ef33b5a92a3c48bfc
Gerrit-Change-Number: 28394
Gerrit-PatchSet: 1
Gerrit-Owner: Xiang Wang <wxjstz@126.com>