diff --git a/Makefile b/Makefile index 844e096..c33f483 100644 --- a/Makefile +++ b/Makefile @@ -157,20 +157,20 @@ $(KOBJDIR)/%.o: %.c $(INCLUDEDIR)/*/*.h | $(KOBJDIR) @echo ${CL2}[$@] ${CL}Compiled.${CL3} test: all - @qemu-system-x86_64 -rtc base=localtime -m 4G -hda $(BUILDDIR)/bin/disk.img -soundhw pcspk \ + @qemu-system-x86_64 -soundhw all -rtc base=localtime -m 4G -hda $(BUILDDIR)/bin/disk.img -soundhw pcspk \ -d cpu_reset,guest_errors,pcall,int 2> $(BUILDDIR)/qemu.log & test32: all @qemu-system-i386 -hda $(BUILDDIR)/bin/disk.img -d cpu_reset,guest_errors,pcall,int 2> $(BUILDDIR)/qemu.log & debug: all - @qemu-system-x86_64 -m 64M -hda $(BUILDDIR)/bin/disk.img -no-reboot -soundhw pcspk \ + @qemu-system-x86_64 -soundhw pcspk -rtc base=localtime -m 64M -hda $(BUILDDIR)/bin/disk.img -no-reboot -soundhw pcspk \ -no-shutdown -d cpu_reset,guest_errors,pcall,int 2> $(BUILDDIR)/qemu.log & @ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > $(BUILDDIR)/kaleid64_disasm.asm @ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > $(BUILDDIR)/kaleid32_disasm.asm gdb: all - @qemu-system-x86_64 -m 64M -hda $(BUILDDIR)/bin/disk.img -no-reboot -soundhw pcspk \ + @qemu-system-x86_64 -m 64M -soundhw pcspk -rtc base=localtime -hda $(BUILDDIR)/bin/disk.img -no-reboot -soundhw pcspk \ -no-shutdown -d cpu_reset,guest_errors,pcall,int -s -S 2> $(BUILDDIR)/qemu.log & @ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > kaleid64_disasm.asm @ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > kaleid32_disasm.asm diff --git a/kaleid/kernel/init/init.c b/kaleid/kernel/init/init.c index a9384b1..dcf2687 100644 --- a/kaleid/kernel/init/init.c +++ b/kaleid/kernel/init/init.c @@ -95,10 +95,11 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg) /* i++; */ /* } */ - KernLog("Goodbye at %s\n", IoGetRtcTimeChar()); - + IoDoBeep(); + KernLog("Goodbye at %s\n", IoGetRtcTimeChar()); + // End this machine's suffering BStdOut->flusher(BStdOut); KeCrashSystem(); diff --git a/kaleid/kernel/io/spkr.c b/kaleid/kernel/io/spkr.c index 301c3dc..0b41b20 100644 --- a/kaleid/kernel/io/spkr.c +++ b/kaleid/kernel/io/spkr.c @@ -53,7 +53,7 @@ void IoDoBeep(void) // Worst possible way of waiting // We need actual timers ulong ticks = IoGetRtcTicks(); - while (IoGetRtcTicks() < ticks + 512); + while (IoGetRtcTicks() < ticks + 5*2048); IoQuietSpeaker(); }