OSDev.org

The Place to Start for Operating System Developers
It is currently Thu Mar 28, 2024 2:50 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: stopped receiving timer interrupts after task switch
PostPosted: Tue Aug 01, 2017 5:51 am 
Offline
Member
Member

Joined: Thu Mar 14, 2013 1:30 am
Posts: 78
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:
      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


Top
 Profile  
 
 Post subject: Re: stopped receiving timer interrupts after task switch
PostPosted: Tue Aug 01, 2017 5:58 am 
Offline
Member
Member

Joined: Wed Sep 19, 2012 3:43 am
Posts: 91
Location: The Netherlands
Does your code hang or is it just interrupts that stop working?
In the latter case, are you sending an EOI?


Top
 Profile  
 
 Post subject: Re: stopped receiving timer interrupts after task switch
PostPosted: Tue Aug 01, 2017 6:35 am 
Offline
Member
Member

Joined: Thu Mar 14, 2013 1:30 am
Posts: 78
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 50 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group