Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
UEFI application questions
Table of Contents
Currently there are only guidelines developing UEFI code for pre-boot. Link to the EDK II module writers guide: EDK_II Module Writer_s Guide_0_7.pdf
To develop UEFI code in runtime the applications the UEFI Specification defines the rules for writing runtime safe code along with the calling conventions and the rules that must be followed for UEFI runtime code to work correctly when the OS is running.
UEFI Applications may only execute in the pre-boot environment prior to ExitBootServices(). This means it is not possible for UEFI applications to be available at OS runtime. The only exception is a special class of UEFI application that is a UEFI OS Loader.
The “HelloWorld” is a sample application that is part of the MdeModulePkg in the edk2 directory https://github.com/tianocore/edk2 repository directory. There is both a HelloWorld.C for the source and an HelloWorld.INF file to build the module under EDK II.
A simple text editor can be used to view both of these files and make changes.
If you are running from the shell then there are 2 ways.
- The shell will search for a script file called “startup.nsh” in any FAT file system that would get executed. Inside the script other UEFI applications could be invoked.
- The shell's command line can specify a UEFI application to run automatically.
- The UEFI Specification also defines Boot Options. BootOption and BootOrder variables can be set to a UEFI Application can be auto executed on every boot.