3,11 → 3,8 |
#include <ll/i386/cons.h> |
#include <ll/sys/ll/ll-func.h> |
|
#include <drivers/llpci.h> |
#include <drivers/pci.h> |
#include "drivers/gd.h" |
|
#include <drivers/gd.h> |
|
#include "drivers/s3.h" |
#include "drivers/trident.h" |
#include "drivers/vesa.h" |
59,11 → 56,6 |
/************************************************************************/ |
int gd_init(WORD flags) |
{ |
struct pci_regs *r; |
int dummy; |
|
SYS_FLAGS f; |
|
memset(&actualmode, 0, sizeof(struct gmode)); |
type = UNKNOWN; |
|
81,26 → 73,6 |
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); |
|
dummy = pcibios_read_config_dword(bus, dev, 16, &flb); |
flb = flb & 0xFF800000; |
|
cprintf("FLB @ %lx\n", flb); |
if (flb < 32 * 1024 * 1024) { |
flb = 0x02000000; |
cprintf("Wrong FLB!!! Forced to %lx\n", flb); |
pcibios_write_config_dword(bus, dev, 16, flb); |
} |
} |
} |
ll_frestore(f); |
|
/* Then, the other graph cards... Override VESA!!! */ |
if (trident_test() == 1) { |
type = TRIDENT; |
229,7 → 201,6 |
if ((flb != 0) && trylinear) { |
linear = TRUE; |
s3_linear(flb); |
pcibios_write_config_dword(bus, dev, 16, flb); |
return TRUE; |
} |
linear = FALSE; |