blob: cfbc0b2246e3550c002d14788e13f1f978a4ac0c [file] [log] [blame]
Stefan Reinauerd56981f2007-10-22 10:07:46 +00001#include <console/console.h>
Stefan Reinauer4a3bb762004-06-28 11:57:31 +00002#include <device/device.h>
Stefan Reinauerd56981f2007-10-22 10:07:46 +00003#include <device/pci.h>
4#include <device/pci_ids.h>
5#include <device/pci_ops.h>
6#include <arch/io.h>
Stefan Reinauer4a3bb762004-06-28 11:57:31 +00007#include "chip.h"
8
Stefan Reinauerd56981f2007-10-22 10:07:46 +00009void vga_enable_console();
10
11static void vga_init(device_t dev)
12{
Stefan Reinauerf8ee1802008-01-18 15:08:58 +000013 /* code to make vga init run in real mode - does work but against the current coreboot philosophy */
Stefan Reinauerd56981f2007-10-22 10:07:46 +000014 printk_debug("INSTALL REAL-MODE IDT\n");
15 setup_realmode_idt();
16 printk_debug("DO THE VGA BIOS\n");
17 do_vgabios();
18
19 vga_enable_console();
20}
21
22static struct device_operations vga_operations = {
23 .read_resources = pci_dev_read_resources,
24 .set_resources = pci_dev_set_resources,
25 .enable_resources = pci_dev_enable_resources,
26 .init = vga_init,
27 .ops_pci = 0,
28};
29
Stefan Reinauerf1cf1f72007-10-24 09:08:58 +000030static const struct pci_driver vga_driver __pci_driver = {
Stefan Reinauerd56981f2007-10-22 10:07:46 +000031 .ops = &vga_operations,
32 .vendor = 0x1013,
33 .device = 0x00b8,
34};
35
Stefan Reinauere4932dc2004-11-02 20:33:12 +000036struct chip_operations mainboard_emulation_qemu_i386_ops = {
Uwe Hermanna7aa29b2006-11-05 18:50:49 +000037 CHIP_NAME("QEMU Mainboard")
Stefan Reinauer4a3bb762004-06-28 11:57:31 +000038};
39