diff --git a/mm/memory.c b/mm/memory.c index efb1a0ae..6cad2520 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -161,6 +161,15 @@ int mmu_init(void) atomic_int32_inc(&total_available_pages); } + // Note: The last slot belongs always to the private memory. + for(addr=0xFF000000; addr<0xFFFFFFFF; addr+=PAGE_SIZE) { + page_clear_mark(addr >> PAGE_SHIFT); + if (addr > addr + PAGE_SIZE) + break; + atomic_int32_inc(&total_pages); + atomic_int32_inc(&total_available_pages); + } + /* * Mark the bootinfo as used. */ diff --git a/tools/Makefile b/tools/Makefile index 624860a1..baf8febe 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -50,7 +50,7 @@ SCC: scc_bootinfo.bin scc_setup.bin reset_vector.bin initrd.img bin2obj chmod a-x *.bin . ./prepare.sh ./bin2obj -m load.map -o metalsvm.obj - sccMerge -noimage -1slot -m 8 -n 12 -force ./metalsvm.mt + sccMerge -noimage -m 8 -n 12 -force ./metalsvm.mt clean: $(RM) -rf *.o *~ bin2obj make_initrd initrd.img *.bin *.obj *.hex *.elf obj