Re: PCI VGA 0x3b0/0x3C0 aliases handling in Linux

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

Dne 9.12.2017 v 20:40 Rudolf Marek napsal(a):
> Turn on VGA_16BIT_EN if supported by the bridge

It turns out, there are at least two bridges, where this bit is broken:

PEX 8114BC PCI Express-to-PCI/PCI-X Bridge Errata Documentation
PEX 8114BA PCI Express-to-PCI/PCI-X Bridge Errata Documentation

Description
In PCI or PCI-X Forward or Reverse Transparent Bridge mode, the Bridge Control
register VGA 16-Bit Decode bit (offset 3Ch[20]) does not function correctly. PCI Address
bits [9:0] are correctly decoded; however, PCI Address bits [15:10] are not decoded,
causing the PEX 8114 to ignore these Address lines.

It seems that this feature is required by windoze server edition:

"Virtual bridges that comply with PCI Express also comply with PCI-to-PCI Bridge Architecture Specification, Revision 1.1. In addition, VGA 16-bit decode (Section 3.2.5.18, "Bridge Control Register, bit 4") and SSID and SSVID (Section 3.2.5.13) from PCI-to-PCI Bridge Architecture Specification, Revision 1.2, must also be supported."


I tried to have a look, how to implement the resources to deal with the ISA aliasing, but I definitely need some pointers how to do that.

Overall approach:

For all PCI bridges, try to enable the 16-bit I/O (older bridges have this bit RO), minus the two broken above, note the state
in say, dev->hasvga16, perhaps do this in pci/quirks.c ?

During the PCI bridge enumeration, add extra resources if dev->hasvga16 is zero. I hope that the resource allocator can fix it on its own.
We should do that regardless of state of PCI_BRIDGE_CTL_VGA as pci_set_vga_state() could switch it later.

I don't know if it would be enough to modify  pci_read_bridge_bases() in drivers/pci/probe.c and add there all the ISA aliases of 0x3b0-0x3df
(similarly it adds transparent bridge resources)

There is 48 resources to be added, I hope there is no limit, seems there is just linked list.

N= 0 - F

0xN3b0-0xN3df
0xN7b0-0xN7df
0xNfb0-0xNfdf

Thanks
Rudolf




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux