printk_foo -> printk(BIOS_FOO, ...)
[coreboot.git] / src / mainboard / via / epia-m / 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 #include "vgachip.h"
9
10 void vga_enable_console();
11
12
13 static void vga_fixup(void) {
14         // we do this right here because:
15         // - all the hardware is working, and some VGA bioses seem to need
16         //   that
17         // - we need page 0 below for coreboot tables.
18
19         printk(BIOS_DEBUG, "INSTALL REAL-MODE IDT\n");
20         setup_realmode_idt();
21         printk(BIOS_DEBUG, "DO THE VGA BIOS\n");
22         do_vgabios();
23         post_code(0x93);
24         vga_enable_console();
25
26
27 }
28  
29 void write_protect_vgabios(void)
30 {
31         device_t dev;
32  
33         printk(BIOS_INFO, "write_protect_vgabios\n");
34         /* there are two possible devices. Just do both. */
35         dev = dev_find_device(PCI_VENDOR_ID_VIA, 0x3122, 0);
36         if(dev)
37                 pci_write_config8(dev, 0x61, 0xaa);
38
39         dev = dev_find_device(PCI_VENDOR_ID_VIA, 0x3123, 0);
40         if(dev)
41                 pci_write_config8(dev, 0x61, 0xaa);
42 }
43
44 struct chip_operations mainboard_ops = {
45         CHIP_NAME("VIA EPIA-M Mainboard")
46 };
47