So after parsing acpi boot arch and verifying VGA space, (this is on a real board btw) So there exists onboard video (with a vga adapter) then a pci device (ive determined via class code to be VGA compatible) which is my actual video card.
so question is, wouldnt the traditional VGA space at A0000 belong to the onboard adapter? or would the bios see that another adapter is connected and somehow remap this?
Question about probing VGA space
Re: Question about probing VGA space
Perhaps they are both recipients of writes to their respective video buffers (mapped at 0xA0000), but your monitor is only connected to one of them.
Re: Question about probing VGA space
Most BIOSes disable the onboard VGA controller if a PCI VGA card is found. Other BIOSes require a manual setting.
Re: Question about probing VGA space
Eh, my bios supports onboard + external GPU to run at the same time.Gigasoft wrote:Most BIOSes disable the onboard VGA controller if a PCI VGA card is found. Other BIOSes require a manual setting.
Re: Question about probing VGA space
Hi,
Sadly, ancient software from last century is too crappy to handle this. For the purpose of backward compatibility; all the hardware involved gets bloated up with hacks. This includes video cards that have "VGA emulation" to make ancient crappy software happy (where the video card tries to emulate accesses to VGA IO ports and the VGA area from 0x000A0000 to 0x000BFFFF); but also includes special hacks in things like the PCI host controller and PCI to PCI bridges to forward accesses to the obsolete VGA stuff to the video card's "VGA emulation" hack-fest.
Of course only one video card can be in "VGA emulation hack-fest mode" at a time; because 2 pieces of hardware can't both respond to the ancient/obsolete VGA IO ports and the VGA area from 0x000A0000 to 0x000BFFFF at the same time.
This means that the BIOS sets up PCI device's BARs; then (for backward compatibility, for ancient/crappy software) selects one video card to setup in "VGA emulation hack-fest mode"; and configures that video card, PCI host controller, PCI to PCI bridges, etc to make ancient/crappy software happy. Old crappy software will continue to be crappy (e.g. will work for "VGA" because of all the hacks in hardware; but will not support any extra video cards); and good/modern software will ignore all the obsolete crud (e.g. device drivers that treat PCI devices as PCI devices, where there's no resource conflicts and 10 different video cards can all work at the same time).
Cheers,
Brendan
PCI devices have "BARs" (Base Address Registers) that tell them where their registers and memory mapped IO areas are in the physical address space. Each PCI device has it's "BARs" set differently, so that there's no conflicts and everything works. This means that you can have 10 different video cards using 10 different physical addresses and (for sane/modern software) everything will work fine. This is nice and clean and solves all the problems.Nessphoro wrote:Eh, my bios supports onboard + external GPU to run at the same time.Gigasoft wrote:Most BIOSes disable the onboard VGA controller if a PCI VGA card is found. Other BIOSes require a manual setting.
Sadly, ancient software from last century is too crappy to handle this. For the purpose of backward compatibility; all the hardware involved gets bloated up with hacks. This includes video cards that have "VGA emulation" to make ancient crappy software happy (where the video card tries to emulate accesses to VGA IO ports and the VGA area from 0x000A0000 to 0x000BFFFF); but also includes special hacks in things like the PCI host controller and PCI to PCI bridges to forward accesses to the obsolete VGA stuff to the video card's "VGA emulation" hack-fest.
Of course only one video card can be in "VGA emulation hack-fest mode" at a time; because 2 pieces of hardware can't both respond to the ancient/obsolete VGA IO ports and the VGA area from 0x000A0000 to 0x000BFFFF at the same time.
This means that the BIOS sets up PCI device's BARs; then (for backward compatibility, for ancient/crappy software) selects one video card to setup in "VGA emulation hack-fest mode"; and configures that video card, PCI host controller, PCI to PCI bridges, etc to make ancient/crappy software happy. Old crappy software will continue to be crappy (e.g. will work for "VGA" because of all the hacks in hardware; but will not support any extra video cards); and good/modern software will ignore all the obsolete crud (e.g. device drivers that treat PCI devices as PCI devices, where there's no resource conflicts and 10 different video cards can all work at the same time).
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Question about probing VGA space
If you want to know what's listening on VGA accesses, the OS itself will have serious trouble to know for sure where it ends up.so question is, wouldnt the traditional VGA space at A0000 belong to the onboard adapter? or would the bios see that another adapter is connected and somehow remap this?
For the closest thing to an answer, you require a driver for the video card that owns the VGA range at that moment. Many video cards of the day have a bit hidden in a register that enables VGA decoding or not, and you can check that to see if it's been initialized to listen to VGA addresses.
This of course doesn't solve the issue of a lack of routing of hardware transactions to the video card of choice.