Improve memory/page init

Align heap start and caculate number of reserved pages
according to the length of ram available.

See
https://gitee.com/unicornx/riscv-operating-system-mooc/issues/I9LNCF.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
This commit is contained in:
Chen Wang
2024-06-04 21:15:33 +08:00
parent 0e16685c97
commit eb61470e22
33 changed files with 428 additions and 64 deletions

View File

@@ -12,6 +12,9 @@
*/
#define MAXNUM_CPU 8
/* used in os.ld */
#define LENGTH_RAM 128*1024*1024
/*
* MemoryMap
* see https://github.com/qemu/qemu/blob/master/hw/riscv/virt.c, virt_memmap[]