iret: return CS selector null
Posted: Tue Jan 13, 2015 12:06 pm
It wasn't much time from my last time posting my problem on this forum .. OS developing is hard (at least for me) .. Well whatever ...
My Error:
My interrupt handlers catch a GPF at 0x8:0x8A4A which is (i checked it with a dissassembler) in the function
as for PIC_EOI1:
and outb is:
I gave all the details i could .. Well , thanks in advance ...
My Error:
Code: Select all
Booting from 0000:7c00
00015731229e[CPU0 ] iret: return CS selector null
00104740000p[WINGUI] >>PANIC<< POWER button turned off.
00104740000i[CPU0 ] CPU is in protected mode (active)
00104740000i[CPU0 ] CS.mode = 32 bit
00104740000i[CPU0 ] SS.mode = 32 bit
00104740000i[CPU0 ] EFER = 0x00000000
00104740000i[CPU0 ] | EAX=00008a4a EBX=00007f44 ECX=00090000 EDX=00000000
00104740000i[CPU0 ] | ESP=000006f8 EBP=00000000 ESI=000e055d EDI=00007f44
00104740000i[CPU0 ] | IOPL=0 id vip vif ac vm rf nt of df if tf sf ZF af PF cf
00104740000i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D
00104740000i[CPU0 ] | CS:0008( 0001| 0| 0) 00000000 ffffffff 1 1
00104740000i[CPU0 ] | DS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00104740000i[CPU0 ] | SS:0018( 0003| 0| 0) 00000700 00000500 0 1
00104740000i[CPU0 ] | ES:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00104740000i[CPU0 ] | FS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00104740000i[CPU0 ] | GS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00104740000i[CPU0 ] | EIP=00008713 (00008713)
00104740000i[CPU0 ] | CR0=0x60000011 CR2=0x00000000
00104740000i[CPU0 ] | CR3=0x00000000 CR4=0x00000000
00104740000i[CPU0 ] 0x0000000000008713>> jmp .-2 (0x00008713) : EBFE
00104740000i[CMOS ] Last time is 1421172153 (Tue Jan 13 20:02:33 2015)
00104740000i[ ] restoring default signal behavior
00104740000i[SIM ] quit_sim called with exit code 1
Code: Select all
iretd
Code: Select all
PIT_IRQ:
inc dword[ticks]
call PIC_EOI1
iretd
Code: Select all
%define PIC1_CMD 0x20
%define PIC1_DATA 0x21
%define PIC2_CMD 0xa0
%define PIC2_DATA 0xa1
%define PIC_EOIV 0x20
PIC_EOI1:
outb PIC1_CMD,PIC_EOIV
ret
Code: Select all
%macro outb 2
push edx
push eax
mov dx,%1
mov al,%2
out dx,al
pop eax
pop edx
%endmacro