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:

  1. Small Size Profiles
  2. Shell Commands
  3. New Shell API
  4. 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.

  1. help -b: list all supported commands in UEFI shell.
  2. memmap: Displays the memory map maintained by UEFI environment.
  3. mm: Displays or modified MEM/MMIO/IO/PCI/PCIe address space.
  4. mem: Displays the contents of system or device memory.
  5. drivers -b: Displays the UEFI driver list.
  6. devices: Display the list of devices supported by UEFI drivers.
  7. devtree: Display the UEFI driver model complaint device tree.
  8. bh -b: Displays the device handles associated with UEFI drivers.
  9. dumpstore -all -b: Display the contents of the NVRAM variables.
  10. stall: stalls the operation for a specified number of micro seconds.
  11. 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