summaryrefslogtreecommitdiff
path: root/hw/xfree86/int10/generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xfree86/int10/generic.c')
-rw-r--r--hw/xfree86/int10/generic.c59
1 files changed, 15 insertions, 44 deletions
diff --git a/hw/xfree86/int10/generic.c b/hw/xfree86/int10/generic.c
index 6a0471145..a30dee103 100644
--- a/hw/xfree86/int10/generic.c
+++ b/hw/xfree86/int10/generic.c
@@ -125,8 +125,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
void* options = NULL;
int screen;
legacyVGARec vga;
- xf86int10BiosLocation bios;
-
+
#ifdef _PC
int size;
CARD32 cs;
@@ -187,14 +186,9 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
#endif
INTPriv(pInt)->highMemory = V_BIOS;
- xf86int10ParseBiosLocation(options,&bios);
-
- if (xf86IsEntityPrimary(entityIndex)
- && !(initPrimary(options))) {
- if (! xf86int10GetBiosSegment(pInt, &bios,
- (unsigned char *)sysMem - V_BIOS)) {
+ if (xf86IsEntityPrimary(entityIndex) && !(initPrimary(options))) {
+ if (!xf86int10GetBiosSegment(pInt, (unsigned char *)sysMem - V_BIOS))
goto error1;
- }
set_return_trap(pInt);
@@ -204,8 +198,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
xf86Int10SaveRestoreBIOSVars(pInt, TRUE);
} else {
- const BusType location_type = xf86int10GetBiosLocationType(pInt,
- &bios);
+ const BusType location_type = xf86int10GetBiosLocationType(pInt);
int bios_location = V_BIOS;
reset_int_vect(pInt);
@@ -214,12 +207,8 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
switch (location_type) {
case BUS_PCI: {
int err;
- struct pci_device *rom_device = (bios.bus == BUS_PCI)
- ? pci_device_find_by_slot(PCI_DOM_FROM_BUS(bios.location.pci.bus),
- PCI_BUS_NO_DOMAIN(bios.location.pci.bus),
- bios.location.pci.dev,
- bios.location.pci.func)
- : xf86GetPciInfoForEntity(pInt->entityIndex);
+ struct pci_device *rom_device =
+ xf86GetPciInfoForEntity(pInt->entityIndex);
vbiosMem = (unsigned char *)base + bios_location;
err = pci_device_read_rom(rom_device, vbiosMem);
@@ -232,9 +221,6 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
break;
}
case BUS_ISA:
- if (bios.bus == BUS_ISA) {
- bios_location = bios.location.legacy;
- }
vbiosMem = (unsigned char *)sysMem + bios_location;
#if 0
(void)memset(vbiosMem, 0, V_BIOS_SIZE);
@@ -279,41 +265,26 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
* If this adapter is the primary, use its post-init BIOS (if we can find
* it).
*/
- xf86int10ParseBiosLocation(options,&bios);
-
{
int bios_location = V_BIOS;
Bool done = FALSE;
vbiosMem = (unsigned char *)base + bios_location;
- if ((bios.bus == BUS_ISA)
- || (bios.bus != BUS_PCI && xf86IsEntityPrimary(entityIndex))) {
- if (bios.bus == BUS_ISA && bios.location.legacy) {
- xf86DrvMsg(screen, X_CONFIG,"Looking for legacy V_BIOS "
- "at 0x%x for %sprimary device\n",
- bios.location.legacy,
- xf86IsEntityPrimary(entityIndex) ? "" : "non-");
- bios_location = bios.location.legacy;
- vbiosMem = (unsigned char *)base + bios_location;
- }
- if (int10_check_bios(screen, bios_location >> 4, vbiosMem))
- done = TRUE;
- else
- xf86DrvMsg(screen,X_INFO,
- "No legacy BIOS found -- trying PCI\n");
+ if (xf86IsEntityPrimary(entityIndex)) {
+ if (int10_check_bios(screen, bios_location >> 4, vbiosMem))
+ done = TRUE;
+ else
+ xf86DrvMsg(screen,X_INFO,
+ "No legacy BIOS found -- trying PCI\n");
}
if (!done) {
int err;
- struct pci_device *rom_device = (bios.bus == BUS_PCI)
- ? pci_device_find_by_slot(PCI_DOM_FROM_BUS(bios.location.pci.bus),
- PCI_BUS_NO_DOMAIN(bios.location.pci.bus),
- bios.location.pci.dev,
- bios.location.pci.func)
- : xf86GetPciInfoForEntity(pInt->entityIndex);
+ struct pci_device *rom_device =
+ xf86GetPciInfoForEntity(pInt->entityIndex);
err = pci_device_read_rom(rom_device, vbiosMem);
if (err) {
- xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (3) %s\n",
+ xf86DrvMsg(screen,X_ERROR,"Cannot read V_BIOS (5) %s\n",
strerror(err));
goto error1;
}