Hi Bjorn, Thanks for the nice summary. Dne 6.12.2017 v 19:43 Bjorn Helgaas napsal(a): >> Yes exactly. Question is why the insanity alias exists in the first place. >> What Mr. PCI tried to fix or break with that alias design? >> Besides making logic simpler, I have no idea. > > I think this 10-bit aliasing is a compatibility feature for ISA. > I looked it up in the "PCI System Architecture (4th Edition)" the whole madness exists because there were legacy ISA drivers accessing the hardware using the alias addresses. The same reason applies for the ISA enable bit on PCI bridge, where it will discards ISA accesses from primary side to allow the aliases propagate only to PCI/ISA bridge. >> drivers/pci or platform/hardware? > > drivers/pci > OK I created bug report available on [1], also using parts of your mails. I also tried to summarize: The Linux should do following: Turn on VGA_16BIT_EN if supported by the bridge If VGA_16BIT_EN is not supported by the bridge, try to reassign the peer I/O BAR so it doesn't conflict with the 0x3b0-0x3df aliases The older PCI specs specifies the VGA_16BIT_EN as read as zero, so it could be safe to try to turn it on all bridges, because maybe the VGA arbiter can later switch another VGA card as primary (I fixed the start of alias to 0x3b0 you had 0x3c0 in your mails). It looks that: /* * We don't have to worry about legacy ISA devices, so nothing to do here. * This is marked as __weak because multiple architectures define it; it should * eventually go away. */ resource_size_t __weak pcibios_align_resource(void *data, Comment is not true, the aliasing problem exists on all architectures. Thanks Rudolf [1] https://bugzilla.kernel.org/show_bug.cgi?id=198113