Hello,
I am trying to solve a TPL issue...

Use Case: Download ACPI tables (actually it is the Device Tree but the 
principle is the same) from the network before BDS is started for enabling 
developers to work on his ACPI/FDT tables on his host machine. The path of the 
file is defined by a UEFI Device Path.

My current design was to make the ACPI/FDT Platform driver waiting for the PI 
signal EndOfDxe 
(https://github.com/tianocore/edk2/blob/master/EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatform.c#L124).
 And to download the file(s) when this event is signalled 
(https://github.com/tianocore/edk2/blob/master/EmbeddedPkg/Drivers/FdtPlatformDxe/FdtPlatform.c#L204).

The issue with this design is the EndOfDxe event is called at TPL_CALLBACK. And 
the DHCP & TFTP stack cannot be initialized at TPL_CALLBACK 
(https://github.com/tianocore/edk2/blob/master/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c#L824).

I can see few solutions to solve my issue but I do not like none of them :(:

-          Solution A: Encapsulate the use case in an EFI application/Driver 
that would be invoked by the user in BDS (either in the EFI Shell or as a 
Driver#### boot entry)
Drawback: it means the user has to do a specific action for this use case.



-          Solution B: Replace EnfOfDxe event to use a dummy EFI protocol that 
would be installed by the BDS

Drawback: it means the mechanism must be implemented in every BDS. While I am 
looking for a generic solution.



-          Solution C: Return an error saying the UEFI specification does not 
allow this use case.

Drawback: So what is the alternative? Changing the spec?



-          Solution D: Change my implementation to download a file from TFTP 
and make the implementation non-blocking/asynchronous when called at 
TPL_CALLBACK.

Drawback: it makes the implementation much more complicated to maintain. And I 
cannot guarantee the file is downloaded when the BDS is started.

Any comment/suggestion?

Thanks,
Olivier

-- IMPORTANT NOTICE: The contents of this email and any attachments are 
confidential and may also be privileged. If you are not the intended recipient, 
please notify the sender immediately and do not disclose the contents to any 
other person, use it for any purpose, or store or copy the information in any 
medium. Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered 
in England & Wales, Company No: 2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, 
Registered in England & Wales, Company No: 2548782


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to