diff --git a/qemu.sh b/qemu.sh index d1aaa9c..346f83d 100755 --- a/qemu.sh +++ b/qemu.sh @@ -3,9 +3,11 @@ build="$(dirname $0)/build" assets="$(dirname $0)/assets" debug="" +isaexit='-device isa-debug-exit,iobase=0xf4,iosize=0x04' debugtarget="${build}/jsix.elf" gfx="-nographic" vga="-vga none" +log="" kvm="" cpu="Broadwell,+pdpe1gb" smp=4 @@ -19,6 +21,7 @@ while true; do ;; -d | --debug) debug="-s -S" + isaexit="" shift ;; -g | --gfx) @@ -38,6 +41,10 @@ while true; do -c | --cpus) smp=$2 shift 2 + ;; + -l | --log) + log="-d mmu,int,guest_errors -D jsix.log" + shift ;; *) if [ -d "$1" ]; then @@ -77,15 +84,12 @@ exec qemu-system-x86_64 \ -drive "if=pflash,format=raw,readonly,file=${assets}/ovmf/x64/ovmf_code.fd" \ -drive "if=pflash,format=raw,file=${build}/ovmf_vars.fd" \ -drive "format=raw,file=${build}/jsix.img" \ - -device "isa-debug-exit,iobase=0xf4,iosize=0x04" \ -monitor telnet:localhost:45454,server,nowait \ -serial stdio \ -serial telnet:localhost:45455,server,nowait \ -smp "${smp}" \ - -m 512 \ - -d mmu,int,guest_errors \ - -D jsix.log \ + -m 4096 \ -cpu "${cpu}" \ -M q35 \ -no-reboot \ - $gfx $vga $kvm $debug + $isaexit $log $gfx $vga $kvm $debug