diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-09-25 12:24:24 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-09-25 12:24:24 +0300 |
| commit | 13fe461374c0716404e2ee7726781b9cd12dbaa7 (patch) | |
| tree | 8081e42fbebe8561d87f4e685e0f2c38b40fc0c4 /arch/riscv/include/pages.h | |
| parent | 68fcd6d027b88581992b4fb10ee1edc301e30678 (diff) | |
| download | kmi-13fe461374c0716404e2ee7726781b9cd12dbaa7.tar.gz kmi-13fe461374c0716404e2ee7726781b9cd12dbaa7.zip | |
Added default stack location
Diffstat (limited to 'arch/riscv/include/pages.h')
| -rw-r--r-- | arch/riscv/include/pages.h | 46 |
1 files changed, 5 insertions, 41 deletions
diff --git a/arch/riscv/include/pages.h b/arch/riscv/include/pages.h index 9e16c00..1533f7b 100644 --- a/arch/riscv/include/pages.h +++ b/arch/riscv/include/pages.h @@ -2,50 +2,14 @@ #define APOS_RISCV_PAGES_H #include <apos/types.h> +#include <apos/pmem.h> -typedef uint8_t pagemask_t; -typedef uint8_t lockbit_t; /* assume riscv64 for now */ typedef uint64_t pm_t; -struct mm_kpages { - pagemask_t page[64]; -}; - -struct mm_mpages { - lockbit_t lockbit[64]; - pagemask_t empty[64]; - pagemask_t full[64]; - struct mm_kpages kilo[512]; -}; - -/* Sv39 */ -struct mm_gpages { - lockbit_t lockbit[64]; - pagemask_t empty[64]; - pagemask_t full[64]; - struct mm_mpages mega[512]; -}; - -struct mm_tpages { - lockbit_t lockbit[64]; - pagemask_t empty[64]; - pagemask_t full[64]; - struct mm_gpages giga[512]; -}; - -struct mm_ptinfo { - short tera_num; - struct terapages *tera_top; - - short giga_num; - struct gigapages *giga_top; - - short mega_num; - struct megapages *mega_top; - - short kilo_num; - struct kilopages *kilo_top; -}; +#define MM_KPAGE MM_O0 +#define MM_MPAGE MM_O1 +#define MM_GPAGE MM_O2 +#define MM_TPAGE MM_O3 #endif /* APOS_RISCV_PAGES_H */ |
