Shutdown using ACPI.
* grub-core/Makefile.core.def (halt): Add commands/acpihalt.c on i386-pc. * grub-core/commands/acpihalt.c: New file. * grub-core/commands/i386/pc/halt.c (grub_cmd_halt): Call grub_acpi_halt. * include/grub/acpi.h (grub_acpi_fadt): New member pm1a. (grub_acpi_halt): New proto. (GRUB_ACPI_SLP_EN): New const. (GRUB_ACPI_SLP_TYP_OFFSET): Likewise. (GRUB_ACPI_OPCODE_*): New enum. (GRUB_ACPI_EXTOPCODE_*): Likewise.
This commit is contained in:
commit
4df7996d87
5 changed files with 310 additions and 2 deletions
|
@ -22,6 +22,7 @@
|
|||
#include <grub/extcmd.h>
|
||||
#include <grub/i18n.h>
|
||||
#include <grub/machine/int.h>
|
||||
#include <grub/acpi.h>
|
||||
|
||||
static const struct grub_arg_option options[] =
|
||||
{
|
||||
|
@ -100,6 +101,9 @@ grub_cmd_halt (grub_extcmd_context_t ctxt,
|
|||
{
|
||||
struct grub_arg_list *state = ctxt->state;
|
||||
int no_apm = 0;
|
||||
|
||||
grub_acpi_halt ();
|
||||
|
||||
if (state[0].set)
|
||||
no_apm = 1;
|
||||
grub_halt (no_apm);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue