diff options
author | Marvin Borner | 2021-03-14 16:12:44 +0100 |
---|---|---|
committer | GitHub | 2021-03-14 16:12:44 +0100 |
commit | 268f3ccdb90ab4b9bd70ca176478797aae97ca05 (patch) | |
tree | 2dbc3e52d90dab4aae8021773f09b6b72a74b8cb /run | |
parent | 4309322f9d2b3e31421a3cc5399ab1f4368e0652 (diff) | |
parent | 6dec7db5158447b66f31a3f786ce2916cab83cec (diff) |
Added memory management using paging
This was quite a roller-coaster and most things are slower now, but it works and is way more secure. I still need to implement things like shared memory for the WM/GUI system but other than that everything is supported.
Diffstat (limited to 'run')
-rwxr-xr-x | run | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -26,7 +26,7 @@ no_ask="${2}" # TODO: Support -enable-kvm: GPF?! qemu_with_flags() { network="rtl8139" - qemu-system-i386 -cpu max -no-reboot -vga std -rtc base=localtime -m 256M -netdev user,id=net0,hostfwd=tcp:127.0.0.1:8000-10.0.2.15:8000 -device $network,netdev=net0 -object filter-dump,id=dump,netdev=net0,file=dump.pcap "$@" + qemu-system-i386 -d guest_errors -cpu max -no-reboot -vga std -rtc base=localtime -m 256M -netdev user,id=net0,hostfwd=tcp:127.0.0.1:8000-10.0.2.15:8000 -device $network,netdev=net0 -object filter-dump,id=dump,netdev=net0,file=dump.pcap "$@" } make_cross() { @@ -126,7 +126,7 @@ make_build() { $SUDO dd if=build/boot.bin of=/dev/${VND}i conv=notrunc status=none else - $SUDO mke2fs -q build/disk.img + $SUDO mke2fs -b 1024 -q build/disk.img dd if=build/boot.bin of=build/disk.img conv=notrunc status=none fi @@ -186,7 +186,11 @@ make_addr() { echo "Usage: './run addr kernel 0x50042'" exit 1 fi - addr2line -e build/"$1".elf "$2" + addr2line -e build/"$1".elf -f -p "$2" +} + +make_cloc() { + cloc . --exclude-dir=build,iso,disk,res,cross } make_append_commands() { @@ -239,6 +243,8 @@ elif [ "${mode}" = "disasm" ]; then make_disasm "$2" "$3" elif [ "${mode}" = "addr" ]; then make_addr "$2" "$3" +elif [ "${mode}" = "cloc" ]; then + make_cloc elif [ "${mode}" = "sync" ]; then make_sync elif [ "${mode}" = "disk" ]; then @@ -267,6 +273,7 @@ else printf "again\t\tOpens QEMU again using the previous build\n" printf "disasm\t\tDisassembles a given part of Melvix\n" printf "addr\t\tResolves an address to a line of code\n" + printf "cloc\t\tCount the total lines of code\n" printf "sync\t\tSyncs the 'tags' and 'compile_commands.json' file\n" printf "disk\t\tPrepares the userspace disk (e.g. fonts)\n" printf "*\t\tAnything else prints this help\n" |