From mboxrd@z Thu Jan 1 00:00:00 1970 Subject: Re: [edk2-devel] How to add a DXE driver to an OVMF image? To: Andrew Fish ,devel@edk2.groups.io From: d.meneses@softi9.pt X-Originating-Location: RO (146.70.128.235) X-Originating-Platform: Linux Chrome 106 User-Agent: GROUPS.IO Web Poster MIME-Version: 1.0 Date: Thu, 03 Nov 2022 08:23:22 -0700 References: <3519C852-1306-4986-92F2-D5B2C4531D00@apple.com> In-Reply-To: <3519C852-1306-4986-92F2-D5B2C4531D00@apple.com> Message-ID: <3713.1667489002694449238@groups.io> Content-Type: multipart/alternative; boundary="jJysP76FUWns77yEzqtR" --jJysP76FUWns77yEzqtR Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Thank you Andrew for this information. I set it to *true* cause the builder was asking for a *Depex section*. Setting it to *false allows QEMU* to boot properly. Nonetheless, the driver *doesn't seem to be called*... yet. Concerning Pedro's suggestion (Ol=C3=A1!!!), thank you for pointing me to t= he DebugLib, I'll look into it. Nonetheless, I'll need to *use ConInt and ConOut in production*. I am aware of a DXE program that does it. Maybe I was passed the wrong info= rmation and the program is running on another phase... Anyhow, in theory I'd be able to install the I/O protocols in the DXE phase= in order to be able to use them. Right? The *TerminalDxe.inf* , a *UEFI driver* , states: *Terminal module installs= Simple Text Input(ex)/Out protocols for serial devices * I think assumed erroneously that the *OvmfX64.fdf* is setting the ordering = of the DXE drivers. After Andrew's answer I realised that may actually be done in the *Depex Se= ction?* I'll read its specification now in order to better understand how to use it= . Nonetheless, I tried turning it from a *DXE_DRIVER* into a *UEFI_DRIVER* an= d it's still not natively being listed in EFI Shell's *drivers* command. I don't see yet how mine differs from *TerminalDxe*. Maybe it's crashing an= d being unloaded. Maybe it's simpler than all of this. My true goal is: my program needs to be shipped with the BIOS image in ROM = and=C2=A0run for sure=C2=A0on every boot, with no possibility of being *cir= cumvented*. I have also read that some DXE drivers are not guaranteed to run if somethi= ng like fast boot is activated. Taking that in consideration, what module type should I create to achieve m= y goal? Finally, is there any documentation on actual programming using EDK2 ? Say, which functions can I use to read user input? Or what dependencies do I have to include as LibraryClasses if I want to us= e a certain function? Is reading source code the only way to go ? I have also used DoxyGen to generate docs, but it's far from ideal. Cheers, Diogo --jJysP76FUWns77yEzqtR Content-Type: text/html; charset="utf-8" Content-Transfer-Encoding: quoted-printable

Thank you Andrew for this information.
I set it to true cause the builder was asking for a Depex section. <= br />Setting it to false allows QEMU to boot properly. Nonetheless, the driver doesn't seem to be called... ye= t.

Concerning Pedro's suggestion (Olá!!!), thank you for = pointing me to the DebugLib, I'll look into it. 
Nonetheless, I'l= l need to use ConInt and ConOut in production.
I am a= ware of a DXE program that does it. Maybe I was passed the wrong informatio= n and the program is running on another phase...
Anyhow, in theory I'd= be able to install the I/O protocols in the DXE phase in order to be able = to use them. Right?
The TerminalDxe.inf, a UE= FI driver, states: Terminal module installs Simple Text In= put(ex)/Out protocols for serial devices

I think assume= d erroneously that the OvmfX64.fdf is setting the ord= ering of the DXE drivers.
After Andrew's answer I realised that may ac= tually be done in the Depex Section?
I'll read i= ts specification now in order to better understand how to use it. 

Nonetheless, I tried turning it from a DXE_DRIVER = into a UEFI_DRIVER and it's still not natively being liste= d in EFI Shell's drivers command.
I don't s= ee yet how mine differs from TerminalDxe. Maybe it's = crashing and being unloaded.

Maybe it's simpler than all of this.&nbs= p;
My true goal is: my program= needs to be shipped with the BIOS image in ROM and run for sure = on every boot, with no possibility of being circumvente= d.
I have also read that some DXE drivers are not guaranteed = to run if something like fast boot is activated.
Taking that in consi= deration, what module type should I create to achieve my goal?

Finally, is there any documentat= ion on actual programmi= ng using EDK2?
Say, which functions can I use to read user inp= ut?
Or what dependencies do I have to include as LibraryClasses if I w= ant to use a certain function?
Is reading source code the only way to go?
I have also used Do= xyGen to generate docs, but it's far from ideal.

Cheers,
Di= ogo

--jJysP76FUWns77yEzqtR--