0

I have a uefi shell app and a uefi module, providing similar functionality, I am trying to merge them into a single entity that can be executed either as a module from Boot Menu or from uefi shell. Is it possible to create an efi app that can be executed like this ?

The entry point for module is

ModMain (
  IN EFI_HANDLE        ImageHandle,
  IN EFI_SYSTEM_TABLE  *SystemTable
  )

while for uefi shell app. it's,

MyAppMain (
  IN UINTN            Argc,
  IN CHAR16           **Argv
  )

Can I get the ImageHandle of an efi image implicitly (something like This pointer in C++ objects) ?

Thanks

user28264
  • 249
  • 2
  • 9

1 Answers1

0

What is the "module" in UEFI? There are only 2 types of UEFI binaries - UEFI application and PXE driver; If I did understand the question correctly I would do the following:

  • The "module" is a regular UEFI app that parses **argv;
  • Main UEFI App LoadImage() the "module" and passes the handle as a command line argument;
Alex D
  • 942
  • 1
  • 6
  • 17