Can´t do reset! [Solved]
Can´t do reset! [Solved]
Hi all,
when I setup APIC mode, disable pic, start smp, OS Kernel goes ok! but I can´t do Reset...
I have been trying keyboard reset, idt with 0 size triple fault reset, and nothing...
my OS just freeze...
does anyone got an idea? just some start please!
thanks so much...
when I setup APIC mode, disable pic, start smp, OS Kernel goes ok! but I can´t do Reset...
I have been trying keyboard reset, idt with 0 size triple fault reset, and nothing...
my OS just freeze...
does anyone got an idea? just some start please!
thanks so much...
Last edited by digo_rp on Thu Jan 14, 2016 7:05 am, edited 1 time in total.
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: Can´t do reset!
TBH, I don't know much about SMP. But you can try ACPI reset. It's very simple, even simpler than ACPI shutdown.
EDIT: Forgot to say this, ACPI reset isn't supported on Bochs and QEMU, and appears to be broken in VirtualBox. It seems, you'll have to test it on real hardware.
EDIT: Forgot to say this, ACPI reset isn't supported on Bochs and QEMU, and appears to be broken in VirtualBox. It seems, you'll have to test it on real hardware.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
Re: Can´t do reset!
thank you so much.
I´ll check these out!
I´ll check these out!
-
- Member
- Posts: 1146
- Joined: Sat Mar 01, 2014 2:59 pm
Re: Can´t do reset!
I have used the triple fault reset before; I'm not sure why it's not working for you. I used to do it with interrupts enabled - not sure if that matters.
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
Re: Can´t do reset!
thanks... it is a kind of odd stuff...
I can´t figure out why it doesn´t Works.!!!
I can´t figure out why it doesn´t Works.!!!
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: Can´t do reset!
Did you try ACPI reset?
You know your OS is advanced when you stop using the Intel programming guide as a reference.
-
- Member
- Posts: 1146
- Joined: Sat Mar 01, 2014 2:59 pm
Re: Can´t do reset!
Maybe post the code that you're using for your triple-fault reset?
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
Re: Can´t do reset!
At some of my pcs is not supported!
I don´t understand why that happens...
when I use PIC 8259 Works ok! triple fault, keyboard reset, everything... when I change to APIC, nothing Works....
I don´t understand why that happens...
when I use PIC 8259 Works ok! triple fault, keyboard reset, everything... when I change to APIC, nothing Works....
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: Can´t do reset!
Why not try something like this?
Code: Select all
void reset()
{
disable_apic();
enable_pic();
disable_smp();
outportb(0x64,0xFE); // keyboard reset
while(1);
}
You know your OS is advanced when you stop using the Intel programming guide as a reference.
Re: Can´t do reset!
hum... cool thanks.. I´ll try this...
thanks so much...
thanks so much...
-
- Member
- Posts: 1146
- Joined: Sat Mar 01, 2014 2:59 pm
Re: Can´t do reset!
Sounds good, replace the keyboard reset with your preferred reset method (or try each in turn, from order of most supported to least supported, for maximum compatibility). I was going to suggest something similar to this since he mentioned that the issue occurs only when using the APIC but it is OK when using the PIC.omarrx024 wrote:Why not try something like this?Code: Select all
void reset() { disable_apic(); enable_pic(); disable_smp(); outportb(0x64,0xFE); // keyboard reset while(1); }
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: Can´t do reset!
Of course, you should try ACPI reset first. If that doesn't work, then try the keyboard reset. If all doesn't work, then a triple fault should be a last resort, as it doesn't reset some PCs.
You know your OS is advanced when you stop using the Intel programming guide as a reference.
-
- Member
- Posts: 1146
- Joined: Sat Mar 01, 2014 2:59 pm
Re: Can´t do reset!
Really??? I thought that a reset after an unhandled triple-fault was the one constant in os-dev...omarrx024 wrote:If all doesn't work, then a triple fault should be a last resort, as it doesn't reset some PCs.
When you start writing an OS you do the minimum possible to get the x86 processor in a usable state, then you try to get as far away from it as possible.
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
Syntax checkup:
Wrong: OS's, IRQ's, zero'ing
Right: OSes, IRQs, zeroing
- Kazinsal
- Member
- Posts: 559
- Joined: Wed Jul 13, 2011 7:38 pm
- Libera.chat IRC: Kazinsal
- Location: Vancouver
- Contact:
Re: Can´t do reset!
The triple fault was introduced in the 286, whose programming manual says that it puts the CPU into a shutdown cycle. Most chipsets interpret the shutdown cycle being initiated to mean "the processor needs to be reset", so they pull the reset pin high (or maybe it's low, I can't remember and I don't have a CPU manual on hand) and the CPU resets.onlyonemac wrote:Really??? I thought that a reset after an unhandled triple-fault was the one constant in os-dev...omarrx024 wrote:If all doesn't work, then a triple fault should be a last resort, as it doesn't reset some PCs.
Technically, if this behaviour has not changed (and it likely hasn't, backwards compatibility being Intel's best friend), it would be a valid option for the shutdown cycle to lead to a power-off or simply a hang.
Re: Can´t do reset!
Hi all, I´m glad to say that now I can do reset!
the problem was at my setup_pic code
thanks so much guys. a lot ...
the problem was at my setup_pic code
thanks so much guys. a lot ...