diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-08-17 21:47:38 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-08-17 21:49:16 +0300 |
| commit | 565724db3b73ee67fa996dab511dc52df586cee1 (patch) | |
| tree | d3bd77006c2c57aa961f85c4fc677bd72f6251ae /arch/riscv/include/pages.h | |
| download | kmi-565724db3b73ee67fa996dab511dc52df586cee1.tar.gz kmi-565724db3b73ee67fa996dab511dc52df586cee1.zip | |
Garbage
Diffstat (limited to 'arch/riscv/include/pages.h')
| -rw-r--r-- | arch/riscv/include/pages.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/arch/riscv/include/pages.h b/arch/riscv/include/pages.h new file mode 100644 index 0000000..4ae2ab9 --- /dev/null +++ b/arch/riscv/include/pages.h @@ -0,0 +1,47 @@ +#ifndef APOS_RISCV_PAGES_H +#define APOS_RISCV_PAGES_H + +typedef char pagemask_t; +typedef char lockbit_t; + +struct kilopages { + pagemask_t page[64]; +}; + +struct megapages { + lockbit_t lockbit[64]; + pagemask_t empty[64]; + pagemask_t full[64]; + struct kilopages kilo[512]; +}; + +/* Sv39 */ +struct gigapages { + lockbit_t lockbit[64]; + pagemask_t empty[64]; + pagemask_t full[64]; + struct megapages mega[512]; +}; + +struct terapages { + lockbit_t lockbit[64]; + pagemask_t empty[64]; + pagemask_t full[64]; + struct gigapages giga[512]; +}; + +struct mm_pagearr_info { + 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; +}; + +#endif /* APOS_RISCV_PAGES_H */ |
