public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: d.meneses@softi9.pt
To: Andrew Fish <afish@apple.com>,devel@edk2.groups.io
Subject: Re: [edk2-devel] How to add a DXE driver to an OVMF image?
Date: Thu, 03 Nov 2022 08:23:22 -0700	[thread overview]
Message-ID: <3713.1667489002694449238@groups.io> (raw)
In-Reply-To: <3519C852-1306-4986-92F2-D5B2C4531D00@apple.com>

[-- Attachment #1: Type: text/plain, Size: 2027 bytes --]

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á!!!), thank you for pointing me to the 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 information 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 Section?*
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* and 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 and 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 run for sure on every boot, with no possibility of being *circumvented*.
I have also read that some DXE drivers are not guaranteed to run if something like fast boot is activated.
Taking that in consideration, what module type should I create to achieve my 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 use 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

[-- Attachment #2: Type: text/html, Size: 2663 bytes --]

  reply	other threads:[~2022-11-03 15:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02 11:11 How to add a DXE driver to an OVMF image? d.meneses
2022-11-03  0:58 ` [edk2-devel] " Pedro Falcato
2022-11-03  1:07   ` Andrew Fish
2022-11-03 15:23     ` d.meneses [this message]
2022-11-03 16:51       ` Pedro Falcato
2022-11-03 19:11         ` d.meneses
2022-11-03 21:34           ` Andrew Fish
2022-11-03 22:02             ` d.meneses
2022-11-03 22:02               ` Pedro Falcato
2022-11-03 22:12                 ` d.meneses
2022-11-04 13:20                   ` d.meneses
2022-11-09 17:52                     ` Andrew Fish
2022-11-09 18:29                       ` d.meneses
2022-11-09 20:09                         ` Andrew Fish
2022-11-10  7:43                           ` d.meneses

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3713.1667489002694449238@groups.io \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox