[coreboot-gerrit] Change in coreboot[master]: riscv: Fix the definition of DEFINE_MPRV_READ

Xiang Wang (Code Review) gerrit at coreboot.org
Thu Aug 30 07:51:57 CEST 2018


Xiang Wang has uploaded this change for review. ( https://review.coreboot.org/28394


Change subject: riscv: Fix the definition of DEFINE_MPRV_READ
......................................................................

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 at 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 https://review.coreboot.org/28394
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/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 at 126.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180830/b8f3b177/attachment-0001.html>


More information about the coreboot-gerrit mailing list