Hi, All!
Does any one knows how to soft-boot BIOS of a secondary video adapters, like X Windows do.
Probably after that we'll can use VESA extensions of secondary video adapters and have multiple video adapter/monitor support in our OSes.
Thanks. ::)
Video BIOS soft-booting (like in X)
Re:Video BIOS soft-booting (like in X)
Hi,
First method would be to mess with the resources used by the boot video card (to avoid conflicts), then set the resources for the second video card to match what they would've been if it was the boot video card. Then search for the video ROM's entry point and do a far call to it in real mode or virtual 8086 mode.
The second method would be to leave the boot video card alone and set the resources for the second video card to something that doesn't conflict with anything else. Then use virtual 8086 mode to pretend that these resources are what the video card's ROM expects.
For "resources" I mean all I/O ports, the physical address of the video card's ROM and the physical address/es of any memory mapped regions (e.g. 0xA0000 and LFB). For all of these you'd change BAR's in PCI configuration space for the device.
For virtual 8086 mode you'd need to map a blank page at 0x000000 (a virtual IVT), map the video ROM at 0xC0000, map the display window at 0xA0000 and maybe map other areas for LFB and memory mapped I/O at a much higher address.
Cheers,
Brendan
I'm not sure how X does it, but I see 2 methods at least...CopperMan wrote:Does any one knows how to soft-boot BIOS of a secondary video adapters, like X Windows do.
Probably after that we'll can use VESA extensions of secondary video adapters and have multiple video adapter/monitor support in our OSes.
First method would be to mess with the resources used by the boot video card (to avoid conflicts), then set the resources for the second video card to match what they would've been if it was the boot video card. Then search for the video ROM's entry point and do a far call to it in real mode or virtual 8086 mode.
The second method would be to leave the boot video card alone and set the resources for the second video card to something that doesn't conflict with anything else. Then use virtual 8086 mode to pretend that these resources are what the video card's ROM expects.
For "resources" I mean all I/O ports, the physical address of the video card's ROM and the physical address/es of any memory mapped regions (e.g. 0xA0000 and LFB). For all of these you'd change BAR's in PCI configuration space for the device.
For virtual 8086 mode you'd need to map a blank page at 0x000000 (a virtual IVT), map the video ROM at 0xC0000, map the display window at 0xA0000 and maybe map other areas for LFB and memory mapped I/O at a much higher address.
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.
Re:Video BIOS soft-booting (like in X)
I herd that Video BIOS can be soft-booted with something like "Not Primary flag set", this will tell BIOS to not to map VGA registers to 0x3Bx, 0x3Dx, ...First method would be to mess with the resources used by the boot video card
Thanks.
Re:Video BIOS soft-booting (like in X)
As you can do this with PCI devices, a small method which I expect to work without many changes:
In real-mode, do not change much about the environment. In specific, do not modify anything between 0xD0000 and 0xFFFFF or the IVT. Try not to overwrite any code.
Make a VM86 mode block in which you map everything from 0 to 0xFFFFF to their linear counterparts, except for 0xC0000 to 0xCFFFF.
Probe using PCI for the video card. Tell it to map its rom bios to some location away from memory (not in 0xC0000).
If this is succesful, map this location to 0xC0000 in the VM86 block.
Call the bios' initialization routine (not sure on those details) from VM86. Use the card as you normally would.
If the PCI map was unsuccesful, the video card can't be used as secondary video card.
Good luck with this, don't have time myself to test.
In real-mode, do not change much about the environment. In specific, do not modify anything between 0xD0000 and 0xFFFFF or the IVT. Try not to overwrite any code.
Make a VM86 mode block in which you map everything from 0 to 0xFFFFF to their linear counterparts, except for 0xC0000 to 0xCFFFF.
Probe using PCI for the video card. Tell it to map its rom bios to some location away from memory (not in 0xC0000).
If this is succesful, map this location to 0xC0000 in the VM86 block.
Call the bios' initialization routine (not sure on those details) from VM86. Use the card as you normally would.
If the PCI map was unsuccesful, the video card can't be used as secondary video card.
Good luck with this, don't have time myself to test.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Video BIOS soft-booting (like in X)
i remember of someone that experienced the same issues and whose history is "logged" in some thread. that is probably one year ago (at least), though ...