a55d42e0e0
* conf/i386-coreboot.rmk (pkglib_MODULES): Add `reboot.mod' and `halt.mod'. (reboot_mod_SOURCES, reboot_mod_CFLAGS, reboot_mod_LDFLAGS) (halt_mod_SOURCES, halt_mod_CFLAGS, halt_mod_LDFLAGS): New variables. * kern/i386/halt.c: New file. * kern/i386/reboot.c: Likewise. * include/grub/i386/reboot.h: Likewise. * include/grub/i386/halt.h: Likewise. * commands/halt.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI]: Include `<grub/cpu/halt.h>'. * commands/reboot.c [! GRUB_MACHINE_IEEE1275 ! GRUB_MACHINE_EFI] [! GRUB_MACHINE_PCBIOS]: Include `<grub/cpu/reboot.h>'. * term/i386/pc/at_keyboard.c: Include `<grub/cpu/at_keyboard.h>'. (SHIFT_L, SHIFT_R, CTRL, ALT, CAPS_LOCK, KEYBOARD_REG_DATA) (KEYBOARD_REG_STATUS, KEYBOARD_COMMAND_ISREADY, KEYBOARD_COMMAND_READ) (KEYBOARD_COMMAND_WRITE, KEYBOARD_COMMAND_REBOOT) (KEYBOARD_SCANCODE_SET1, KEYBOARD_ISMAKE, KEYBOARD_ISREADY) (KEYBOARD_SCANCODE, OLPC_UP, OLPC_DOWN, OLPC_LEFT, OLPC_RIGHT): Move from here ... * include/grub/i386/at_keyboard.h: ... to here.
31 lines
1.1 KiB
C
31 lines
1.1 KiB
C
/*
|
|
* GRUB -- GRand Unified Bootloader
|
|
* Copyright (C) 2008 Free Software Foundation, Inc.
|
|
*
|
|
* GRUB is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* GRUB is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with GRUB. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
#include <grub/cpu/io.h>
|
|
#include <grub/cpu/at_keyboard.h>
|
|
#include <grub/misc.h>
|
|
|
|
void
|
|
grub_reboot (void)
|
|
{
|
|
/* Use the keyboard controller to reboot. That's what keyboards were
|
|
designed for, isn't it? */
|
|
grub_outb (KEYBOARD_COMMAND_REBOOT, KEYBOARD_REG_STATUS);
|
|
|
|
grub_printf ("GRUB doesn't know how to reboot this machine yet!\n");
|
|
}
|