I have rewrited my kernel so it can support dynamic structures and now it isn't working ;/. I'm getting such message:
00003040491e[CPU0 ] interrupt(): gate descriptor is not valid sys seg
00003040491e[CPU0 ] interrupt(): gate descriptor is not valid sys seg
00003040491e[CPU0 ] interrupt(): gate descriptor is not valid sys seg
00003040491i[CPU0 ] protected mode
00003040491i[CPU0 ] CS.d_b = 32 bit
00003040491i[CPU0 ] SS.d_b = 32 bit
00003040491i[CPU0 ] | EAX=00000000 EBX=00000000 ECX=00000000 EDX=00000000
00003040491i[CPU0 ] | ESP=ffffffff EBP=00000000 ESI=00000000 EDI=00000000
00003040491i[CPU0 ] | IOPL=0 id vip vif ac vm RF nt of df IF tf sf zf af pf cf
00003040491i[CPU0 ] | SEG selector base limit G D
00003040491i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D
00003040491i[CPU0 ] | CS:0023( 0004| 0| 3) 00000000 000fffff 1 1
00003040491i[CPU0 ] | DS:002b( 0005| 0| 3) 00000000 000fffff 1 1
00003040491i[CPU0 ] | SS:002b( 0005| 0| 3) 00000000 000fffff 1 1
00003040491i[CPU0 ] | ES:002b( 0005| 0| 3) 00000000 000fffff 1 1
00003040491i[CPU0 ] | FS:002b( 0005| 0| 3) 00000000 000fffff 1 1
00003040491i[CPU0 ] | GS:002b( 0005| 0| 3) 00000000 000fffff 1 1
00003040491i[CPU0 ] | EIP=00400000 (00400000)
00003040491i[CPU0 ] | CR0=0x80000011 CR1=0 CR2=0x00000000
00003040491i[CPU0 ] | CR3=0x0001e000 CR4=0x00000000
00003040491i[CPU0 ] >> jmp .+0xfffffffe (0x00400000) : EBFE
00003040491e[CPU0 ] exception(): 3rd (13) exception with no resolution, shutdown status is 00h, resetting
00003040491i[SYS ] bx_pc_system_c::Reset(SOFTWARE) called
Does anybody could point me where can be a problem that i'm getting this 3x: "interrupt(): gate descriptor is not valid sys seg"?
This error occus directly after makeing IRETD to restore process. Process looks like this:
[BITS 32]
[ORG 0x400000]
jmp $
State of all registers is as I expected, in TSS i have just changed TSS.adress so there should not be a problem. Firs 4MB of paging are system but kernel code and stack, GDT,IDT,TSS,IOPBM, kernel data are set to user pages. I have no idea why it isn't working now ;/.
Please help.