2007-10-22 12:07:46 +02:00
|
|
|
#include <console/console.h>
|
2004-06-28 13:57:31 +02:00
|
|
|
#include <device/device.h>
|
2007-10-22 12:07:46 +02:00
|
|
|
#include <device/pci.h>
|
|
|
|
#include <device/pci_ids.h>
|
|
|
|
#include <device/pci_ops.h>
|
|
|
|
#include <arch/io.h>
|
2004-06-28 13:57:31 +02:00
|
|
|
#include "chip.h"
|
|
|
|
|
2007-10-22 12:07:46 +02:00
|
|
|
void vga_enable_console();
|
|
|
|
|
|
|
|
static void vga_init(device_t dev)
|
|
|
|
{
|
2008-01-18 16:08:58 +01:00
|
|
|
/* code to make vga init run in real mode - does work but against the current coreboot philosophy */
|
2007-10-22 12:07:46 +02:00
|
|
|
printk_debug("INSTALL REAL-MODE IDT\n");
|
|
|
|
setup_realmode_idt();
|
|
|
|
printk_debug("DO THE VGA BIOS\n");
|
|
|
|
do_vgabios();
|
|
|
|
|
|
|
|
vga_enable_console();
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct device_operations vga_operations = {
|
|
|
|
.read_resources = pci_dev_read_resources,
|
|
|
|
.set_resources = pci_dev_set_resources,
|
|
|
|
.enable_resources = pci_dev_enable_resources,
|
|
|
|
.init = vga_init,
|
|
|
|
.ops_pci = 0,
|
|
|
|
};
|
|
|
|
|
2007-10-24 11:08:58 +02:00
|
|
|
static const struct pci_driver vga_driver __pci_driver = {
|
2007-10-22 12:07:46 +02:00
|
|
|
.ops = &vga_operations,
|
|
|
|
.vendor = 0x1013,
|
|
|
|
.device = 0x00b8,
|
|
|
|
};
|
|
|
|
|
2008-02-07 21:37:37 +01:00
|
|
|
struct chip_operations mainboard_emulation_qemu_x86_ops = {
|
2006-11-05 19:50:49 +01:00
|
|
|
CHIP_NAME("QEMU Mainboard")
|
2004-06-28 13:57:31 +02:00
|
|
|
};
|
|
|
|
|