diff options
author | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-07-06 03:23:58 -0700 |
---|---|---|
committer | Andrew Waterman <waterman@cs.berkeley.edu> | 2016-07-06 03:23:58 -0700 |
commit | f6eff201069564ea01100d556b079f99e076dd09 (patch) | |
tree | 0b8932b0f1dd3dcf70ec86e972b91b2f97d2e5c0 /bbl | |
parent | 8b41191ccdf19f08662e2eb674a2eddc717d5108 (diff) | |
download | riscv-pk-f6eff201069564ea01100d556b079f99e076dd09.zip riscv-pk-f6eff201069564ea01100d556b079f99e076dd09.tar.gz riscv-pk-f6eff201069564ea01100d556b079f99e076dd09.tar.bz2 |
Udpate to new PTE format
Diffstat (limited to 'bbl')
-rw-r--r-- | bbl/bbl.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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); |