stopped receiving timer interrupts after task switch

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
stdcall
Member
Member
Posts: 78
Joined: Thu Mar 14, 2013 1:30 am

stopped receiving timer interrupts after task switch

Post 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
“Meaningless! Meaningless!”
says the Teacher.
“Utterly meaningless!
Everything is meaningless.” - Ecclesiastes 1, 2

Educational Purpose Operating System - EPOS
FusT
Member
Member
Posts: 91
Joined: Wed Sep 19, 2012 3:43 am
Location: The Netherlands

Re: stopped receiving timer interrupts after task switch

Post by FusT »

Does your code hang or is it just interrupts that stop working?
In the latter case, are you sending an EOI?
stdcall
Member
Member
Posts: 78
Joined: Thu Mar 14, 2013 1:30 am

Re: stopped receiving timer interrupts after task switch

Post 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.
“Meaningless! Meaningless!”
says the Teacher.
“Utterly meaningless!
Everything is meaningless.” - Ecclesiastes 1, 2

Educational Purpose Operating System - EPOS
Post Reply