diff --git a/kaleid/kernel/init/init.c b/kaleid/kernel/init/init.c index eec679d..e955dac 100644 --- a/kaleid/kernel/init/init.c +++ b/kaleid/kernel/init/init.c @@ -87,16 +87,9 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg) IoPrintRtcTime(); - KernLog("There was %d ticks\n", IoGetRtcTicks()); - - int *var = 7 * GB; - *var = 1; - - 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 ec5fad6..3ffe592 100644 --- a/kaleid/kernel/io/spkr.c +++ b/kaleid/kernel/io/spkr.c @@ -48,13 +48,16 @@ void IoQuietSpeaker(void) void IoDoBeep(void) { + ulong flags = KePauseIRQs(); IoStartSpeaker(1000); + KeRestoreIRQs(flags); // Worst possible way of waiting // We need actual timers ulong ticks = IoGetRtcTicks(); - while (IoGetRtcTicks() < ticks + 1024); + while (IoGetRtcTicks() < ticks + 2*1024); IoQuietSpeaker(); + }