From 02fa3b2743b3f37381b6af4ee4362422b9011c8b Mon Sep 17 00:00:00 2001 From: "Ronald G. Minnich" Date: Wed, 6 Oct 2004 17:33:54 +0000 Subject: epia-m support git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1655 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1 --- src/mainboard/via/epia-m/mainboard.c | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'src/mainboard/via/epia-m/mainboard.c') diff --git a/src/mainboard/via/epia-m/mainboard.c b/src/mainboard/via/epia-m/mainboard.c index 747eb3eb7f..9597392593 100644 --- a/src/mainboard/via/epia-m/mainboard.c +++ b/src/mainboard/via/epia-m/mainboard.c @@ -9,6 +9,9 @@ #include #include "chip.h" +void vga_enable_console(); + + static int mainboard_scan_bus(device_t root, int maxbus) { @@ -19,6 +22,56 @@ mainboard_scan_bus(device_t root, int maxbus) return maxbus; } +void vga_fixup(void) { + // we do this right here because: + // - all the hardware is working, and some VGA bioses seem to need + // that + // - we need page 0 below for linuxbios tables. + + 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(); + + +} + +void write_protect_vgabios(void) +{ + device_t dev; + + printk_info("write_protect_vgabios\n"); + dev = dev_find_device(PCI_VENDOR_ID_VIA, 0x3123, 0); + if(dev) + pci_write_config8(dev, 0x61, 0xaa); + +} + +static void +enable(struct chip *chip, enum chip_pass pass) +{ + + struct mainboard_tyan_s4882_config *conf = + (struct mainboard_tyan_s4882_config *)chip->chip_info; + + switch (pass) { + default: break; +// case CONF_PASS_PRE_CONSOLE: +// case CONF_PASS_PRE_PCI: + case CONF_PASS_POST_PCI: +// case CONF_PASS_PRE_BOOT: +// if (conf->fixup_scsi) +// onboard_scsi_fixup(); +// if (conf->fixup_vga) +// vga_fixup(); + printk_debug("mainboard fixup pass %d done\r\n", + pass); + break; + } + +} static struct device_operations mainboard_operations = { .read_resources = root_dev_read_resources, .set_resources = root_dev_set_resources, @@ -41,5 +94,6 @@ static void enumerate(struct chip *chip) struct chip_control mainboard_via_epia_m_control = { .enumerate = enumerate, .name = "VIA EPIA-M mainboard ", + .enable = enable }; -- cgit v1.2.3