Merge mainline into newreloc

This commit is contained in:
Vladimir 'phcoder' Serbinenko committed 2010-06-24 21:22:40 +02:00
commit 2a1d16154d
160 files changed
+6853 -2250

No files matched your search

+13 -9
View File
@@ -707,12 +707,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;
@@ -720,6 +714,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,
@@ -735,6 +738,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 ();
}
@@ -746,9 +753,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);
}
+11 -18
View File
@@ -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));
}
}
@@ -134,12 +126,13 @@ static void
grub_vga_text_setcursor (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
-1
View File
@@ -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>