diff options
| author | Shell <[email protected]> | 2023-03-16 10:26:55 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-03-16 10:26:55 +0800 |
| commit | 2394e75265891c83e3b9a00634a30c9ef1c7b13a (patch) | |
| tree | 32d2da5e852c4a584e6074688ba13e77703401c5 /libcpu | |
| parent | 65301b9cdd9c583ac6df17dfa80764c8e6e4b8ab (diff) | |
[libcpu/risc-v] support noncached normal memory (#7051)
* [libcpu/risc-v] support noncached normal memory
* [mm] check before dereference in _fetch_page
* [mm] add comments on ioremap
* [ioremap] report more info on failed
Diffstat (limited to 'libcpu')
| -rw-r--r-- | libcpu/risc-v/t-head/c906/riscv_mmu.h | 1 | ||||
| -rw-r--r-- | libcpu/risc-v/virt64/riscv_mmu.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/libcpu/risc-v/t-head/c906/riscv_mmu.h b/libcpu/risc-v/t-head/c906/riscv_mmu.h index ddb3d0277d..87db683b05 100644 --- a/libcpu/risc-v/t-head/c906/riscv_mmu.h +++ b/libcpu/risc-v/t-head/c906/riscv_mmu.h @@ -88,6 +88,7 @@ #define MMU_MAP_K_DEVICE PTE_WRAP(PAGE_ATTR_DEV | PTE_G | PAGE_ATTR_XN | PTE_V) #define MMU_MAP_K_RWCB PTE_WRAP(PAGE_ATTR_CB | PTE_G | PAGE_ATTR_RWX | PTE_V) +#define MMU_MAP_K_RW PTE_WRAP(PTE_G | PAGE_ATTR_RWX | PTE_V) #define MMU_MAP_U_RWCB PTE_WRAP(PAGE_ATTR_CB | PTE_U | PAGE_ATTR_RWX | PTE_V) #define MMU_MAP_U_RWCB_XN PTE_WRAP(PAGE_ATTR_CB | PTE_U | PAGE_ATTR_XN | PTE_V) #define MMU_MAP_U_RW PTE_WRAP(PTE_U | PAGE_ATTR_RWX | PTE_V) diff --git a/libcpu/risc-v/virt64/riscv_mmu.h b/libcpu/risc-v/virt64/riscv_mmu.h index fc5a143b65..2e255263f5 100644 --- a/libcpu/risc-v/virt64/riscv_mmu.h +++ b/libcpu/risc-v/virt64/riscv_mmu.h @@ -73,6 +73,7 @@ #define MMU_MAP_K_DEVICE (PTE_G | PTE_W | PTE_R | PTE_V) #define MMU_MAP_K_RWCB (PTE_G | PTE_X | PTE_W | PTE_R | PTE_V) +#define MMU_MAP_K_RW (PTE_G | PTE_X | PTE_W | PTE_R | PTE_V) #define MMU_MAP_U_RWCB (PTE_U | PTE_X | PTE_W | PTE_R | PTE_V) #define MMU_MAP_U_RWCB_XN (PTE_U | PTE_W | PTE_R | PTE_V) #define MMU_MAP_U_RW (PTE_U | PTE_X | PTE_W | PTE_R | PTE_V) |
