Re: TCP in an UEFI runtime driver


Tim Lewis
 

Florian --

Making a runtime driver would be quite difficult, since almost all services are no longer available after ExitBootServices is called by the booting OS.

Perhaps a shell app would be more appropriate, since this runs in the pre-OS.

I'm not a QEMM expert, but I believe that it supports an emulated NIC driver that uses the host's NIC.

Tim

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of florian.hantke@fau.de
Sent: Wednesday, May 6, 2020 5:48 AM
To: discuss@edk2.groups.io
Subject: [edk2-discuss] TCP in an UEFI runtime driver

Hello everyone,

I am a student working on a project with EDK2 (and qemu), however I am quite new to this topic.

My idea is to implement an UEFI runtime driver that can receive a command via TCP during runtime, then runs a job and finally sends the result back via TCP.
So far I implemented a simple runtime driver, but the network part is missing.
According to the docs [1], I need to implement the UNDI feature and interact with the emulated NIC [2].
The problem is, I cannot find any documentation or code, how I would implement it.
Do you know where I would find some good resources or examples?

Also, I am not sure, if my idea would work that way?
Can a UEFI driver receive TCP packages on a predefined port or can it only send packages?
If not, is there any other way I could trigger a job remotly during runtime so that my driver runs the job and sends the results via TCP?

Thank you for your help and excuse me if my questions are very low-level, but as I said, I am still new to this topic.

Best regards,
Florian Hantke

[1] https://edk2-docs.gitbook.io/edk-ii-uefi-driver-writer-s-guide/25_network_driver_design_guidelines
[2] https://github.com/tianocore/tianocore.github.io/wiki/EDKII-Network-Over-QEMU

Join discuss@edk2.groups.io to automatically receive all group messages.