2004-04-17 04:36:47 +02:00
|
|
|
#include <console/console.h>
|
|
|
|
#include <device/device.h>
|
|
|
|
#include <device/pci.h>
|
|
|
|
#include <device/pci_ids.h>
|
|
|
|
#include <device/pci_ops.h>
|
|
|
|
#include <arch/io.h>
|
|
|
|
#include "chip.h"
|
|
|
|
|
2004-10-06 19:33:54 +02:00
|
|
|
void vga_enable_console();
|
|
|
|
|
|
|
|
|
2004-11-04 12:04:33 +01:00
|
|
|
static void vga_fixup(void) {
|
2004-10-06 19:33:54 +02:00
|
|
|
// we do this right here because:
|
|
|
|
// - all the hardware is working, and some VGA bioses seem to need
|
|
|
|
// that
|
2008-01-18 16:08:58 +01:00
|
|
|
// - we need page 0 below for coreboot tables.
|
2004-10-06 19:33:54 +02:00
|
|
|
|
|
|
|
printk_debug("INSTALL REAL-MODE IDT\n");
|
|
|
|
setup_realmode_idt();
|
|
|
|
printk_debug("DO THE VGA BIOS\n");
|
|
|
|
do_vgabios();
|
|
|
|
post_code(0x93);
|
|
|
|
vga_enable_console();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2005-11-22 01:07:02 +01:00
|
|
|
void write_protect_vgabios(void)
|
2004-10-06 19:33:54 +02:00
|
|
|
{
|
|
|
|
device_t dev;
|
|
|
|
|
|
|
|
printk_info("write_protect_vgabios\n");
|
2006-03-14 20:58:14 +01:00
|
|
|
/* there are two possible devices. Just do both. */
|
|
|
|
dev = dev_find_device(PCI_VENDOR_ID_VIA, 0x3122, 0);
|
|
|
|
if(dev)
|
|
|
|
pci_write_config8(dev, 0x61, 0xaa);
|
|
|
|
|
2004-10-06 19:33:54 +02:00
|
|
|
dev = dev_find_device(PCI_VENDOR_ID_VIA, 0x3123, 0);
|
|
|
|
if(dev)
|
|
|
|
pci_write_config8(dev, 0x61, 0xaa);
|
2004-04-17 04:36:47 +02:00
|
|
|
}
|
2004-10-21 12:44:08 +02:00
|
|
|
|
2004-11-04 12:04:33 +01:00
|
|
|
struct chip_operations mainboard_via_epia_m_ops = {
|
2006-11-05 19:50:49 +01:00
|
|
|
CHIP_NAME("VIA EPIA-M Mainboard")
|
2004-04-17 04:36:47 +02:00
|
|
|
};
|
|
|
|
|