UEFI application - tianocorecn/tianocorecn.github.io GitHub Wiki
UEFI application questions
Currently there are only guidelines developing UEFI code for pre-boot. Link to the EDK II module writers guide: http://sourceforge.net/projects/edk2/files/General%20Documentation/EDKII%20Module%20Writer_s%20Guide_0_7.pdf/download
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 in the directory . There is both a .C for the source and an .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.