merge mainline to ia64

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-01-03 00:04:39 +01:00
commit 0f35c665e6
595 changed files with 62746 additions and 9109 deletions

View file

@ -24,33 +24,18 @@
static const struct grub_machine_bios_data_area *bios_data_area =
(struct grub_machine_bios_data_area *) GRUB_MEMORY_MACHINE_BIOS_DATA_AREA_ADDR;
#define KEYBOARD_LEFT_SHIFT (1 << 0)
#define KEYBOARD_RIGHT_SHIFT (1 << 1)
#define KEYBOARD_CTRL (1 << 2)
#define KEYBOARD_ALT (1 << 3)
static int
grub_console_getkeystatus (struct grub_term_input *term __attribute__ ((unused)))
{
grub_uint8_t status = bios_data_area->keyboard_flag_lower;
int mods = 0;
if (status & (KEYBOARD_LEFT_SHIFT | KEYBOARD_RIGHT_SHIFT))
mods |= GRUB_TERM_STATUS_SHIFT;
if (status & KEYBOARD_CTRL)
mods |= GRUB_TERM_STATUS_CTRL;
if (status & KEYBOARD_ALT)
mods |= GRUB_TERM_STATUS_ALT;
return mods;
/* conveniently GRUB keystatus is modelled after BIOS one. */
return bios_data_area->keyboard_flag_lower & ~0x80;
}
static struct grub_term_input grub_console_term_input =
{
.name = "console",
.checkkey = grub_console_checkkey,
.getkey = grub_console_getkey,
.getkeystatus = grub_console_getkeystatus,
.getkeystatus = grub_console_getkeystatus
};
static struct grub_term_output grub_console_term_output =

View file

@ -1,6 +1,6 @@
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2007, 2008 Free Software Foundation, Inc.
* Copyright (C) 2007, 2008, 2010 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
@ -27,18 +27,18 @@
static int grub_curr_x, grub_curr_y;
#define VGA_TEXT_SCREEN 0xb8000
#define VGA_TEXT_SCREEN ((grub_uint16_t *) 0xb8000)
static void
screen_write_char (int x, int y, short c)
{
((short *) VGA_TEXT_SCREEN)[y * COLS + x] = c;
VGA_TEXT_SCREEN[y * COLS + x] = c;
}
static short
screen_read_char (int x, int y)
{
return ((short *) VGA_TEXT_SCREEN)[y * COLS + x];
return VGA_TEXT_SCREEN[y * COLS + x];
}
static void
@ -120,7 +120,7 @@ grub_vga_text_cls (struct grub_term_output *term)
{
int i;
for (i = 0; i < ROWS * COLS; i++)
((short *) VGA_TEXT_SCREEN)[i] = ' ' | (grub_console_cur_color << 8);
VGA_TEXT_SCREEN[i] = ' ' | (grub_console_cur_color << 8);
grub_vga_text_gotoxy (term, 0, 0);
}