62,24 → 62,37 |
struct pci_regs *r; |
int dummy; |
|
SYS_FLAGS f; |
|
memset(&actualmode, 0, sizeof(struct gmode)); |
type = UNKNOWN; |
|
/* VESA driver needs the V86 Mode... */ |
vm86_init(); |
|
/* First, check VESA... */ |
if (vbe_getinfo() == 1) { |
type = VESA; |
if (flags & NOLINEAR) { |
trylinear = 0; |
} else { |
trylinear = 1; |
} |
return 1; |
} |
|
f = ll_fsave(); |
if (pci_init() == 1) { |
if ((r = pci_class((0x0300) << 8, 0, &bus, &dev)) != NULL) { |
cprintf("PCI video card found!!!\n"); |
cprintf("Vendor: %x\n", r->VendorId); |
cprintf("Card: %x\n", r->DeviceId); |
/* flb = r->IoBaseAddress & 0xFF800000; */ |
|
dummy = pcibios_read_config_dword(bus, dev, 16, &flb); |
flb = flb & 0xFF800000; |
/* Err... Have to set type!!! */ |
|
cprintf("FLB @ %lx\n", flb); |
if (flb < 32 * 1024 * 1024) { |
/*flb = 32 * 0x1000000;*/ |
/*flb = 0xF3000000;*/ |
flb = 0x02000000; |
cprintf("Wrong FLB!!! Forced to %lx\n", flb); |
pcibios_write_config_dword(bus, dev, 16, flb); |
86,21 → 99,8 |
} |
} |
} |
ll_frestore(f); |
|
/* VESA driver needs the V86 Mode... */ |
vm86_init(); |
|
/* First, check VESA... */ |
if (vbe_getinfo() == 1) { |
type = VESA; |
if (flags & NOLINEAR) { |
trylinear = 0; |
} else { |
trylinear = 1; |
} |
return 1; |
} |
|
/* Then, the other graph cards... Override VESA!!! */ |
if (trident_test() == 1) { |
type = TRIDENT; |