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.
Octocontrabass
Member
Posts: 5560 Joined: Mon Mar 25, 2013 7:01 pm
Post
by Octocontrabass » Fri Nov 10, 2023 1:29 pm
KrotovOSdev wrote: I put stack to 0x4500 during the init process, when paging is not enabled. Should I put it to another address?
It's fine where it is now, as long as you've set up enough memory to hold it. You can always change it later.
KrotovOSdev wrote: If kmain() function returns, my code just execute "cli; hlt".
You shouldn't receive any interrupts after that.
KrotovOSdev
Member
Posts: 40 Joined: Sat Aug 12, 2023 1:48 am
Location: Nizhny Novgorod, Russia
Post
by KrotovOSdev » Wed Nov 15, 2023 1:02 pm
Octocontrabass wrote:
It's fine where it is now, as long as you've set up enough memory to hold it. You can always change it later
You shouldn't receive any interrupts after that.
Ok, thanks. I do not receive interrupts after the "cli" instruction, of course.
KrotovOSdev
Member
Posts: 40 Joined: Sat Aug 12, 2023 1:48 am
Location: Nizhny Novgorod, Russia
Post
by KrotovOSdev » Thu Nov 23, 2023 1:24 pm
Looks like I solved this problem by using interrupt or interrupt-like stack for task switching.
Thanks for your help.
Octocontrabass
Member
Posts: 5560 Joined: Mon Mar 25, 2013 7:01 pm
Post
by Octocontrabass » Thu Nov 23, 2023 1:40 pm
Interrupts are not necessary for task switching, so I really have to wonder why it didn't work for you.