2009-11-23 Robert Millan <rmh.grub@aybabtu.com> * configure.ac: Detect all `emu' platforms. Define GRUB_MACHINE_* macros in TARGET_CFLAGS. Remove --enable-grub-emu logic. Disable include/grub/machine symlink on `emu' platforms. * genkernsyms.sh.in: Use @TARGET_CFLAGS@ during symbol generation. * gensymlist.sh.in: Likewise. * include/grub/i386/coreboot/machine.h: Remove file. * include/grub/i386/efi/machine.h: Likewise. * include/grub/i386/ieee1275/machine.h: Likewise. * include/grub/i386/pc/machine.h: Likewise. * include/grub/i386/qemu/machine.h: Likewise. * include/grub/powerpc/ieee1275/machine.h: Likewise. * include/grub/sparc64/ieee1275/machine.h: Likewise. * include/grub/x86_64/efi/machine.h: Likewise. * commands/acpi.c: Remove `<grub/machine/machine.h>'. * commands/halt.c: Likewise. * commands/reboot.c: Likewise. * include/grub/autoefi.h: Likewise. * include/grub/i386/at_keyboard.h: Likewise. * include/grub/i386/kernel.h: Likewise. * include/grub/i386/loader.h: Likewise. * include/grub/i386/pc/memory.h: Likewise. * kern/dl.c: Likewise. * kern/i386/coreboot/init.c: Likewise. * loader/i386/bsd.c: Likewise. * loader/i386/linux.c: Likewise. * loader/multiboot_loader.c: Likewise. * term/i386/pc/serial.c: Likewise. * term/usb_keyboard.c: Likewise. * include/grub/time.h [!GRUB_MACHINE_EMU]: Remove `<grub/machine/machine.h>' [!GRUB_MACHINE_EMU] (GRUB_TICKS_PER_SECOND): New macro. * util/misc.c: Remove `<grub/machine/machine.h>' and `<grub/machine/time.h>'. * Makefile.in (enable_grub_emu): Remove variable. Include $(srcdir)/conf/any-emu.mk for the `emu' platform. * conf/any-emu.rmk: New file. * conf/common.rmk (grub_emu_init.lst, grub_emu_init.h) (grub_emu_init.c): Move from here ... * conf/any-emu.rmk: ... to here. * conf/i386-coreboot.rmk (sbin_UTILITIES): Remove `grub-emu'. (grub_emu_SOURCES, grub_emu_LDFLAGS): Move from here ... * conf/any-emu.rmk: ... to here.
56 lines
1.6 KiB
C
56 lines
1.6 KiB
C
/*
|
|
* GRUB -- GRand Unified Bootloader
|
|
* Copyright (C) 2007,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/>.
|
|
*/
|
|
|
|
#ifndef GRUB_CPU_AT_KEYBOARD_HEADER
|
|
#define GRUB_CPU_AT_KEYBOARD_HEADER 1
|
|
|
|
|
|
#define SHIFT_L 0x2a
|
|
#define SHIFT_R 0x36
|
|
#define CTRL 0x1d
|
|
#define ALT 0x38
|
|
#define CAPS_LOCK 0x3a
|
|
|
|
#define KEYBOARD_REG_DATA 0x60
|
|
#define KEYBOARD_REG_STATUS 0x64
|
|
|
|
/* Used for sending commands to the controller. */
|
|
#define KEYBOARD_COMMAND_ISREADY(x) !((x) & 0x02)
|
|
#define KEYBOARD_COMMAND_READ 0x20
|
|
#define KEYBOARD_COMMAND_WRITE 0x60
|
|
#define KEYBOARD_COMMAND_REBOOT 0xfe
|
|
|
|
#define KEYBOARD_SCANCODE_SET1 0x40
|
|
|
|
#define KEYBOARD_ISMAKE(x) !((x) & 0x80)
|
|
#define KEYBOARD_ISREADY(x) ((x) & 0x01)
|
|
#define KEYBOARD_SCANCODE(x) ((x) & 0x7f)
|
|
|
|
#ifdef GRUB_MACHINE_IEEE1275
|
|
#define OLPC_UP GRUB_TERM_UP
|
|
#define OLPC_DOWN GRUB_TERM_DOWN
|
|
#define OLPC_LEFT GRUB_TERM_LEFT
|
|
#define OLPC_RIGHT GRUB_TERM_RIGHT
|
|
#else
|
|
#define OLPC_UP '\0'
|
|
#define OLPC_DOWN '\0'
|
|
#define OLPC_LEFT '\0'
|
|
#define OLPC_RIGHT '\0'
|
|
#endif
|
|
|
|
#endif
|