Reboot and Shutdown

Mar 17, 2012 at 3:34 AM
Edited Mar 17, 2012 at 3:35 AM

Does anyone know how to reboot and shutdown?

The commands 

Cosmos.Core.Global.CPU.Halt();

and

Cosmos.Core.Global.CPU.Reboot();

don't do anything.

Coordinator
Mar 17, 2012 at 9:41 AM
CPU.Halt doesn't shutdown: it puts the CPU in a HLT state, which means do nothing till next interrupt..


On Sat, Mar 17, 2012 at 3:34 AM, WMH123 <notifications@codeplex.com> wrote:

From: WMH123

Does anyone know how to reboot and shutdown?

The commands

Cosmos.Core.Global.CPU.Reboot();

and

Cosmos.Core.Global.CPU.Halt();


don't do anything.

Read the full discussion online.

To add a post to this discussion, reply to this email (Cosmos@discussions.codeplex.com)

To start a new discussion for this project, email Cosmos@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com


Mar 17, 2012 at 11:45 PM

Is there a Shutdown command?

What about rebooting?

Aug 16, 2015 at 12:23 AM
I found an interesting article here that shows you how to reboot a computer in plain C. It was pretty easy to translate to C# and use the Cosmos IOPort Drivers:
void Reboot(){
    uint good = 0x02;
    Cosmos.Core.IOPort io = new Cosmos.Core.IOPort(0x64);
    while ((good & 0x02) == 0x02){
        good = io.Byte;
    }
    io.Byte = 0xFE;
}
It worked perfectly for me, it should for you too.
Coordinator
Aug 24, 2015 at 9:51 AM
Code that does exactly this, has landed in master a few weeks ago..