Rename xf86ReadDomainMemory to xf86ReadLegacyVideoBIOS, since that's

what it is actually used for.  Modify a few routines in linuxPci.c to
take pci_device structures as parameters in stead of PCITAGs.
This commit is contained in:
Ian Romanick 2006-08-08 16:42:23 -07:00
commit 9df53d903e
7 changed files with 83 additions and 131 deletions

View file

@ -216,26 +216,15 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
setup_int_vect(pInt);
set_return_trap(pInt);
/*
* Retrieve two segments: one at V_BIOS, the other 64kB beyond the first.
* This'll catch any BIOS that might have been initialised before server
* entry.
/* Retrieve the entire legacy video BIOS segment. This can be upto
* 128KiB.
*/
vbiosMem = (char *)base + V_BIOS;
(void)memset(vbiosMem, 0, 2 * V_BIOS_SIZE);
if (xf86ReadDomainMemory(pInt->Tag, V_BIOS, V_BIOS_SIZE, vbiosMem) <
V_BIOS_SIZE) {
if (xf86ReadLegacyVideoBIOS(pInt->Tag, vbiosMem) < V_BIOS_SIZE) {
xf86DrvMsg(screen, X_WARNING,
"Unable to retrieve all of segment 0x0C0000.\n");
}
else if ((((unsigned char *)vbiosMem)[0] == 0x55) &&
(((unsigned char *)vbiosMem)[1] == 0xAA) &&
(((unsigned char *)vbiosMem)[2] > 0x80)) {
if (xf86ReadDomainMemory(pInt->Tag, V_BIOS + V_BIOS_SIZE, V_BIOS_SIZE,
(unsigned char *)vbiosMem + V_BIOS_SIZE) < V_BIOS_SIZE)
xf86DrvMsg(screen, X_WARNING,
"Unable to retrieve all of segment 0x0D0000.\n");
}
/*
* If this adapter is the primary, use its post-init BIOS (if we can find