Legacy VGA video RAM access on PCI graphics cards

Programming, for all ages and all languages.
Post Reply
thorfdbg
Posts: 19
Joined: Sat May 15, 2021 9:46 am

Legacy VGA video RAM access on PCI graphics cards

Post by thorfdbg »

Hi folks,

does anyone know how PCI based graphics cards handle access to the legacy VGA framebuffer? Typically, the location of the frame buffer is configured through the PCI "BAR" registers, which provide a linear access to the frame buffer. It seems that this frame buffer access through the PCI apperture always bypasses the (legacy) graphics controller, and is also always "chunky". Then, we have the legacy VGA address range sitting in the 0xa0000 window. It seems that this window cannot be placed in the PCI address space, is that right? Is there a way to address the VGA window through one of the PCI windows controlled through the BAR registers?

Essentially, I am trying to get something like "planar", though the graphics card sits behind a PCI bridge, so the legacy VGA window at 0xa0000 is not visible.
Octocontrabass
Member
Member
Posts: 5218
Joined: Mon Mar 25, 2013 7:01 pm

Re: Legacy VGA video RAM access on PCI graphics cards

Post by Octocontrabass »

thorfdbg wrote:Is there a way to address the VGA window through one of the PCI windows controlled through the BAR registers?
Maybe, but there's no standard so it'll depend on your display adapter.
thorfdbg wrote:Essentially, I am trying to get something like "planar", though the graphics card sits behind a PCI bridge, so the legacy VGA window at 0xa0000 is not visible.
Is there some reason you can't set the VGA Enable bit in the Bridge Control register? (You might need to configure other devices to prevent address conflicts.)
thorfdbg
Posts: 19
Joined: Sat May 15, 2021 9:46 am

Re: Legacy VGA video RAM access on PCI graphics cards

Post by thorfdbg »

Octocontrabass wrote: Is there some reason you can't set the VGA Enable bit in the Bridge Control register? (You might need to configure other devices to prevent address conflicts.)
Well, this sounds interesting. Sorry, I'm not so much into the bridge chips, thus where would I find more about this?
(This is actually a custom bridge for a non-x86 system, but it might just use one of the standard chips for moderating PCI access).
Octocontrabass
Member
Member
Posts: 5218
Joined: Mon Mar 25, 2013 7:01 pm

Re: Legacy VGA video RAM access on PCI graphics cards

Post by Octocontrabass »

PCI-to-PCI bridges are part of the PCI specifications, so you can go buy the relevant document from the PCI-SIG and not use a search engine to find a leaked copy of "PCI-to-PCI Bridge Architecture Specification" for free.

Other types of bridges are not really standard, but they usually do offer VGA compatibility. Datasheets for the bridge in question should tell you everything you need to know.
Ethin
Member
Member
Posts: 624
Joined: Sun Jun 23, 2019 5:36 pm
Location: North Dakota, United States

Re: Legacy VGA video RAM access on PCI graphics cards

Post by Ethin »

Octocontrabass wrote:PCI-to-PCI bridges are part of the PCI specifications, so you can go buy the relevant document from the PCI-SIG and not use a search engine to find a leaked copy of "PCI-to-PCI Bridge Architecture Specification" for free.

Other types of bridges are not really standard, but they usually do offer VGA compatibility. Datasheets for the bridge in question should tell you everything you need to know.
Erm, don't PCI-SIG documents cost thousands and thousands of dollars? Last time I checked they were charging absolutely outrageous prices to gain access to documents for non-members.
Octocontrabass
Member
Member
Posts: 5218
Joined: Mon Mar 25, 2013 7:01 pm

Re: Legacy VGA video RAM access on PCI graphics cards

Post by Octocontrabass »

Yep, this particular document costs two thousand dollars. But typing "PCI-to-PCI Bridge Architecture Specification" into a search engine and downloading a copy for free from CERN Library Catalogue would be copyright infringement, so I can't tell anyone to do that.
linuxyne
Member
Member
Posts: 211
Joined: Sat Jul 02, 2016 7:02 am

Re: Legacy VGA video RAM access on PCI graphics cards

Post by linuxyne »

@Octocontrabass =D>
Post Reply