diff -urN freebios-cvs/src/mainboard/via/epia/Config freebios-vga/src/mainboard/via/epia/Config --- freebios-cvs/src/mainboard/via/epia/Config 2002-12-14 15:34:34.000000000 +0900 +++ freebios-vga/src/mainboard/via/epia/Config 2003-05-14 04:10:50.000000000 +0900 @@ -11,6 +11,7 @@ mainboardinit pc80/serial.inc mainboardinit arch/i386/lib/console.inc mainboardinit northbridge/via/vt8601/raminit.inc +mainboardinit northbridge/via/vt8601/vgainit.inc mainboardinit southbridge/via/vt8231/ideconfig.inc # mainboardinit ram/dump_northbridge.inc # mainboardinit ram/ramtest.inc diff -urN freebios-cvs/src/northbridge/via/vt8601/northbridge.c freebios-vga/src/northbridge/via/vt8601/northbridge.c --- freebios-cvs/src/northbridge/via/vt8601/northbridge.c 2003-05-13 22:13:51.000000000 +0900 +++ freebios-vga/src/northbridge/via/vt8601/northbridge.c 2003-05-14 16:41:52.000000000 +0900 @@ -19,6 +19,15 @@ if (! pcidev) return 0; + + /* Turn on shadow DRAM at 0xC0000-0xFFFFF so we can write + * PIRQ table, VGA BIOS, Bochs BIOS, etc. + * -- ts1 05/14/03 */ + printk_debug("Enabling shadow DRAM at 0xC0000-0xFFFFF: "); + pci_write_config_byte(pcidev, 0x61, 0xff); + pci_write_config_byte(pcidev, 0x62, 0xff); + pci_write_config_byte(pcidev, 0x63, 0xf0); + printk_debug("done\n"); // Documentation on VT8601 - Pg 51 Rev 1.3 Sept 1999 says // Device 0 Offset FB - Frame buffer control @@ -69,7 +78,7 @@ static struct mem_range mem[3]; mem[0].basek = 0; mem[0].sizek = 640; - mem[1].basek = 1024; + mem[1].basek = 768; mem[1].sizek = __sizeram(); mem[2].basek = 0; mem[2].sizek = 0; diff -urN freebios-cvs/src/northbridge/via/vt8601/raminit.inc freebios-vga/src/northbridge/via/vt8601/raminit.inc --- freebios-cvs/src/northbridge/via/vt8601/raminit.inc 2003-05-14 03:49:33.000000000 +0900 +++ freebios-vga/src/northbridge/via/vt8601/raminit.inc 2003-05-14 03:50:41.000000000 +0900 @@ -175,7 +175,7 @@ helped a tiny bit. We can get to schedule() before we crash, but only if we set a breakpoint after the first loop in free_all_bootmem_core */ - CS_WRITE($0x56, $0x10) - CS_WRITE($0x57, $0x10) + CS_WRITE($0x56, $0x08) + CS_WRITE($0x57, $0x08) intel_chip_post_macro(0x36) diff -urN freebios-cvs/src/northbridge/via/vt8601/vgainit.inc freebios-vga/src/northbridge/via/vt8601/vgainit.inc --- freebios-cvs/src/northbridge/via/vt8601/vgainit.inc 1970-01-01 09:00:00.000000000 +0900 +++ freebios-vga/src/northbridge/via/vt8601/vgainit.inc 2003-05-14 03:51:56.000000000 +0900 @@ -0,0 +1,22 @@ +#if HAVE_FRAMEBUFFER + +/* Frame buffer size in MBytes */ +#ifndef SMA_SIZE +#define SMA_SIZE 8 +#endif + +#if SMA_SIZE==2 +#define FBREG 0x90 +#elif SMA_SIZE==4 +#define FBREG 0xa0 +#elif SMA_SIZE==8 +#define FBREG 0xb0 +#else +#error SMA_SIZE should be 2, 4, or 8 (MB) +#endif + + CS_WRITE($0xf8, $0x22) // DRAM arbitation timer - AGP, Host + CS_WRITE($0xf9, $0x42) // DRAM arbitation timer - VGA priority, normal + CS_WRITE($0xfb, $FBREG) // VGA enable + +#endif