I try use asm("sti") and run in qemu.
and if i select my OS in grub all stopped
if I remove asm("sti") all work
Who may help me?
Sorry for my bad English I'm from Russia.
Help with sti
Re: Help with sti
STI, re-enables interrupts, are you using it in a place that you need to have interrupts
disabled? If so that could cause a crash and reboot. Also make sure you disable interrupts
before re-enabling them (CLI) other wise the system may crash if they are already
enabled.
Kinda need more information than that. even a snippet code will help of where the code is
going faulty.
disabled? If so that could cause a crash and reboot. Also make sure you disable interrupts
before re-enabling them (CLI) other wise the system may crash if they are already
enabled.
Kinda need more information than that. even a snippet code will help of where the code is
going faulty.
My hero, is Mel.
Re: Help with sti
Hello,
When GRUB passes control to your system it is running in protected mode with interrupts disabled. You need to re-initialize the PIC or APIC with your IDT before enabling hardware interrupts (sti).
If these are already set up perhaps posting some code and providing more information can help.
When GRUB passes control to your system it is running in protected mode with interrupts disabled. You need to re-initialize the PIC or APIC with your IDT before enabling hardware interrupts (sti).
If these are already set up perhaps posting some code and providing more information can help.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
- Owen
- Member
- Posts: 1700
- Joined: Fri Jun 13, 2008 3:21 pm
- Location: Cambridge, United Kingdom
- Contact:
Re: Help with sti
Sorry, but this is patently wrong.Coddy wrote:Also make sure you disable interrupts before re-enabling them (CLI) other wise the system may crash if they are already enabled.
Re: Help with sti
Where did you put you 'sti' ?
"Programmers are tools for converting caffeine into code."
Re: Help with sti
Why do people appologize for their shoddy English, but not for their shoddy knowledge of the subject?Sv9toi wrote:Sorry for my bad English I'm from Russia.
JAL
Re: Help with sti
No one should have to apologize for NOT knowing something. Anyone who expects them to is an @$$.jal wrote:Why do people appologize for their shoddy English, but not for their shoddy knowledge of the subject?Sv9toi wrote:Sorry for my bad English I'm from Russia.
Re: Help with sti
You are aware that we have a certain "required knowledge" at this forum, right?-m32 wrote:No one should have to apologize for NOT knowing something. Anyone who expects them to is an @$$.
JAL
Re: Help with sti
neon wrote:Hello,
When GRUB passes control to your system it is running in protected mode with interrupts disabled. You need to re-initialize the PIC or APIC with your IDT before enabling hardware interrupts (sti).
If these are already set up perhaps posting some code and providing more information can help.
OK) It's work .
Ps I'm 12 yo. my father S.O. programmer and he learn me. If you want say, that you have big brain, you may do it in other places.
Last edited by Sv9toi on Thu Apr 15, 2010 8:10 am, edited 1 time in total.
Re: Help with sti
Knowing you're that young, and non-native English speaker, I applaud you for trying, but please, read the wiki on getting started, and the forum rules if you haven't done so yet. We are not here to teach youngsters.Sv9toi wrote:Ps I'm 12 yo. my father S.O. programmer and he learn me. If you want say, that you have big brain, you may do it in other places.
JAL