merge with mainline
This commit is contained in:
commit
e5a73c4247
182 changed files with 9977 additions and 5276 deletions
|
@ -79,6 +79,9 @@ grub_console_putchar (struct grub_term_output *term __attribute__ ((unused)),
|
|||
grub_efi_simple_text_output_interface_t *o;
|
||||
unsigned i, j;
|
||||
|
||||
if (grub_efi_is_finished)
|
||||
return;
|
||||
|
||||
o = grub_efi_system_table->con_out;
|
||||
|
||||
/* For now, do not try to use a surrogate pair. */
|
||||
|
@ -107,6 +110,9 @@ grub_console_checkkey (struct grub_term_input *term __attribute__ ((unused)))
|
|||
grub_efi_input_key_t key;
|
||||
grub_efi_status_t status;
|
||||
|
||||
if (grub_efi_is_finished)
|
||||
return 0;
|
||||
|
||||
if (read_key >= 0)
|
||||
return 1;
|
||||
|
||||
|
@ -204,6 +210,9 @@ grub_console_getkey (struct grub_term_input *term)
|
|||
grub_efi_status_t status;
|
||||
int key;
|
||||
|
||||
if (grub_efi_is_finished)
|
||||
return 0;
|
||||
|
||||
if (read_key >= 0)
|
||||
{
|
||||
key = read_key;
|
||||
|
@ -236,7 +245,8 @@ grub_console_getwh (struct grub_term_output *term __attribute__ ((unused)))
|
|||
grub_efi_uintn_t columns, rows;
|
||||
|
||||
o = grub_efi_system_table->con_out;
|
||||
if (efi_call_4 (o->query_mode, o, o->mode->mode, &columns, &rows) != GRUB_EFI_SUCCESS)
|
||||
if (grub_efi_is_finished || efi_call_4 (o->query_mode, o, o->mode->mode,
|
||||
&columns, &rows) != GRUB_EFI_SUCCESS)
|
||||
{
|
||||
/* Why does this fail? */
|
||||
columns = 80;
|
||||
|
@ -251,6 +261,9 @@ grub_console_getxy (struct grub_term_output *term __attribute__ ((unused)))
|
|||
{
|
||||
grub_efi_simple_text_output_interface_t *o;
|
||||
|
||||
if (grub_efi_is_finished)
|
||||
return 0;
|
||||
|
||||
o = grub_efi_system_table->con_out;
|
||||
return ((o->mode->cursor_column << 8) | o->mode->cursor_row);
|
||||
}
|
||||
|
@ -261,6 +274,9 @@ grub_console_gotoxy (struct grub_term_output *term __attribute__ ((unused)),
|
|||
{
|
||||
grub_efi_simple_text_output_interface_t *o;
|
||||
|
||||
if (grub_efi_is_finished)
|
||||
return;
|
||||
|
||||
o = grub_efi_system_table->con_out;
|
||||
efi_call_3 (o->set_cursor_position, o, x, y);
|
||||
}
|
||||
|
@ -271,6 +287,9 @@ grub_console_cls (struct grub_term_output *term __attribute__ ((unused)))
|
|||
grub_efi_simple_text_output_interface_t *o;
|
||||
grub_efi_int32_t orig_attr;
|
||||
|
||||
if (grub_efi_is_finished)
|
||||
return;
|
||||
|
||||
o = grub_efi_system_table->con_out;
|
||||
orig_attr = o->mode->attribute;
|
||||
efi_call_2 (o->set_attributes, o, GRUB_EFI_BACKGROUND_BLACK);
|
||||
|
@ -284,6 +303,9 @@ grub_console_setcolorstate (struct grub_term_output *term,
|
|||
{
|
||||
grub_efi_simple_text_output_interface_t *o;
|
||||
|
||||
if (grub_efi_is_finished)
|
||||
return;
|
||||
|
||||
o = grub_efi_system_table->con_out;
|
||||
|
||||
switch (state) {
|
||||
|
@ -307,6 +329,9 @@ grub_console_setcursor (struct grub_term_output *term __attribute__ ((unused)),
|
|||
{
|
||||
grub_efi_simple_text_output_interface_t *o;
|
||||
|
||||
if (grub_efi_is_finished)
|
||||
return;
|
||||
|
||||
o = grub_efi_system_table->con_out;
|
||||
efi_call_2 (o->enable_cursor, o, on);
|
||||
}
|
||||
|
|
|
@ -405,9 +405,16 @@ destroy_window (void)
|
|||
static grub_err_t
|
||||
grub_gfxterm_term_fini (struct grub_term_output *term __attribute__ ((unused)))
|
||||
{
|
||||
unsigned i;
|
||||
destroy_window ();
|
||||
grub_video_restore ();
|
||||
|
||||
for (i = 0; i < virtual_screen.columns * virtual_screen.rows; i++)
|
||||
{
|
||||
grub_free (virtual_screen.text_buffer[i].code);
|
||||
virtual_screen.text_buffer[i].code = 0;
|
||||
}
|
||||
|
||||
/* Clear error state. */
|
||||
grub_errno = GRUB_ERR_NONE;
|
||||
return GRUB_ERR_NONE;
|
||||
|
@ -793,13 +800,8 @@ scroll_up (void)
|
|||
unsigned int i;
|
||||
|
||||
/* Clear first line in text buffer. */
|
||||
for (i = 0;
|
||||
i < virtual_screen.columns;
|
||||
i++)
|
||||
{
|
||||
virtual_screen.text_buffer[i].code = 0;
|
||||
clear_char (&(virtual_screen.text_buffer[i]));
|
||||
}
|
||||
for (i = 0; i < virtual_screen.columns; i++)
|
||||
grub_free (virtual_screen.text_buffer[i].code);
|
||||
|
||||
/* Scroll text buffer with one line to up. */
|
||||
grub_memmove (virtual_screen.text_buffer,
|
||||
|
|
|
@ -34,13 +34,13 @@ grub_console_setcolorstate (struct grub_term_output *term,
|
|||
{
|
||||
switch (state) {
|
||||
case GRUB_TERM_COLOR_STANDARD:
|
||||
grub_console_cur_color = GRUB_TERM_DEFAULT_STANDARD_COLOR;
|
||||
grub_console_cur_color = GRUB_TERM_DEFAULT_STANDARD_COLOR & 0x7f;
|
||||
break;
|
||||
case GRUB_TERM_COLOR_NORMAL:
|
||||
grub_console_cur_color = term->normal_color;
|
||||
grub_console_cur_color = term->normal_color & 0x7f;
|
||||
break;
|
||||
case GRUB_TERM_COLOR_HIGHLIGHT:
|
||||
grub_console_cur_color = term->highlight_color;
|
||||
grub_console_cur_color = term->highlight_color & 0x7f;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -55,7 +55,7 @@ static struct color colors[] =
|
|||
};
|
||||
|
||||
static void
|
||||
put (const int c)
|
||||
put (struct grub_term_output *term __attribute__ ((unused)), const int c)
|
||||
{
|
||||
char chr = c;
|
||||
|
||||
|
@ -63,7 +63,7 @@ put (const int c)
|
|||
}
|
||||
|
||||
static int
|
||||
readkey (void)
|
||||
readkey (struct grub_term_input *term __attribute__ ((unused)))
|
||||
{
|
||||
grub_uint8_t c;
|
||||
grub_ssize_t actual = 0;
|
||||
|
|
|
@ -227,6 +227,16 @@ grub_ns8250_init (void)
|
|||
}
|
||||
}
|
||||
|
||||
/* Return the port number for the UNITth serial device. */
|
||||
grub_port_t
|
||||
grub_ns8250_hw_get_port (const unsigned int unit)
|
||||
{
|
||||
if (unit < GRUB_SERIAL_PORT_NUM)
|
||||
return serial_hw_io_addr[unit];
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
char *
|
||||
grub_serial_ns8250_add_port (grub_port_t port)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue