From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Question regarding changing video adapter selection during pre-boot (PEI/DXE) To: devel@edk2.groups.io From: pharcellus@hotmail.com X-Originating-Location: Dahlonega, Georgia, US (173.186.181.25) X-Originating-Platform: Windows Firefox 112 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Sun, 23 Apr 2023 23:00:21 -0700 Message-ID: Content-Type: multipart/alternative; boundary="P6vzRlOeoSa3DVpsQtxq" --P6vzRlOeoSa3DVpsQtxq Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Greetings, all. I have kind of a general UEFI dev question. I have multiple video adapters = in a system in which the BIOS doesn't provide even a hidden means of select= ing a particular adapter to use as the default boot adapter. It seems like = the heuristic is similar to what vgaarb does in the Linux kernel, where it = takes the adapter with the highest available PCI device ID and that one bec= omes the active boot adapter. I've read a bit of the UEFI spec about the GOP protocol, but what I wanted = to know was where I could look for the code that makes the determination fo= r the heuristic. Does it reside in a DXE driver module, or is it in a diffe= rent location? If so, could you tell me which one or where might I look to = find it? Also, is there a way without patching a UEFI BIOS to change that heuristic = if the BIOS itself doesn't provide a setup option? Like, could I add a DXE = driver to change it, or some other driver in the boot EFI partition? (I wou= ld tend to think it would be too late at that point, but figured I would as= k). Thank you in advance for any advice, Talarus Luan --P6vzRlOeoSa3DVpsQtxq Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable Greetings, all.

I have kind of a general UEFI dev question. I ha= ve multiple video adapters in a system in which the BIOS doesn't provide ev= en a hidden means of selecting a particular adapter to use as the default b= oot adapter. It seems like the heuristic is similar to what vgaarb does in = the Linux kernel, where it takes the adapter with the highest available PCI= device ID and that one becomes the active boot adapter.

I've re= ad a bit of the UEFI spec about the GOP protocol, but what I wanted to know= was where I could look for the code that makes the determination for the h= euristic. Does it reside in a DXE driver module, or is it in a different lo= cation? If so, could you tell me which one or where might I look to find it= ?

Also, is there a way without patching a UEFI BIOS to change th= at heuristic if the BIOS itself doesn't provide a setup option? Like, could= I add a DXE driver to change it, or some other driver in the boot EFI part= ition? (I would tend to think it would be too late at that point, but figur= ed I would ask).

Thank you in advance for any advice,
Talar= us Luan --P6vzRlOeoSa3DVpsQtxq--