diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-10-11 23:18:47 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-10-11 23:18:47 +0300 |
| commit | 7237d673904d8568a2f9c290a0247c9d1a07c5d2 (patch) | |
| tree | 7deabe2dc64ddf05016eb3e3a4f22a7e252b5c35 /arch/riscv/include | |
| parent | ebd34a9ab3809167e16e4107c8e72d1d81faff9c (diff) | |
| download | kmi-7237d673904d8568a2f9c290a0247c9d1a07c5d2.tar.gz kmi-7237d673904d8568a2f9c290a0247c9d1a07c5d2.zip | |
Start designing vmem framework
Diffstat (limited to 'arch/riscv/include')
| -rw-r--r-- | arch/riscv/include/csr.h | 7 | ||||
| -rw-r--r-- | arch/riscv/include/vmem.h | 8 |
2 files changed, 5 insertions, 10 deletions
diff --git a/arch/riscv/include/csr.h b/arch/riscv/include/csr.h index 5da0882..ab25bdd 100644 --- a/arch/riscv/include/csr.h +++ b/arch/riscv/include/csr.h @@ -1,8 +1,11 @@ #ifndef APOS_CSR_H #define APOS_CSR_H -#define SATP_MODE_39 0x8000000000000000 -#define SATP_MODE_48 0x9000000000000000 +#include <apos/utils.h> + +#define SATP_MODE_Sv32 0x80000000 +#define SATP_MODE_Sv39 0x8000000000000000 +#define SATP_MODE_Sv48 0x9000000000000000 #define CSR_SATP 0x180 diff --git a/arch/riscv/include/vmem.h b/arch/riscv/include/vmem.h index 0aad780..ec2a3ba 100644 --- a/arch/riscv/include/vmem.h +++ b/arch/riscv/include/vmem.h @@ -1,7 +1,6 @@ #ifndef APOS_RISCV_VMAP_H #define APOS_RISCV_VMAP_H -#include <apos/sizes.h> #include <apos/types.h> #include <apos/attrs.h> @@ -19,11 +18,4 @@ struct __packed vm_branch_t { struct vm_branch_t *leaf[512]; }; -void map_vmem(struct vm_branch_t *branch, - pm_t paddr, vm_t vaddr, - uint8_t flags, enum mm_order_t order); - -void unmap_vmem(struct vm_branch_t *branch, vm_t vaddr, enum mm_order_t order); - - #endif /* APOS_RISCV_VMAP_H */ |
