00066339148i[CPU0 ] | CS:0000( 0004| 0| 0) 00000000 0000ffff 0 0
00066339148i[CPU0 ] | DS:07c0( 0005| 0| 0) 00007c00 0000ffff 0 0
00066339148i[CPU0 ] | SS:07c0( 0005| 0| 0) 00007c00 0000ffff 0 0
00066339148i[CPU0 ] | ES:0000( 0005| 0| 0) 00000000 0000ffff 0 0
00066339148i[CPU0 ] | FS:0000( 0005| 0| 0) 00000000 0000ffff 0 0
00066339148i[CPU0 ] | GS:0000( 0005| 0| 0) 00000000 0000ffff 0 0
00066339148i[CPU0 ] | EIP=00000701 (00000701)
00066339148i[CPU0 ] | CR0=0x60000010 CR2=0x00000000
00066339148i[CPU0 ] | CR3=0x00000000 CR4=0x00000000
00066339148i[CPU0 ] 0x00000701>> (invalid) : FFFF
00066339148e[CPU0 ] exception(): 3rd (12) exception with no resolution, shutdown status is 00h, resetting
I can only find exception(13) online, so I post this on the forum
I thought the problem is located in boot.s so I copy codes as following:
Code: Select all
.code16
.text
BOOTSEG = 0x07C0
SYSSEG = 0x1000
SYSLEN = 17
.global start
start:
ljmp $BOOTSEG, $go
go:
movw %cs, %ax #Initialize ds, ss and sp(>> end of head.s)
movw %ax, %ds
movw %ax, %ss
movw $0x0400, %sp
#Loading system from disk to memory by int 0x13:
Load:
movw $0x0000, %dx
movw $0x0002, %cx
movw $SYSSEG, %ax
xor %bx, %bx
movw $0x0200+SYSLEN, %ax
int $0x13
jnc ok_load
die: jmp die #In case for fault
ok_load:
#Here we copy kernel codes from 0x1000:0 to 0x0000:0
cli
movw $SYSSEG, %ax
movw %ax, %ds
xor %ax, %ax
movw %ax, %es
sub %si, %si
sub %di, %di
movw $0x1000, %cx
rep movsw
#Load IDT & GDT
movw $BOOTSEG, %ax
mov %ax, %ds
lidt lidt_48
lgdt lgdt_48
#Here we go for the protected mode
movw $0x0001, %ax
lmsw %ax
ljmp $8, $0
gdt:
.word 0, 0, 0, 0
.word 0x07ff
.word 0x0000
.word 0x9a00
.word 0x00c0
.word 0x07ff
.word 0x0000
.word 0x9200
.word 0x00c0
lidt_48:
.word 0, 0, 0
lgdt_48:
.word 0x07ff
.word 0x7c00+gdt, 0
.org 510
.word 0xAA55