Coreboot video support.

* grub-core/Makefile.core.def (vga): Extend to coreboot and multiboot.
	(vbe): Likewise.
	* grub-core/kern/i386/coreboot/startup.S: Include int.S.
	* grub-core/kern/i386/pc/startup.S (grub_bios_interrupt): Moved from
	here ...
	* grub-core/kern/i386/int.S: ... here.
	* grub-core/video/i386/pc/vbe.c: Updated includes.
	* grub-core/video/i386/pc/vga.c: Likewise.
	* include/grub/i386/coreboot/memory.h
	(GRUB_MEMORY_MACHINE_SCRATCH_ADDR): New definition.
	(GRUB_MEMORY_MACHINE_SCRATCH_SEG): Likewise.
	(GRUB_MEMORY_MACHINE_SCRATCH_SIZE): Likewise.
	* include/grub/i386/pc/int.h (GRUB_CPU_INT_FLAGS_DEFAULT) [!PCBIOS]:
	Disable interrupts.
	* include/grub/i386/pc/vga.h: Removed. All users updated.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-06-27 08:54:55 +02:00
parent 41bec7fec9
commit 9fc9ce3795
11 changed files with 184 additions and 136 deletions

View file

@ -20,15 +20,14 @@
#include <grub/err.h>
#include <grub/machine/memory.h>
#include <grub/machine/vga.h>
#include <grub/machine/vbe.h>
#include <grub/i386/pc/vbe.h>
#include <grub/video_fb.h>
#include <grub/types.h>
#include <grub/dl.h>
#include <grub/misc.h>
#include <grub/mm.h>
#include <grub/video.h>
#include <grub/machine/int.h>
#include <grub/i386/pc/int.h>
GRUB_MOD_LICENSE ("GPLv3+");
@ -377,7 +376,7 @@ grub_vbe_set_video_mode (grub_uint32_t vbe_mode,
if (vbe_mode < 0x100)
{
/* If this is not a VESA mode, guess address. */
framebuffer.ptr = (grub_uint8_t *) GRUB_MEMORY_MACHINE_VGA_ADDR;
framebuffer.ptr = (grub_uint8_t *) 0xa0000;
}
else
{

View file

@ -18,8 +18,7 @@
#define grub_video_render_target grub_video_fbrender_target
#include <grub/machine/vga.h>
#include <grub/machine/int.h>
#include <grub/i386/pc/int.h>
#include <grub/machine/console.h>
#include <grub/cpu/io.h>
#include <grub/mm.h>
@ -34,7 +33,7 @@ GRUB_MOD_LICENSE ("GPLv3+");
#define VGA_WIDTH 640
#define VGA_HEIGHT 350
#define VGA_MEM ((grub_uint8_t *) GRUB_MEMORY_MACHINE_VGA_ADDR)
#define VGA_MEM ((grub_uint8_t *) 0xa0000)
#define PAGE_OFFSET(x) ((x) * (VGA_WIDTH * VGA_HEIGHT / 8))
static unsigned char text_mode;