diff --git a/Makefile b/Makefile index c4f5406..d7ae0dc 100644 --- a/Makefile +++ b/Makefile @@ -116,15 +116,6 @@ test: kaleid @ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > loader_disasm64.asm @ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > loader_disasm32.asm - -test32: kernel loader - qemu-system-i386 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -enable-kvm 2> qemu.log & - @ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > loader_disasm64.asm - @ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > loader_disasm32.asm - -debug: kernel loader - qemu-system-x86_64 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -s -S -enable-kvm 2> qemu.log & - test32: kaleid @qemu-system-i386 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -enable-kvm 2> qemu.log & @ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > loader_disasm64.asm diff --git a/Makefile.in b/Makefile.in index 194b4ce..eec9b98 100644 --- a/Makefile.in +++ b/Makefile.in @@ -60,25 +60,25 @@ TCC=$(CC2NAME) $(COPTIM) $(CWARNS) $(CINCLUDES) KCC=$(CC) -D_OSK_SOURCE -D_KALEID_KERNEL comm-convert: - COMPILE_CONVRT1(itoa) -D_NEED_ITOA - COMPILE_CONVRT1(ltoa) -D_NEED_LTOA - COMPILE_CONVRT1(utoa) -D_NEED_UTOA - COMPILE_CONVRT1(ultoa) -D_NEED_ULTOA - COMPILE_CONVRT2(atoi) -D_NEED_ATOI - COMPILE_CONVRT2(atol) -D_NEED_ATOL - COMPILE_CONVRT2(atou) -D_NEED_ATOU - COMPILE_CONVRT2(atoul) -D_NEED_ATOUL + @COMPILE_CONVRT1(itoa) -D_NEED_ITOA + @COMPILE_CONVRT1(ltoa) -D_NEED_LTOA + @COMPILE_CONVRT1(utoa) -D_NEED_UTOA + @COMPILE_CONVRT1(ultoa) -D_NEED_ULTOA + @COMPILE_CONVRT2(atoi) -D_NEED_ATOI + @COMPILE_CONVRT2(atol) -D_NEED_ATOL + @COMPILE_CONVRT2(atou) -D_NEED_ATOU + @COMPILE_CONVRT2(atoul) -D_NEED_ATOUL common: comm-convert - COMPILE_COMMON(rand) - COMPILE_COMMON(ctype) - COMPILE_COMMON(string) - COMPILE_COMMON(status) - COMPILE_COMMON(memory) -fno-strict-aliasing - COMPILE_COMMON(strtol) - COMPILE_COMMON(sprintf) - COMPILE_COMMON(../extras/prog) - COMPILE_COMMON(../extras/argv) + @COMPILE_COMMON(rand) + @COMPILE_COMMON(ctype) + @COMPILE_COMMON(string) + @COMPILE_COMMON(status) + @COMPILE_COMMON(memory) -fno-strict-aliasing + @COMPILE_COMMON(strtol) + @COMPILE_COMMON(sprintf) + @COMPILE_COMMON(../extras/prog) + @COMPILE_COMMON(../extras/argv) tests: common $(TCC) -c $(LINXDIR)/test-common.c -o $(LOBJDIR)/test-common.o @@ -92,12 +92,12 @@ KOBJDIR=$(OBJDIR)/$(KERNDIR) KERNOBJS=KOBJ6(init/init, init/table, ke/panic, io/term, io/cursor, io/vga) kernel: common - COMPILE_KERNEL(init/init) - COMPILE_KERNEL(init/table) - COMPILE_KERNEL(ke/panic) - COMPILE_KERNEL(io/cursor) - COMPILE_KERNEL(io/term) - COMPILE_KERNEL(io/vga) + @COMPILE_KERNEL(init/init) + @COMPILE_KERNEL(init/table) + @COMPILE_KERNEL(ke/panic) + @COMPILE_KERNEL(io/cursor) + @COMPILE_KERNEL(io/term) + @COMPILE_KERNEL(io/vga) //LINK_KERNEL(kaleid-kernel.elf) //----------------------------------------------------------------------------# diff --git a/boot/loader/cpu/cpu.inc b/boot/loader/cpu/cpu.inc index 2bf937a..5fa0a5d 100644 --- a/boot/loader/cpu/cpu.inc +++ b/boot/loader/cpu/cpu.inc @@ -23,9 +23,9 @@ ; along with OS/K. If not, see . ; ;=----------------------------------------------------------------------------=; -global temporize -global bitemporize -global tritemporize +[global temporize] +[global bitemporize] +[global tritemporize] [BITS 64] diff --git a/boot/loader/io/terminal.inc b/boot/loader/io/terminal.inc index 2df0252..c2bce9a 100644 --- a/boot/loader/io/terminal.inc +++ b/boot/loader/io/terminal.inc @@ -22,7 +22,7 @@ ; You should have received a copy of the GNU General Public License ; ; along with OS/K. If not, see . ; ;=----------------------------------------------------------------------------=; -global testf +[global testf] ;;VIDEO %define TRAM 0xB8000 ; [T]ext[RAM] diff --git a/kaleid/kernel/init/init.c b/kaleid/kernel/init/init.c index 39858b5..943d3a5 100644 --- a/kaleid/kernel/init/init.c +++ b/kaleid/kernel/init/init.c @@ -45,6 +45,6 @@ noreturn void StartKern(void *mbInfo, int mbMagic) *vga = ('A') | (0x0F << 8); // We're out - //StartPanic("Goodbye World :("); + StartPanic("Goodbye World :("); } diff --git a/kaleid/kernel/ke/panic.c b/kaleid/kernel/ke/panic.c index 4e8c7d6..366dd14 100644 --- a/kaleid/kernel/ke/panic.c +++ b/kaleid/kernel/ke/panic.c @@ -55,6 +55,8 @@ noreturn void StartPanic(const char *fmt, ...) if (GetCurProc()) _SetCurProc(NULL); if (GetStdOut() == NULL) CrashSystem(); + HaltCPU(); + GetStdOut()->ClearTermUnlocked(GetStdOut()); if (fmt == NULL) {