Merge mainline into bidi
This commit is contained in:
commit
e8d0a8f85c
271 changed files with 14187 additions and 16216 deletions
|
@ -717,12 +717,6 @@ real_scroll (void)
|
|||
draw_cursor (0);
|
||||
|
||||
grub_video_set_active_render_target (render_target);
|
||||
/* Save viewport and set it to our window. */
|
||||
grub_video_get_viewport ((unsigned *) &saved_view.x,
|
||||
(unsigned *) &saved_view.y,
|
||||
(unsigned *) &saved_view.width,
|
||||
(unsigned *) &saved_view.height);
|
||||
grub_video_set_viewport (window.x, window.y, window.width, window.height);
|
||||
|
||||
i = window.double_repaint ? 2 : 1;
|
||||
|
||||
|
@ -730,6 +724,15 @@ real_scroll (void)
|
|||
|
||||
while (i--)
|
||||
{
|
||||
/* Save viewport and set it to our window. */
|
||||
grub_video_get_viewport ((unsigned *) &saved_view.x,
|
||||
(unsigned *) &saved_view.y,
|
||||
(unsigned *) &saved_view.width,
|
||||
(unsigned *) &saved_view.height);
|
||||
|
||||
grub_video_set_viewport (window.x, window.y, window.width,
|
||||
window.height);
|
||||
|
||||
/* Clear new border area. */
|
||||
grub_video_fill_rect (color,
|
||||
virtual_screen.offset_x,
|
||||
|
@ -745,6 +748,10 @@ real_scroll (void)
|
|||
grub_video_scroll (color, 0, -virtual_screen.normal_char_height
|
||||
* virtual_screen.total_scroll);
|
||||
|
||||
/* Restore saved viewport. */
|
||||
grub_video_set_viewport (saved_view.x, saved_view.y,
|
||||
saved_view.width, saved_view.height);
|
||||
|
||||
if (i)
|
||||
grub_video_swap_buffers ();
|
||||
}
|
||||
|
@ -756,9 +763,6 @@ real_scroll (void)
|
|||
grub_video_scroll (color, 0, -virtual_screen.normal_char_height
|
||||
* virtual_screen.total_scroll);
|
||||
|
||||
/* Restore saved viewport. */
|
||||
grub_video_set_viewport (saved_view.x, saved_view.y,
|
||||
saved_view.width, saved_view.height);
|
||||
grub_video_set_active_render_target (render_target);
|
||||
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include <grub/i386/vga_common.h>
|
||||
#include <grub/i386/io.h>
|
||||
#include <grub/types.h>
|
||||
#include <grub/vga.h>
|
||||
|
||||
#define COLS 80
|
||||
#define ROWS 25
|
||||
|
@ -28,15 +29,6 @@ static int grub_curr_x, grub_curr_y;
|
|||
|
||||
#define VGA_TEXT_SCREEN 0xb8000
|
||||
|
||||
#define CRTC_ADDR_PORT 0x3D4
|
||||
#define CRTC_DATA_PORT 0x3D5
|
||||
|
||||
#define CRTC_CURSOR 0x0a
|
||||
#define CRTC_CURSOR_ADDR_HIGH 0x0e
|
||||
#define CRTC_CURSOR_ADDR_LOW 0x0f
|
||||
|
||||
#define CRTC_CURSOR_DISABLE (1 << 5)
|
||||
|
||||
static void
|
||||
screen_write_char (int x, int y, short c)
|
||||
{
|
||||
|
@ -53,10 +45,8 @@ static void
|
|||
update_cursor (void)
|
||||
{
|
||||
unsigned int pos = grub_curr_y * COLS + grub_curr_x;
|
||||
grub_outb (CRTC_CURSOR_ADDR_HIGH, CRTC_ADDR_PORT);
|
||||
grub_outb (pos >> 8, CRTC_DATA_PORT);
|
||||
grub_outb (CRTC_CURSOR_ADDR_LOW, CRTC_ADDR_PORT);
|
||||
grub_outb (pos & 0xFF, CRTC_DATA_PORT);
|
||||
grub_vga_cr_write (pos >> 8, GRUB_VGA_CR_CURSOR_ADDR_HIGH);
|
||||
grub_vga_cr_write (pos & 0xFF, GRUB_VGA_CR_CURSOR_ADDR_LOW);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -68,9 +58,11 @@ inc_y (void)
|
|||
else
|
||||
{
|
||||
int x, y;
|
||||
for (y = 0; y < ROWS; y++)
|
||||
for (y = 0; y < ROWS - 1; y++)
|
||||
for (x = 0; x < COLS; x++)
|
||||
screen_write_char (x, y, screen_read_char (x, y + 1));
|
||||
for (x = 0; x < COLS; x++)
|
||||
screen_write_char (x, ROWS - 1, ' ' | (grub_console_cur_color << 8));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -137,12 +129,13 @@ grub_vga_text_setcursor (struct grub_term_output *term __attribute__ ((unused)),
|
|||
int on)
|
||||
{
|
||||
grub_uint8_t old;
|
||||
grub_outb (CRTC_CURSOR, CRTC_ADDR_PORT);
|
||||
old = grub_inb (CRTC_DATA_PORT);
|
||||
old = grub_vga_cr_read (GRUB_VGA_CR_CURSOR_START);
|
||||
if (on)
|
||||
grub_outb (old & ~CRTC_CURSOR_DISABLE, CRTC_DATA_PORT);
|
||||
grub_vga_cr_write (old & ~GRUB_VGA_CR_CURSOR_START_DISABLE,
|
||||
GRUB_VGA_CR_CURSOR_START);
|
||||
else
|
||||
grub_outb (old | CRTC_CURSOR_DISABLE, CRTC_DATA_PORT);
|
||||
grub_vga_cr_write (old | GRUB_VGA_CR_CURSOR_START_DISABLE,
|
||||
GRUB_VGA_CR_CURSOR_START);
|
||||
}
|
||||
|
||||
static grub_err_t
|
||||
|
|
|
@ -169,10 +169,17 @@ serial_hw_init (void)
|
|||
/* In Yeeloong serial port has only 3 wires. */
|
||||
#ifndef GRUB_MACHINE_MIPS_YEELOONG
|
||||
/* Enable the FIFO. */
|
||||
grub_outb (UART_ENABLE_FIFO, serial_settings.port + UART_FCR);
|
||||
grub_outb (UART_ENABLE_FIFO_TRIGGER1, serial_settings.port + UART_FCR);
|
||||
|
||||
/* Turn on DTR and RTS. */
|
||||
grub_outb (UART_ENABLE_DTRRTS, serial_settings.port + UART_MCR);
|
||||
#else
|
||||
/* Enable the FIFO. */
|
||||
grub_outb (UART_ENABLE_FIFO_TRIGGER14, serial_settings.port + UART_FCR);
|
||||
|
||||
/* Turn on DTR, RTS, and OUT2. */
|
||||
grub_outb (UART_ENABLE_MODEM, serial_settings.port + UART_MCR);
|
||||
grub_outb (UART_ENABLE_DTRRTS | UART_ENABLE_OUT2,
|
||||
serial_settings.port + UART_MCR);
|
||||
#endif
|
||||
|
||||
/* Drain the input buffer. */
|
||||
|
@ -363,6 +370,21 @@ GRUB_MOD_INIT(serial)
|
|||
serial_settings.word_len = UART_8BITS_WORD;
|
||||
serial_settings.parity = UART_NO_PARITY;
|
||||
serial_settings.stop_bits = UART_1_STOP_BIT;
|
||||
|
||||
#ifdef GRUB_MACHINE_MIPS_YEELOONG
|
||||
{
|
||||
grub_err_t hwiniterr;
|
||||
hwiniterr = serial_hw_init ();
|
||||
|
||||
if (hwiniterr == GRUB_ERR_NONE)
|
||||
{
|
||||
grub_term_register_input_active ("serial", &grub_serial_term_input);
|
||||
grub_term_register_output_active ("serial", &grub_serial_term_output);
|
||||
|
||||
registered = 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI(serial)
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
*/
|
||||
|
||||
#include <grub/term.h>
|
||||
#include <grub/machine/console.h>
|
||||
#include <grub/time.h>
|
||||
#include <grub/cpu/io.h>
|
||||
#include <grub/misc.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue