vgabios support for epia

This commit is contained in:
Andrew Ip 2003-05-22 12:59:58 +00:00
parent 810d0c1e06
commit b8097a015b
4 changed files with 34 additions and 2 deletions

View file

@ -160,12 +160,18 @@ do_vgabios(void)
printk_debug("NO VGA FOUND\n");
return;
}
printk_debug("found VGA: vid=%ux, did=%ux\n", dev->vendor, dev->device);
printk_debug("found VGA: vid=%x, did=%x\n", dev->vendor, dev->device);
#ifdef VGABIOS_START
// Use VGA BIOS blob at specified address
// rom = VGABIOS_START;
#else
pci_read_config_dword(dev, PCI_ROM_ADDRESS, &rom);
// paranoia
rom = 0xf0000000;
pci_write_config_dword(dev, PCI_ROM_ADDRESS, rom|1);
printk_debug("rom base, size: %x\n", rom);
#endif
buf = (unsigned char *) rom;
if ((buf[0] == 0x55) && (buf[1] = 0xaa)) {
memcpy((void *) 0xc0000, buf, size);
@ -176,7 +182,9 @@ do_vgabios(void)
real_mode_switch_call_vga();
} else
printk_debug("BAD SIGNATURE 0x%x 0x%x\n", buf[0], buf[1]);
#ifndef VGABIOS_START
pci_write_config_dword(dev, PCI_ROM_ADDRESS, 0);
#endif
}
#endif // (CONFIG_VGABIOS == 1)

View file

@ -76,7 +76,7 @@ pcibios(
*peax = 0;
// busnum is an unsigned char;
// devfn is an int, so we mask it off.
busdevfn = dev->bus->number | (dev->devfn & 0xff);
busdevfn = dev->bus->secondary | (dev->devfn & 0xff);
printk_debug("0x%x: return 0x%x\n", func, busdevfn);
*pebx = busdevfn;
retval = 0;

View file

@ -11,6 +11,7 @@ mainboardinit superio/via/vt8231/setup_serial.inc
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

View file

@ -0,0 +1,23 @@
#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