Shutdown !

This commit is contained in:
Adrien Bourmault 2019-05-07 23:39:05 +02:00
parent 39e46a072f
commit 079e2ab5f8
2 changed files with 5 additions and 1 deletions

View File

@ -98,7 +98,7 @@ KernSources = kernel/cpu/cpuid.c \
kernel/mm/gdt.c kernel/ps/sched.c \
kernel/init/info.c kernel/init/ssp.c \
kernel/io/rtc.c kernel/io/keyb.c \
kernel/io/spkr.c
kernel/io/spkr.c kernel/po/shtdwn.c
LibCObj=$(patsubst %.c,$(KOBJDIR)/%.o,$(LibCSources))

View File

@ -30,6 +30,7 @@
#include <kernel/mm.h>
#include <kernel/time.h>
#include <kernel/speaker.h>
#include <kernel/pwmgnt.h>
// info.c
extern void BtDoSanityChecks(uint mbMagic);
@ -90,6 +91,9 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg)
KernLog("Goodbye at %s\n", IoGetRtcTimeChar());
PoShutdownQemu();
// End this machine's suffering
BFlushBuf(BStdOut);
KeCrashSystem();