diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-29 23:23:36 +0200 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2021-12-29 23:53:06 +0200 |
| commit | 4f4d9fdc89c27aa3346467a24b621954f4564d3b (patch) | |
| tree | c4ba4fb583a43b8fb27730b4cdb9b4b1395da91c /arch/riscv/kernel/pmem.c | |
| parent | 4e5595a089c815febd7a0d42ab62940bf13f73ac (diff) | |
| download | kmi-4f4d9fdc89c27aa3346467a24b621954f4564d3b.tar.gz kmi-4f4d9fdc89c27aa3346467a24b621954f4564d3b.zip | |
Refactoring
+ Mainly just moving stuff out or arch/riscv/ that should be handled in
common/
+ Prepared separate process stack/call stack for server callbacks, rest
to be implemeted soon ish
Diffstat (limited to 'arch/riscv/kernel/pmem.c')
| -rw-r--r-- | arch/riscv/kernel/pmem.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/riscv/kernel/pmem.c b/arch/riscv/kernel/pmem.c new file mode 100644 index 0000000..45b8eeb --- /dev/null +++ b/arch/riscv/kernel/pmem.c @@ -0,0 +1,15 @@ +#include <apos/pmem.h> + +int arch_pmem_conf(void *fdt, size_t *max_order, size_t *base_bits, size_t bits[ORDERS_NUM]) +{ + UNUSED(fdt); + + /* Sv39 for now */ + *max_order = 2; + *base_bits = 12; + /* we can assume bits[] is zeroed out beforehand */ + for(size_t i = 0; i <= *max_order; ++i) + bits[i] = 9; + + return 0; +} |
