Step 1 : In StartPanic is the real problem

This commit is contained in:
Adrien Bourmault 2019-03-11 18:25:35 +01:00
parent 348c3b7ead
commit 4ba948669f
6 changed files with 30 additions and 37 deletions

View File

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

View File

@ -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)
//----------------------------------------------------------------------------#

View File

@ -23,9 +23,9 @@
; along with OS/K. If not, see <https://www.gnu.org/licenses/>. ;
;=----------------------------------------------------------------------------=;
global temporize
global bitemporize
global tritemporize
[global temporize]
[global bitemporize]
[global tritemporize]
[BITS 64]

View File

@ -22,7 +22,7 @@
; You should have received a copy of the GNU General Public License ;
; along with OS/K. If not, see <https://www.gnu.org/licenses/>. ;
;=----------------------------------------------------------------------------=;
global testf
[global testf]
;;VIDEO
%define TRAM 0xB8000 ; [T]ext[RAM]

View File

@ -45,6 +45,6 @@ noreturn void StartKern(void *mbInfo, int mbMagic)
*vga = ('A') | (0x0F << 8);
// We're out
//StartPanic("Goodbye World :(");
StartPanic("Goodbye World :(");
}

View File

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