06_UEFI Shell - manojkumarpaladugu/UEFI-BIOS-Development GitHub Wiki
What is UEFI Shell?
UEFI Shell is an application. It’s an Extensive Standardized Pre-OS UEFI Application. We boot to UEFI Shell rather than OS. Its exactly fits in between Boot Manager and OS.
UEFI Shell Elements:
- Small Size Profiles
- Shell Commands
- New Shell API
- Enhanced Scripting
UEFI Shell commands:
-b is command line parameter used to break the output as pages.
-? Is command line parameter used to display help about the command.
- help -b: list all supported commands in UEFI shell.
- memmap: Displays the memory map maintained by UEFI environment.
- mm: Displays or modified MEM/MMIO/IO/PCI/PCIe address space.
- mem: Displays the contents of system or device memory.
- drivers -b: Displays the UEFI driver list.
- devices: Display the list of devices supported by UEFI drivers.
- devtree: Display the UEFI driver model complaint device tree.
- bh -b: Displays the device handles associated with UEFI drivers.
- dumpstore -all -b: Display the contents of the NVRAM variables.
- stall: stalls the operation for a specified number of micro seconds.
- load: Loads a UEFI driver
UEFI Shell Scripts:
The UEFI Shell can execute commands from a file, which is called a batch script file.
These batch script files contains .nsh extension.
Example Program:
fs0:
edit MyFirstScript.nsh
Type: echo My first UEFI Shell script
Press F2
Enter
Press F3 to Exit