Page 1 of 1

stopped receiving timer interrupts after task switch

Posted: Tue Aug 01, 2017 5:51 am
by stdcall
Just right after I switch to the first kernel task timer interrupts stops occurring.
The steps I take:
1. Change page directory
2. Set TSS to kernel stack
3. Swtitch task using the following code:

What could be the reason for that ?

Code: Select all

      run_kernel_task:
      mov     eax, [esp+4] ; load task_register_t pointer to eax
  
      mov     ebx, [eax+4]
      mov     ecx, [eax+8]
      mov     edx, [eax+12]
      mov     ebp, [eax+16]
      mov     esi, [eax+20]
      mov     edi, [eax+24]
  
      ; restore the stack pointer
      mov     esp, [eax+32]
  
      ; push information for iret onto the stack
      push    DWORD [eax+36]          ; push EFLAGS
      push    DWORD [eax+40]          ; push the segment selector
      push    DWORD [eax+44]          ; push EIP
  
      mov     eax, [eax]              ; restore eax
      iret

https://github.com/mellowcandle/epOS

Re: stopped receiving timer interrupts after task switch

Posted: Tue Aug 01, 2017 5:58 am
by FusT
Does your code hang or is it just interrupts that stop working?
In the latter case, are you sending an EOI?

Re: stopped receiving timer interrupts after task switch

Posted: Tue Aug 01, 2017 6:35 am
by stdcall
FusT wrote: In the latter case, are you sending an EOI?
Argg... That was the problem, the I forgot to send EOI.


Thanks.

Ramon.