Step 1 : In StartPanic is the real problem
This commit is contained in:
parent
348c3b7ead
commit
4ba948669f
9
Makefile
9
Makefile
|
@ -116,15 +116,6 @@ test: kaleid
|
||||||
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > loader_disasm64.asm
|
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 64 > loader_disasm64.asm
|
||||||
@ndisasm $(BINDIR)/kaleid -o 0x00100000 -b 32 > loader_disasm32.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
|
test32: kaleid
|
||||||
@qemu-system-i386 -hda build/bin/disk.img -d cpu_reset,guest_errors,pcall,int -enable-kvm 2> qemu.log &
|
@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 64 > loader_disasm64.asm
|
||||||
|
|
46
Makefile.in
46
Makefile.in
|
@ -60,25 +60,25 @@ TCC=$(CC2NAME) $(COPTIM) $(CWARNS) $(CINCLUDES)
|
||||||
KCC=$(CC) -D_OSK_SOURCE -D_KALEID_KERNEL
|
KCC=$(CC) -D_OSK_SOURCE -D_KALEID_KERNEL
|
||||||
|
|
||||||
comm-convert:
|
comm-convert:
|
||||||
COMPILE_CONVRT1(itoa) -D_NEED_ITOA
|
@COMPILE_CONVRT1(itoa) -D_NEED_ITOA
|
||||||
COMPILE_CONVRT1(ltoa) -D_NEED_LTOA
|
@COMPILE_CONVRT1(ltoa) -D_NEED_LTOA
|
||||||
COMPILE_CONVRT1(utoa) -D_NEED_UTOA
|
@COMPILE_CONVRT1(utoa) -D_NEED_UTOA
|
||||||
COMPILE_CONVRT1(ultoa) -D_NEED_ULTOA
|
@COMPILE_CONVRT1(ultoa) -D_NEED_ULTOA
|
||||||
COMPILE_CONVRT2(atoi) -D_NEED_ATOI
|
@COMPILE_CONVRT2(atoi) -D_NEED_ATOI
|
||||||
COMPILE_CONVRT2(atol) -D_NEED_ATOL
|
@COMPILE_CONVRT2(atol) -D_NEED_ATOL
|
||||||
COMPILE_CONVRT2(atou) -D_NEED_ATOU
|
@COMPILE_CONVRT2(atou) -D_NEED_ATOU
|
||||||
COMPILE_CONVRT2(atoul) -D_NEED_ATOUL
|
@COMPILE_CONVRT2(atoul) -D_NEED_ATOUL
|
||||||
|
|
||||||
common: comm-convert
|
common: comm-convert
|
||||||
COMPILE_COMMON(rand)
|
@COMPILE_COMMON(rand)
|
||||||
COMPILE_COMMON(ctype)
|
@COMPILE_COMMON(ctype)
|
||||||
COMPILE_COMMON(string)
|
@COMPILE_COMMON(string)
|
||||||
COMPILE_COMMON(status)
|
@COMPILE_COMMON(status)
|
||||||
COMPILE_COMMON(memory) -fno-strict-aliasing
|
@COMPILE_COMMON(memory) -fno-strict-aliasing
|
||||||
COMPILE_COMMON(strtol)
|
@COMPILE_COMMON(strtol)
|
||||||
COMPILE_COMMON(sprintf)
|
@COMPILE_COMMON(sprintf)
|
||||||
COMPILE_COMMON(../extras/prog)
|
@COMPILE_COMMON(../extras/prog)
|
||||||
COMPILE_COMMON(../extras/argv)
|
@COMPILE_COMMON(../extras/argv)
|
||||||
|
|
||||||
tests: common
|
tests: common
|
||||||
$(TCC) -c $(LINXDIR)/test-common.c -o $(LOBJDIR)/test-common.o
|
$(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)
|
KERNOBJS=KOBJ6(init/init, init/table, ke/panic, io/term, io/cursor, io/vga)
|
||||||
|
|
||||||
kernel: common
|
kernel: common
|
||||||
COMPILE_KERNEL(init/init)
|
@COMPILE_KERNEL(init/init)
|
||||||
COMPILE_KERNEL(init/table)
|
@COMPILE_KERNEL(init/table)
|
||||||
COMPILE_KERNEL(ke/panic)
|
@COMPILE_KERNEL(ke/panic)
|
||||||
COMPILE_KERNEL(io/cursor)
|
@COMPILE_KERNEL(io/cursor)
|
||||||
COMPILE_KERNEL(io/term)
|
@COMPILE_KERNEL(io/term)
|
||||||
COMPILE_KERNEL(io/vga)
|
@COMPILE_KERNEL(io/vga)
|
||||||
//LINK_KERNEL(kaleid-kernel.elf)
|
//LINK_KERNEL(kaleid-kernel.elf)
|
||||||
|
|
||||||
//----------------------------------------------------------------------------#
|
//----------------------------------------------------------------------------#
|
||||||
|
|
|
@ -23,9 +23,9 @@
|
||||||
; along with OS/K. If not, see <https://www.gnu.org/licenses/>. ;
|
; along with OS/K. If not, see <https://www.gnu.org/licenses/>. ;
|
||||||
;=----------------------------------------------------------------------------=;
|
;=----------------------------------------------------------------------------=;
|
||||||
|
|
||||||
global temporize
|
[global temporize]
|
||||||
global bitemporize
|
[global bitemporize]
|
||||||
global tritemporize
|
[global tritemporize]
|
||||||
|
|
||||||
[BITS 64]
|
[BITS 64]
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
; You should have received a copy of the GNU General Public License ;
|
; You should have received a copy of the GNU General Public License ;
|
||||||
; along with OS/K. If not, see <https://www.gnu.org/licenses/>. ;
|
; along with OS/K. If not, see <https://www.gnu.org/licenses/>. ;
|
||||||
;=----------------------------------------------------------------------------=;
|
;=----------------------------------------------------------------------------=;
|
||||||
global testf
|
[global testf]
|
||||||
|
|
||||||
;;VIDEO
|
;;VIDEO
|
||||||
%define TRAM 0xB8000 ; [T]ext[RAM]
|
%define TRAM 0xB8000 ; [T]ext[RAM]
|
||||||
|
|
|
@ -45,6 +45,6 @@ noreturn void StartKern(void *mbInfo, int mbMagic)
|
||||||
*vga = ('A') | (0x0F << 8);
|
*vga = ('A') | (0x0F << 8);
|
||||||
|
|
||||||
// We're out
|
// We're out
|
||||||
//StartPanic("Goodbye World :(");
|
StartPanic("Goodbye World :(");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -55,6 +55,8 @@ noreturn void StartPanic(const char *fmt, ...)
|
||||||
if (GetCurProc()) _SetCurProc(NULL);
|
if (GetCurProc()) _SetCurProc(NULL);
|
||||||
if (GetStdOut() == NULL) CrashSystem();
|
if (GetStdOut() == NULL) CrashSystem();
|
||||||
|
|
||||||
|
HaltCPU();
|
||||||
|
|
||||||
GetStdOut()->ClearTermUnlocked(GetStdOut());
|
GetStdOut()->ClearTermUnlocked(GetStdOut());
|
||||||
|
|
||||||
if (fmt == NULL) {
|
if (fmt == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue