diff -urN freebios-cvs/src/arch/i386/lib/vgabios.c freebios-vgabios/src/arch/i386/lib/vgabios.c --- freebios-cvs/src/arch/i386/lib/vgabios.c 2002-03-30 08:11:05.000000000 +0900 +++ freebios-vgabios/src/arch/i386/lib/vgabios.c 2003-05-21 19:06:04.000000000 +0900 @@ -160,12 +160,19 @@ 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 + // Use the ROM with the VGA card 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 +183,9 @@ 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) diff -urN freebios-cvs/src/bioscall/pcibios.c freebios-vgabios/src/bioscall/pcibios.c --- freebios-cvs/src/bioscall/pcibios.c 2002-03-31 15:25:56.000000000 +0900 +++ freebios-vgabios/src/bioscall/pcibios.c 2003-05-21 19:05:44.000000000 +0900 @@ -76,7 +76,7 @@ *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;