Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create a software shutdown command #154

Open
ethanmw opened this issue Sep 3, 2018 · 4 comments
Open

Create a software shutdown command #154

ethanmw opened this issue Sep 3, 2018 · 4 comments

Comments

@ethanmw
Copy link
Collaborator

ethanmw commented Sep 3, 2018

Currently the only shutdown method is a hardware power-off, which could result in corrupted filesystems once we start using R/W filesystems, especially after we add support for large files.

Adding ACPI support might be complicated, but we should at least have a shell shutdown command

@dthain
Copy link
Owner

dthain commented Sep 3, 2018

That's a good point -- regardless of whether we can physically accomplish a shutdown, the kernel should have a sequence for safely flushing buffers, etc before the shutdown happens.

@dsmith47
Copy link
Collaborator

dsmith47 commented Sep 5, 2018

I can't comment on the process for buffer cleaning, but the ACPI interface is a slightly complicated (but already solved) coding process. Does this serve any of our goals?
https://forum.osdev.org/viewtopic.php?t=16990

@dthain
Copy link
Owner

dthain commented Sep 10, 2018

If you can find some code that reliably does it right out of the box, great.
However, the comments on that thread seem to suggest that it isn't fully working yet...

@dthain
Copy link
Owner

dthain commented Jan 18, 2019

The main point of this issue is not to implement the actual power shutdown, but rather to bring the kernel to a quiescent state by halting all processes, flushing the buffer cache, etc. Then it is safe to pull the plug, even if power-down is not implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants