aboutsummaryrefslogtreecommitdiff
path: root/bbl
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2016-07-06 03:23:58 -0700
committerAndrew Waterman <waterman@cs.berkeley.edu>2016-07-06 03:23:58 -0700
commitf6eff201069564ea01100d556b079f99e076dd09 (patch)
tree0b8932b0f1dd3dcf70ec86e972b91b2f97d2e5c0 /bbl
parent8b41191ccdf19f08662e2eb674a2eddc717d5108 (diff)
downloadpk-f6eff201069564ea01100d556b079f99e076dd09.zip
pk-f6eff201069564ea01100d556b079f99e076dd09.tar.gz
pk-f6eff201069564ea01100d556b079f99e076dd09.tar.bz2
Udpate to new PTE format
Diffstat (limited to 'bbl')
-rw-r--r--bbl/bbl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bbl/bbl.c b/bbl/bbl.c
index af2483f..efee22b 100644
--- a/bbl/bbl.c
+++ b/bbl/bbl.c
@@ -34,7 +34,7 @@ static void supervisor_vm_init()
int l2_shift = RISCV_PGLEVEL_BITS + RISCV_PGSHIFT;
size_t l2_idx = (info.first_user_vaddr >> l2_shift) & ((1 << RISCV_PGLEVEL_BITS)-1);
l2_idx += ((vaddr - info.first_user_vaddr) >> l2_shift);
- middle_pt[l2_idx] = pte_create(paddr >> RISCV_PGSHIFT, PTE_TYPE_SRWX_GLOBAL);
+ middle_pt[l2_idx] = pte_create(paddr >> RISCV_PGSHIFT, PTE_G | PTE_R | PTE_W | PTE_X);
}
// map SBI at top of vaddr space
@@ -43,7 +43,7 @@ static void supervisor_vm_init()
assert(num_sbi_pages <= (1 << RISCV_PGLEVEL_BITS));
for (uintptr_t i = 0; i < num_sbi_pages; i++) {
uintptr_t idx = (1 << RISCV_PGLEVEL_BITS) - num_sbi_pages + i;
- sbi_pt[idx] = pte_create((DRAM_BASE / RISCV_PGSIZE) + i, PTE_TYPE_SRX_GLOBAL);
+ sbi_pt[idx] = pte_create((DRAM_BASE / RISCV_PGSIZE) + i, PTE_G | PTE_R | PTE_X);
}
pte_t* sbi_pte = middle_pt + ((num_middle_pts << RISCV_PGLEVEL_BITS)-1);
assert(!*sbi_pte);