tests spkr

This commit is contained in:
Adrien Bourmault 2019-05-06 22:47:45 +02:00
parent 6e295c23e3
commit d9aad421a4
3 changed files with 7 additions and 6 deletions

View File

@ -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

View File

@ -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();

View File

@ -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();
}