Hello,
Upto now, ( and still ) I am using triple-fault as a system reset mechanism. When the user wants to reset the system, after making necessary OS stopping, I set-up an idt with limit zero and issue a software interrupt, the CPU triple faults and system automatically resets.
Questions are:
1) is this method good? is it guaranteed to reset the system on all types of systems?
2) I have started programming multiple cpu ( SMP ) lately ( using bochs, I have no real hardware yet ). What happens to other cpus when one of the cpu triple-faults? do they continue executing?
Best regards.
System reset using triple fault
why dont you just use
or (in ASM)
and change when you want to port the OS?
Code: Select all
outb (0x64, 0xFE);
Code: Select all
outb 0x64, 0xFE
I wondering too, but i didn't put yet the option to restart my OS, so i never search for.
But, while we talking about it, thanks for the answer,...
and can you tell us how to make a shutdown? (i mean to turn off by software the pc)
But, while we talking about it, thanks for the answer,...
and can you tell us how to make a shutdown? (i mean to turn off by software the pc)
Keep coding...
...the sky is the limit
AsteriOS project: http://www.mindfields.gr/main/index.php ... &Itemid=27
...the sky is the limit
AsteriOS project: http://www.mindfields.gr/main/index.php ... &Itemid=27
- piranha
- Member
- Posts: 1391
- Joined: Thu Dec 21, 2006 7:42 pm
- Location: Unknown. Momentum is pretty certain, however.
- Contact:
You need ACPI.and can you tell us how to make a shutdown? (i mean to turn off by software the pc)
-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
- mathematician
- Member
- Posts: 437
- Joined: Fri Dec 15, 2006 5:26 pm
- Location: Church Stretton Uk
Re: System reset using triple fault
Whether or not it is good, it was the method used in the early days of protected mode operating systems, because the 286 couldn't otherwise be switched out of protected mode once in it. (The BIOS was equipped with code, which is probably still there, which allowed a jump to the instruction immediately after the one which caused the reset. Then the program carried on as if nothing had happened.)Cemre wrote:Questions are:
1) is this method good? is it guaranteed to reset the system on all types of systems?