50ddee1988c01d0d27144d3bb24454c646e07e83
[coreboot.git] / src / mainboard / emulation / qemu-i386 / mainboard.c
1 #include <console/console.h>
2 #include <device/device.h>
3 #include <device/pci.h>
4 #include <device/pci_ids.h>
5 #include <device/pci_ops.h>
6 #include <arch/io.h>
7 #include "chip.h"
8
9 void vga_enable_console();
10
11 static void vga_init(device_t dev)
12 {
13         /* code to make vga init run in real mode - does work but against the current Linuxbios philosophy */
14         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
22 static 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
30 static struct pci_driver vga_driver __pci_driver = {
31         .ops = &vga_operations,
32         .vendor = 0x1013,
33         .device = 0x00b8,
34 };
35
36 struct chip_operations mainboard_emulation_qemu_i386_ops = {
37         CHIP_NAME("QEMU Mainboard")
38 };
39