HP Integrity rx2600 - List of EFI commands

From etlam.eu Tech Wiki
Jump to navigationJump to search
List of classes of commands:

boot          -- Booting options and disk-related commands
configuration -- Changing and retrieving system information
device        -- Getting device, driver and handle information
memory        -- Memory related commands
shell         -- Basic shell navigation and customization
scripts       -- EFI shell-script commands

boot

Boot and disk commands:

autoboot    -- View or set autoboot timeout variable
bcfg        -- Displays/modifies the driver/boot configuration
boottest    -- Set/View BootTest bits
clearlogs   -- Clears FPL and SEL logs
dblk        -- Displays the contents of blocks from a block device
lanboot     -- Performs boot over lan from EFI Shell
mount       -- Mounts a file system on a block device
reset       -- Resets the system
tftp        -- Tftp to a bootp/dhcp enabled unix boot server
vol         -- Displays volume information of the file system

autoboot

autoboot views or sets the timeout variable. 

autoboot [on|off|<seconds>]

Use autoboot <seconds> option to set the amount of time delay in seconds
before booting the boot option list.  If a value of 0 is specified or 
autoboot on, then there is no wait to boot the default option.

To disable use of the timeout variable, the following three 
choices are available:
1. Use autoboot off to delete the timeout variable
2. Disable Timeout value in the Boot Maintenance Menu
3. Press a key when EFI is booting up and the timeout count down is disabled.

The timeout value is saved to NVRAM

Note:
   1.   Does not take effect until next boot of the system.
   2.   Timeout value should be entered in decimal at the shell prompt
   3.   Timeout value in seconds is less than 65535 (0xFFFF)

Examples:
  * To display current autoboot timeout:
    fs0:\> autoboot
    Autoboot: ON
    Current Timeout is : 0 seconds

  * To set new autoboot delay
    fs0:\> autoboot 3 
    Autoboot: ON
    Timeout in seconds is : 3 seconds

bcfg

Displays/modifies the driver/boot configuration.

BCFG driver|boot [dump [-v]] [add # file "desc"] [rm #] [mv # #]

    driver         - Display/modify the driver option list
    boot           - Display/modify the boot option list
    dump           - Display the option list
    -v             - Display the option list with extra info
    add            - Add an option
    #              - The number of the option to add in hex
    file           - The file name of the EFI application/driver for the option
    "desc"         - The description of the option being added
    rm             - Remove an option
    #              - The number of the option to remove in hex
    mv             - Move an option
    #              - The number of the option to move in hex
    #              - The new number of the option being moved 

Examples:
  * To display driver options:
    Shell> bcfg driver dump

  * To display boot options:
    Shell> bcfg boot dump

  * To display verbosely of boot options:
    Shell> bcfg boot dump -v

  * To add a driver option #5
    Shell> bcfg driver add 5 mydriver.efi "My Driver"

  * To add a boot option #3
    Shell> bcfg boot add 3 osloader.efi "My OS"

  * To remove boot option #3
    Shell> bcfg boot rm 3

  * To move boot option #3 to boot option #7
    Shell> bcfg boot mv 3 7

boottest

Set/View BootTest bits

BOOTTEST [on|off] | [[test] [on|off]]

test   : booting_valid, early_cpu, late_cpu, platform, chipset,
         io_hw, mem_init, mem_test
on|off : Turn all tests or an individual test on (slower boot)
         or off (faster boot).

Note:
   1. If OS is Speedy Boot aware booting_valid should be on.
   2. Current variable refers to present boot. Following boots
      use the Default variable.
    
Examples:
  * To display the status of start-up tests:
  fs0:\> boottest

   BOOTTEST Settings Current Variable (This OS boot only)

   OS is not speedy boot aware.

   Selftest     Setting
   ---------    --------------
   early_cpu    Run this test
   late_cpu     Run this test
   platform     Run this test
   chipset      Run this test
   io_hw        Run this test
   mem_init     Run this test
   mem_test     Run this test


   BOOTTEST Settings Default Variable

   OS is not speedy boot aware.

   Selftest     Setting
   ---------    --------------
   early_cpu    Run this test
   late_cpu     Run this test
   platform     Run this test
   chipset      Run this test
   io_hw        Run this test
   mem_init     Run this test
   mem_test     Run this test

  
  * To display the status of a specified test:
  fs0:\> boottest early_cpu
        
  * To run all tests (normal boot time):
  fs0:\> boottest on
  
  * To skip all tests (faster boot time):
  fs0:\> boottest off
       
  * To run a specified test:
  fs0:\> boottest chipset on
  
  * To skip a specified test:
  fs0:\> boottest platform off

clearlogs

CLEARLOGS [fpl|sel|-n] 

fpl   : clear Forward Progress Log (FPL)
sel   : clear System Event Log (SEL)
-n    : Do not prompt before clearing logs, non-interactive flag
    
Examples:
  * To clear FPL and SEL logs:
  Shell> clearlogs
  Clear SEL and FPL logs? [y/n]  y
  FPL cleared
  SEL cleared

  * To clear only the SEL log:
  Shell> clearlogs sel
  SEL cleared
  
  * To clear logs without being prompted  
  Shell> clearlogs -n
  FPL cleared
  SEL cleared

dblk

Displays the contents of one or more blocks from a block device.

DBLK device [Lba] [blocks]

    device         - The name of the block device to be displayed
    Lba            - The index(hex) of the first block to be displayed
    blocks         - The number(hex) of blocks to be displayed

Note:
    1. If 'blocks' is larger than 0x10, DBLK displays the first 0x10 blocks.
    2. See dh and map command to find which blocks can be displayed.
    3. If a FAT files system is detected, some FAT parameters will also be
       displayed (label, systemid, oemid, sectorsize, clustersize, media etc)
       after all the blocks have been displayed.
    4. All units are in hex.

Examples:
  * To display one block of blk0, beginning from 0 block: 
    Shell>dblk blk0

  * To display one block of fs0, beginning from 0x2 block:
    Shell>dblk fs0 2

  * To display 0x5 blocks of fs0, beginning from 0x12 block:
    Shell>dblk fs0 12 5

  * To display 0x10 blocks of fs0, beginning from 0x12 block:
    Shell>dblk fs0 12 10

  * The attempt to display more than 0x10 blocks will display only 0x10 blocks:
    Shell>dblk fs0 12 20

  * Sample: To display one block of blk2, beginning from first block (block 0):
  fs1:\tmps1> dblk blk2 0 1

 LBA 0x0000000000000000 Size 0x00000200 bytes BlkIo 0x3F0CEE78
  00000000: EB 3C 90 4D 53 44 4F 53-35 2E 30 00 02 04 08 00  *.<.MSDOS5.0.....*
  00000010: 02 00 02 00 00 F8 CC 00-3F 00 FF 00 3F 00 00 00  *........?...?...*
  00000020: 8E 2F 03 00 80 01 29 2C-09 1B D0 4E 4F 20 4E 41  *./....),...NO NA*
  00000030: 4D 45 20 20 20 20 46 41-54 31 36 20 20 20 33 C9  *ME    FAT16   3.*
  00000040: 8E D1 BC F0 7B 8E D9 B8-00 20 8E C0 FC BD 00 7C  *......... ......*
  00000050: 38 4E 24 7D 24 8B C1 99-E8 3C 01 72 1C 83 EB 3A  *8N$.$....<.r...:*
  00000060: 66 A1 1C 7C 26 66 3B 07-26 8A 57 FC 75 06 80 CA  *f...&f;.&.W.u...*
  00000070: 02 88 56 02 80 C3 10 73-EB 33 C9 8A 46 10 98 F7  *..V....s.3..F...*
  00000080: 66 16 03 46 1C 13 56 1E-03 46 0E 13 D1 8B 76 11  *f..F..V..F....v.*
  00000090: 60 89 46 FC 89 56 FE B8-20 00 F7 E6 8B 5E 0B 03  *`.F..V.. ....^..*
  000000A0: C3 48 F7 F3 01 46 FC 11-4E FE 61 BF 00 00 E8 E6  *.H...F..N.a.....*
  000000B0: 00 72 39 26 38 2D 74 17-60 B1 0B BE A1 7D F3 A6  *.r9&8-t.`.......*
  000000C0: 61 74 32 4E 74 09 83 C7-20 3B FB 72 E6 EB DC A0  *at2Nt... ;.r....*
  000000D0: FB 7D B4 7D 8B F0 AC 98-40 74 0C 48 74 13 B4 0E  *........@t.Ht...*
  000000E0: BB 07 00 CD 10 EB EF A0-FD 7D EB E6 A0 FC 7D EB  *................*
  000000F0: E1 CD 16 CD 19 26 8B 55-1A 52 B0 01 BB 00 00 E8  *.....&.U.R......*
  00000100: 3B 00 72 E8 5B 8A 56 24-BE 0B 7C 8B FC C7 46 F0  *;.r.[.V$......F.*
  00000110: 3D 7D C7 46 F4 29 7D 8C-D9 89 4E F2 89 4E F6 C6  *=..F.)....N..N..*
  00000120: 06 96 7D CB EA 03 00 00-20 0F B6 C8 66 8B 46 F8  *........ ...f.F.*
  00000130: 66 03 46 1C 66 8B D0 66-C1 EA 10 EB 5E 0F B6 C8  *f.F.f..f....^...*
  00000140: 4A 4A 8A 46 0D 32 E4 F7-E2 03 46 FC 13 56 FE EB  *JJ.F.2....F..V..*
  00000150: 4A 52 50 06 53 6A 01 6A-10 91 8B 46 18 96 92 33  *JRP.Sj.j...F...3*
  00000160: D2 F7 F6 91 F7 F6 42 87-CA F7 76 1A 8A F2 8A E8  *......B...v.....*
  00000170: C0 CC 02 0A CC B8 01 02-80 7E 02 0E 75 04 B4 42  *............u..B*
  00000180: 8B F4 8A 56 24 CD 13 61-61 72 0B 40 75 01 42 03  *...V$..aar.@u.B.*
  00000190: 5E 0B 49 75 06 F8 C3 41-BB 00 00 60 66 6A 00 EB  *^.Iu...A...`fj..*
  000001A0: B0 4E 54 4C 44 52 20 20-20 20 20 20 0D 0A 52 65  *.NTLDR      ..Re*
  000001B0: 6D 6F 76 65 20 64 69 73-6B 73 20 6F 72 20 6F 74  *move disks or ot*
  000001C0: 68 65 72 20 6D 65 64 69-61 2E FF 0D 0A 44 69 73  *her media....Dis*
  000001D0: 6B 20 65 72 72 6F 72 FF-0D 0A 50 72 65 73 73 20  *k error...Press *
  000001E0: 61 6E 79 20 6B 65 79 20-74 6F 20 72 65 73 74 61  *any key to resta*
  000001F0: 72 74 0D 0A 00 00 00 00-00 00 00 AC CB D8 55 AA  *rt............U.*

Fat 16 BPB  FatLabel: 'NO NAME    '  SystemId: 'FAT16   ' OemId: 'MSDOS5.0'
 SectorSize 0x200  SectorsPerCluster 4 ReservedSectors 8  # Fats 2
 Root Entries 0x200  Media 0xF8  Sectors 0x32F8E  SectorsPerFat 0xCC
 SectorsPerTrack 0x3F Heads 255

lanboot

Perform boot over LAN

LANBOOT [select]   

select  : Select from list of LAN addresses found in system

Note:
   1. Lanboot with no paramters uses Primary LAN Address
   2. Lanboot select automatically launches lanboot process
   3. Behavior should be identical to selecting remote boot
      option from the boot manager.
   4. Use lanaddress command to see Primary LAN Address

Examples:
  * To start lan boot
  Shell> lanboot
  
  * To select MAC address to perform lan boot
  Shell> lanboot select
    01  Acpi(HWP0002,0)/Pci(3|0)/Mac(00306E1E1E2F) 
    02  Acpi(HWP0002,100)/Pci(2|0)/Mac(00306E1E1E18) 
  Select Desired LAN: 1
  Selected Acpi(HWP0002,0)/Pci(3|0)/Mac(00306E1E1E2F)

mount

Mounts a file system on a block device.

MOUNT BlkDevice [sname]

    BlkDevice      - The name of the block device to mount
    sname          - The name of the newly mounted file system

Note:
   1. Mount uses the diskio protocol to read the FATxx format on a device. Name
      of mounted file system is stored in NVRAM for a given shell environment.
   2. The mounted names will be lost when "map -r" is called next time.
   3. If MOUNT without the second argument, it mounts the block device.
      Then there is an EFI_FILE_SYSTEM_PROTOCOL on the handle, but a drive name
 
      from the shell is not generated.

Examples:
  * To mount device blk0 and name the file system fs0:
    Shell> map
    Device mapping table
      blk0 : VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-
    11D4-BCFA-0080C73C8881)
    
    Shell> mount blk0 fs0

  * To mount a block device without a name:
    Shell> mount blk1

reset

Resets the system.

RESET [-w [string]] [-s [string]]

    -w         - Performs a warm reset
    -s         - Performs a shutdown
    string     - String to be passed to reset service

Note:
   1. Not all systems implement -w option. This may mean different things on 
      depending on which BIOS EFI is implemented on. 
   2. Reset will be guaranteed to reset the chipset as well as the processor
      when cold reset is called.
   3. If warm reset is not supported, then a cold reset will be performed.
   4. If a shutdown is not supported, then a cold reset will be performed.

tftp

Tftp to a bootp/dhcp enabled unix boot server

TFTP [select]

select  : Select from list of PXE instances 

tftp commands
help    : Shows list of tftp commands
Get     : Receive file from boot server
Quit    : Exit tftp
Verbose : Turns debug printing on

Note:
   1. With no paramters tftp uses the Primary LAN Address
   2. Tftp must be invoked from a writable file system
   3. The exact path to where the file exists on the boot server 
      must be used for file transfer
   4. Use lanaddress command to see Primary LAN Address   
   

Examples:
  * To Select from list of PXE instances
  fs0:> tftp select
  Instance 0x0 0x40FF98EF88 Acpi(HWP0002,0)/Pci(3|0)/Mac(00306E1E5E82)
  Instance 0x1 0x40FF988408 Acpi(HWP0002,100)/Pci(2|0)/Mac(00306E1E5E30)

  * To transfer a file system from the boot server
  tftp> get /export/tftpboot/reflash/test.efi
  Received 564224 bytes
  tftp> quit

vol

Displays volume information for the file system specified by fs.

VOL [fs] [Volume Label]

    fs             - The name of the file system
    Volume Label   - New volume label

Examples:
  * To display the volume of current fs:
    fs0:\> vol
    Volume has no label (rw)
          1,457,664 bytes total disk space
          1,149,440 bytes available on disk
                512 bytes in each allocation unit
                
  * To change the label of fs0:
    shell> vol fs0 help_test
    Volume HELP_TEST (rw)
          1,457,664 bytes total disk space
          1,149,440 bytes available on disk
                512 bytes in each allocation unit

  * To get rid of the label of fs0:
    fs0:\> vol fs0 ""
    Volume has no label (rw)
          1,457,664 bytes total disk space
            220,160 bytes available on disk
                512 bytes in each allocation unit

configuration

Configuration commands:

cpuconfig   -- Deconfigure or reconfigure cpus
date        -- Displays the current date or sets the date in the system
err         -- Displays or changes the error level
esiproc     -- Make an ESI call
errdump     -- View/Clear logs
info        -- Display hardware information
monarch     -- View or set the monarch processor
palproc     -- Make a PAL call
salproc     -- Make a SAL call
time        -- Displays the current time or sets the time of the system
ver         -- Displays the version information

cpuconfig

Deconfigure or reconfigure cpus

CPUCONFIG [cpu] [on|off]

cpu    Specifies which cpu to configure
on|off Specifies to configure or deconfigure a cpu

Note:
   1. Cpu status will not change until next boot.
   2. Specifying a cpu number without a state will display
      configuration status.

Examples:
  * To deconfigure CPU 0 
    fs0:\> cpuconfig 0 off
    Cpu will be deconfigured on the next boot.

  * To display configuration status of cpus
    fs0:\> cpuconfig
    PROCESSOR INFORMATION

                       Proc                 Arch   Processor
      CPU    Speed     Rev   Model  Family  Rev     State
      ---  ----------  ----  -----  ------  ----  -------------
        0     560 MHz    B1      0      31     0   Sched Deconf
        1     560 MHz    B1      0      31     0         Active

date

Displays the current date or sets the date in the system.  

DATE [mm/dd/[yy]yy] 

    mm    - Month of date to be set
    dd    - Day of date to be set
    yyyy  - Year of date to be set

Note:
    1. yy: 98=1998, 99=1999, 00=2000, 01=2001, ..., 97=2097.
    2. yyyy: 1998 - 2099, other values are invalid. 
    3. EFI may behave unpredictably if illegal date values are used.

Examples:
  * To display the current date in the system:
    fs0:\> date
    06/18/2001

  * To set the date with long year format:
    fs0:\> date 01/01/2050
    fs0:\> date
    01/01/2050

  * To set the date with short year format: 
    fs0:\> date 06/18/01
    fs0:\> date
    06/18/2001

err

Displays or changes the error level in the system.

ERR [Error Level]

    Error Level   - New error level bit mask.

Note:
    1. In debug version, the message whose error level is higher than this 
       level will be displayed.
    2. Saving to NVRAM will cause the error level to be saved and used on all
       future reboots. Core of EFI will use the new error level as system is
       booting (all core EFI routines will then output using the new error 
       level).
    3. Error console must be set to a device path (ie com port or console).
       This is typically done in the boot manager, boot option maintenance menu
,
       Active Standard Error Devices menu. Not all EFI implementations include 
       an error console or support debug output. Consult the BIOS release 
       notes for this support.
    4. To add your own errors/error level see debug macro in sample
       implementation source in efidebug.h. 
    
Examples:
  * To display the current error message output level:
    Shell> err
    EFI ERROR 80000000 
      00000001  EFI_D_INIT
      00000002  EFI_D_WARN
      00000004  EFI_D_LOAD
      00000008  EFI_D_FS
      00000010  EFI_D_POOL
      00000020  EFI_D_PAGE
      00000040  EFI_D_INFO
      00000100  EFI_D_VARIABLE
      00000400  EFI_D_BM
      00001000  EFI_D_BLKIO
      00004000  EFI_D_NET
      00010000  EFI_D_UNDI
      00020000  EFI_D_LOADFILE
      00080000  EFI_D_EVENT
      80000000  EFI_D_ERROR    

  * To change the error message output level:    
    Shell> err 80000107    
    Make this change and save to NVRAM? [Y/N]y
    EFI ERROR 80000000 
      00000001  EFI_D_INIT
      00000002  EFI_D_WARN
      00000004  EFI_D_LOAD
      00000008  EFI_D_FS
      00000010  EFI_D_POOL
      00000020  EFI_D_PAGE
      00000040  EFI_D_INFO
      00000100  EFI_D_VARIABLE
      00000400  EFI_D_BM
      00001000  EFI_D_BLKIO
      00004000  EFI_D_NET
      00010000  EFI_D_UNDI
      00020000  EFI_D_LOADFILE
      00080000  EFI_D_EVENT
      80000000  EFI_D_ERROR

esiproc

Make an ESI call

ESIPROC GUID0 GUID1 procID [arg2] [arg3] [arg4] [arg5] [arg6] [arg7] [arg8]

return 0
return 1
return 2
return 3

Note:
   1.  All arguments are in hex. 
   2.  Unused arguments are set to 0.
   3.  Do not use 0x before the hex value.

errdump

View/Clear logs

ERRDUMP [mca|cpe|cmc|init|la|clear]

    -n            - No Prompt

Note:
   1. Dumps a specified log to the screen or clears all logs.
   2. Error logs are often longer than screen length.  It may be
      useful to redirect logs to a file.
   3. The non-interactive flag '-n' is only valid for 'errdump clear'.
   
Examples:
  * To display the Machine Check Abort Error log:
  fs0:\> errdump mca
  
  * To display the Corrected Platform Error log:
  fs0:\> errdump cpe
  
  * To display the Corrected Machine Check log:
  fs0:\> errdump cmc
  
  * To display the Initialization log:
  fs0:\> errdump init
  
  * To display the Logic Analyzer log:
  fs0:\> errdump la
  
  * To clear all logs:
  fs0:\> errdump clear
  Are you sure you want to clear ALL logs? [y/N]
  
  * To clear all logs without being prompted for confirmation:
  fs0:\> errdump clear -n

  * To redirect errdump mca log:
  fs0:\> errdump mca > errdump_mca.log

info

Display hardware information

INFO [target]

target : all, boot, cache, chiprev, cpu, fw, io, mem, sys, warning
    
Examples:
  * To display all info:
  Shell> info all
  
  * To display cpu info:
  Shell> info cpu
  
  * To display fw and boot info:
  Shell> info fw boot

monarch

View or set the monarch processor

MONARCH [cpu]

cpu    Specifies which cpu to set as the monarch

Note:
   1. With no arguments, monarch will display the current monarch
      processor
   2. The monarch selection will not take place until the next boot

Examples:
  * To view monarch
  fs0:\> monarch
   
                       | Processor 
   --------------------+-----------
   current status      |    0      
   next boot status    |    0      
   
  * To set the monarch to processor 1
  fs0:\> monarch 1
                      | Processor 
  --------------------+-----------
  current status      |    0      
  next boot status    |    1

palproc

Make a PAL call

PALPROC arg1 [arg2] [arg3] [arg4] [-a]

return 0
return 1
return 2
return 3

-a sends the command to all processors.

Note:
   1.  All arguments are in hex. 
   2.  Unused arguments are set to 0.
   3.  Do not use 0x before the hex value.

Examples:
  *for PAL Call Get Features: 
  Shell> PalProc 11

salproc

Make a SAL call

SALPROC arg1 [arg2] [arg3] [arg4] [arg5] [arg6] [arg7] [arg8]

return 0
return 1
return 2
return 3

Note:
   1.  All arguments are in hex. 
   2.  Unused arguments are set to 0.
   3.  Do not use 0x before the hex value.

time

Displays the current time or sets the time of the system.

TIME [hh:mm[:ss]] 

    hh    - Hour of time
    mm    - Minute of time
    ss    - Second of time

Note:
    1. Hour and minute are required to set the time.
    2. If second is not specified, 0 will be used as default.
    
Examples:
  * To display current time:
    fs0:\> time
    16:51:03

  * To set the system time:   
    fs0:\> time 9:51:30
    fs0:\> time
    09:51:31

ver

Displays the version information for this EFI Firmware. 

VER

Examples:
  * To display version information of a platform:
    fs0:\> ver
    EFI Specification Revision : 1.10
    EFI Vendor                 : HP
    EFI Revision               : 14.5

  * To display version information of another platform:
    fs0:\> ver
    EFI Specification Revision : 1.02
    EFI Vendor                 : HP
    EFI Revision               : 12.38

    SAL Specification Revision      3. 0
      SAL_A Revision    = 1. 1
      SAL_B Revision    = 1. 1

    PAL_A Revision        66.23
    PAL_B Revision        66.23

    Other modules mentioned in FIT (Firmware Interface Table)
    FIT_Entry Type   0, Revision    2.60
    FIT_Entry Type  15, Revision    66.23
    FIT_Entry Type  16, Revision    0.90
    FIT_Entry Type  32, Revision    0.30
    FIT_Entry Type  30, Revision    1. 0
    FIT_Entry Type  17, Revision    0.90
    FIT_Entry Type  18, Revision    6. 0
    FIT_Entry Type  20, Revision    0.80

 SalProc Entry 000000003FE3F720 and GP 000000003FF22480
 PalProc Entry 000000003FF48010 IO Port Base 00000FFFFC000000
 Cache Enabled

device

Device, driver and handle commands:

baud        -- Set serial port com settings
connect     -- Binds an EFI driver to a device and starts the driver
devices     -- Displays the list of devices being managed by EFI drivers
devtree     -- Displays the tree of devices that follow the EFI Driver Model
disconnect  -- Disconnects one or more drivers from a device
dh          -- Displays the handles in the EFI environment
drivers     -- Displays the list of drivers that follow the EFI Driver Model
drvcfg      -- Invokes the Driver Configuration Protocol
drvdiag     -- Invokes the Driver Diagnostics Protocol
guid        -- Displays all the GUIDs in the EFI environment
lanaddress  -- Display LAN MAC addresses
load        -- Loads and optionally connected EFI drivers
loadpcirom  -- Loads a PCI Option ROM
map         -- Displays or defines mappings
openinfo    -- Displays the protocols on a handle and the agents
optload     -- Lists all optional ROM-based efi drivers and applications
pci         -- Displays PCI devices or PCI function configuration space
reconnect   -- Reconnects one or more drivers from a device
unload      -- Unloads a protocol image

baud

Set serial port com settings

BAUD [<index> <baudrate>]

<index>    : Index to a device
<baudrate> : New baud rate (9600, 19200, 57600, or 115200)

Switch console rate. Without parameters baud runs interactively,
prompting user for input.

Note:
   1. Console may appear frozen for a few seconds while
      switching baud rate.
   2. The other serial port settings (e.g. stop bits, parity)
      are preserved.

Examples:
Shell> baud

Index  Handle (hex.)     Baud    DevicePath
-----  ----------------  ------  --------------------------------
  0          407F9A5C88    9600  Acpi(PNP0501,0)/Uart(9600 N81)


Which UART? [0-0] [q to quit] 0
Current baud rate = 9600
New baud rate: 9600, 19200, 57600, 115200? 115200
Proceed? [y/n] y
Switching baud rate to 115200...

Shell> baud 0 9600

Index  Handle (hex.)     Baud    DevicePath
-----  ----------------  ------  --------------------------------
  0          407F9A5C88  115200  Acpi(PNP0501,0)/Uart(115200 N81)


Switching baud rate to 9600...

connect

Binds an EFI driver to a device and starts the driver.

CONNECT [-r]|[-c] Handle# | DeviceHandle# DriverHandle#

    -r              - Connect recursively
    -c              - Connect console devices described in the 
                      EFI Environment Variables
    Handle#         - Device handle or Driver handle (hex)
    DeviceHandle#   - Device handle (hex)
    DriverHandle#   - Driver handle (hex)

Note:
    1. Recursive option causes EFI to scan all handles and checks to see if any
       loaded or embedded driver's SUPPORT function matches with the device.
       The drive's START function is called. If the driver's START function
       creates more device handles, these handles will also be checked to see
       if a matching driver can bind to these devices as well. The process is
       repeated until no more drivers are able to connect to any devices.
    2. If only a single handle is specified and that handle has an 
       EFI_DRIVER_BINDING_PROTOCOL on that handle, then the handle is assumed
       to be a driver handle.  Otherwise, it is assumed to be a device handle.
    3. A driver handle may have an 'Image' in the 'dh' output information.
       A device driver may have a 'DevPath' in the 'dh' output.
    4. EFI allows to change the console environment variables using the EFI 
       Boot Maintenance Manager. The '-c' switch in this command allows the 
       user to make the new console attached without having to reboot.

Examples:
  * To connect all drivers to all devices recursively:
    Shell> connect -r
    ConnectController(1) : Status = Success
    ConnectController(2) : Status = Success
    ConnectController(3) : Status = Success
    ...
    ConnectController(3D) : Status = Success

  * To connect driver 17 to all the devices it can manage:
    Shell> connect 17

  * To connect all possible drivers to device 19:
    Shell> connect 19

  * To connect driver 17 to device 19:
    Shell> connect 19 17

  * To connect console devices described in the EFI Environment Variables:
    Shell> connect -c

devices

Displays the list of devices being managed by EFI drivers

DEVICES [-b] [-lXXX]

    -b       - Displays one screen at a time
    -lXXX    - Displays devices using the ISO 639-2 language specified by XXX

Display Format:
    CTRL         - The handle number of the EFI device
    TYPE         - The device type. 
                     [R] Root Controller 
                     [B] Bus Controller 
                     [D] Device Controller
    CFG          - A managing driver supports the Driver Configuration Protocol
    DIAG         - A managing driver supports the Driver Diagnostics Protocol
    #P           - The number of parent controllers that the device has
    #D           - The number of drivers that are managing the device
    #C           - The number of child controllers this device has produced
    DEVICE NAME  - The name of the device from the Component Name Protocol

devtree

Displays the tree of devices that follow the EFI Driver Model

DEVTREE [-b] [-d] [lXXX] [DeviceHandle]

    -b           - Displays one screen at a time
    -d           - Displays device tree using device paths
    -lXXX        - Displays device tree using the ISO 639-2 language 
                   specified by XXX.
    DeviceHandle - Displays device tree below a certain handle

Examples:
  * To display the tree of all devices that follow the EFI Driver Model
    Shell> devtree

  * To display the tree of all devices below device 28 that follow the 
  * EFI Driver Model
    Shell> devtree 28

  * To display the tree of all devices that follow the EFI Driver Model,
  * break when screen is full:
    Shell> devtree -b

disconnect

Disconnects one or more drivers from a device.

DISCONNECT DeviceHandle# [DriverHandle# [ChildHandle#]] | [-r]

    DeviceHandle#   - Device handle (hex)
    DriverHandle#   - Driver handle (hex)
    ChildHandle#    - Child handle of device (hex)
    -r              - Disconnect drivers from all devices

Examples:
  * To disconnect all drivers from all devices:
    Shell> disconnect -r

  * To disconnect all drivers from device 28:
    fs0:\> disconnect 28

  * To disconnect driver 17 from device 28:
    fs0:\> disconnect 28 17

  * To disconnect driver 17 from device 28 and destroy child 32:
    fs0:\> disconnect 28 17 32

dh

Displays the handles in the EFI environment.

DH [-b] [-d] [-lXXX] [-v] [handle]|[-p prot_id] 

    -b           - Displays one screen at a time
    handle       - Dumps information of a certain handle
    -p prot_id   - Dumps all handles of a certain protocol
    -d           - Dumps EFI Driver Model related information
    -lXXX        - Dums information using the ISO 639-2 language 
                   specified by XXX.
    -v           - Dumps information on all handles

Examples:
  * To display all handles, display one screen at a time:
    Shell> dh -b
    Handle dump
      1: Image(DXE Core)
      2: FwVol FwFileSys FwVolBlk DevPath(MemMap(11:1B50000-1D4FFC8))
      3:
      4:
      5: Image(WinNtThunk)
      6: WinNtThunk DevPath(..76F3-11D4-BCEA-0080C73C8881))
      7: Image(WinNtBusDriver) DriverBinding
      ...

  * To display the detailed information handle 30:
    Shell> dh 30
    Handle 30 (01AF5308)
       IsaIo
         ROM Size......: 00000000
         ROM Location..: 00000000
         ISA Resource List :
           IO  : 000003F8-000003FF  Attr : 00000000
           INT : 00000004-00000000  Attr : 00000000
    
       dpath
          PNP Device Path for PnP
           HID A0341D0, UID 0
          Hardware Device Path for PCI
          PNP Device Path for PnP
           HID 50141D0, UID 0
       AsStr: 'Acpi(PNP0A03,0)/Pci(1F|0)/Acpi(PNP0501,0)'


  * To display all handles with 'diskio' protocol:
    Shell> dh -p diskio
    Handle dump by protocol 'Diskio'
     15: diskio blkio DevPath(..i(3|1)/Ata(Secondary,Master))
     16: diskio blkio DevPath(..,1)/PCI(0|0)/Scsi(Pun0,Lun0))
     44: diskio blkio fs DevPath(..ABD0-01C0-507B-9E5F8078F531)) ESP
     45: diskio blkio fs DevPath(..i(Pun0,Lun0)/HD(Part4,SigG0)) ESP
     17: diskio blkio DevPath(..PCI(3|1)/Ata(Primary,Master))

  * To display details on all handles with 'diskio' protocol:
    Shell> dh -p diskio -v

  * To display EFI Driver Model information on all handles with 'diskio' protoc
ol:
    Shell> dh -p diskio -d

  * To display all details on all handles with 'diskio' protocol:
    Shell> dh -p diskio -v -d

  * To display all handles with 'Image' protocol, break when screen is full:
    Shell> dh -p Image -b
    Handle dump by protocol 'image'
      1: Image(DXE Core)
      5: Image(WinNtThunk)
      7: Image(WinNtBusDriver) DriverBinding
      8: Image(Metronome)
      A: Image(IsaBus) DriverBinding
      B: Image(WinNtConsole) DriverBinding
      ...

drivers

Displays the list of drivers that follow the EFI Driver Model

DRIVERS [-b] [-lXXX]

    -b      - Displays one screen at a time
    -lXXX   - Displays drivers using the ISO 639-2 language specified by XXX

Display Format:
    DRV          - The handle number of the EFI driver
    TYPE         - The driver type. 
                     [B] Bus Driver  
                     [D] Device Driver
    CFG          - The driver supports the Driver Configuration Protocol
    DIAG         - The driver supports the Driver Diagnostics Protocol
    #D           - The number of devices that the driver is managing
    #C           - The number of child devices that this driver has produced
    DRIVER NAME  - The name of the driver from the Component Name Protocol
    IMAGE NAME   - The file path from which the driver was loaded

drvcfg

Invokes the Driver Configuration Protocol

DRVCFG [-c] [-lXXX] [-f] [-v] [-s] [DriverHandle [DeviceHandle [ChildHandle]]] 

    -c           - Configure all child devices
    -lXXX        - Configure using the ISO 639-2 language specified by XXX
    -f           - Force defaults
    -v           - Validate options
    -s           - Set options
    DriverHandle - The handle of the driver to configure
    DeviceHandle - The handle of a device that DriverHandle is managing
    ChildHandle  - The handle of a device that is a child of DeviceHandle

Examples:
  * To display the list of devices that are available for configuration
    Shell> drvcfg

  * To display the list of devices and child devices that are available 
  * for configuration
    Shell> drvcfg -c

  * To force defaults on all devices
    Shell> drvcfg -f

  * To force defaults on all devices that are managed by driver 17
    Shell> drvcfg -f 17

  * To force defaults on device 28 that is managed by driver 17
    Shell> drvcfg -f 17 28

  * To force defaults on all child devices of device 28 that is managed by
  * driver 17
    Shell> drvcfg -f 17 28 -c 

  * To force defaults on child device 30 of device 28 that is managed by 
  * driver 17
    Shell> drvcfg -f 17 28 30

  * To validate options on all devices
    Shell> drvcfg -v

  * To validate options on all devices that are managed by driver 17
    Shell> drvcfg -v 17

  * To validate options on device 28 that is managed by driver 17
    Shell> drvcfg -v 17 28

  * To validate options on all child devices of device 28 that is managed by 
  * driver 17
    Shell> drvcfg -v 17 28 -c 

  * To validate options on child device 30 of device 28 that is managed by 
  * driver 17
    Shell> drvcfg -v 17 28 30

  * To set options on device 28 that is managed by driver 17
    Shell> drvcfg -s 17 28

  * To set options on child device 30 of device 28 that is managed by driver 17
    Shell> drvcfg -s 17 28 30

  * To set options on device 28 that is managed by driver 17 in english
    Shell> drvcfg -s 17 28 -leng

  * To set options on device 28 that is managed by driver 17 in spanish
    Shell> drvcfg -s 17 28 -lspa

drvdiag

Invokes the Driver Diagnostics Protocol

DRVDIAG [-c] [-lXXX] [-s] [-e] [-m] [DriverHandle [DeviceHandle [ChildHandle]]]
 

    -c           - Diagnose all child devices
    -lXXX        - Diagnose using the ISO 639-2 language specified by XXX
    -s           - Run diagnostics in standard mode
    -e           - Run diagnostics in extended mode
    -m           - Run diagnostocs in manufacturing mode
    DriverHandle - The handle of the driver to configurre
    DeviceHandle - The handle of a device that DriverHandle is managing
    ChildHandle  - The handle of a device that is a child of DeviceHandle

Examples:
  * To display the list of devices that are available for diagnostics
    Shell> drvdiag

  * To display the list of devices and child devices that are available for 
  * diagnostics
    Shell> drvdiag -c

  * Run diagnostics in standard mode on all devices
    Shell> drvdiag -s

  * Run diagnostics in standard mode on all devices in english
    Shell> drvdiag -s -leng

  * Run diagnostics in standard mode on all devices in spanish
    Shell> drvdiag -s -lspa

  * Run diagnostics in standard mode on all devices and child devices
    Shell> drvdiag -s -c

  * Run diagnostics in extended mode on all devices
    Shell> drvdiag -e

  * Run diagnostics in manufacturing mode on all devices
    Shell> drvdiag -m

  * Run diagnostics in standard mode on all devices managed by driver 17
    Shell> drvdiag -s 17

  * Run diagnostics in standard mode on device 28 managed by driver 17
    Shell> drvdiag -s 17 28

  * Run diagnostics in standard mode on all child devices of device 28 
  * managed by driver 17
    Shell> drvdiag -s 17 28 -c

  * Run diagnostics in standard mode on child device 30 of device 28 
  * managed by driver 17
    Shell> drvdiag -s 17 28 30

guid

Displays all the GUIDs that have been registered in the EFI environment.

GUID [-b]

    -b     - Displays one screen at a time 

Note:
     1. Only displays the guids that were included in the core EFI build at 
        the time the core was built. Additional guids may have been added by 
        the BIOS integrator. Any GUIDs that are not in the original core build
        or were added by a new protocol that was loaded by the user will show 
        up as Unknown Device.
     2. The guid with a '*' at end means that there will probably be dump 
        information or token available for the protocol to this GUID. We can
        use 'dh' command to dump out those info.

Examples:
    fs0:\> guid -b
      DevIo            : AF6AC311-84C3-11D2-8E3C-00A0C969723B
      diskio           : CE345171-BA0B-11D2-8E4F-00A0C969723B
      blkio            : 964E5B21-6459-11D2-8E39-00A0C969723B  *
      txtin            : 387477C1-69C7-11D2-8E39-00A0C969723B
      txtout           : 387477C2-69C7-11D2-8E39-00A0C969723B  *
      fs               : 964E5B22-6459-11D2-8E39-00A0C969723B
      load             : 56EC3091-954C-11D2-8E3F-00A0C969723B
      image            : 5B1B31A1-9562-11D2-8E3F-00A0C969723B  *
      ...

lanaddress

Display LAN MAC addresses

LANADDRESS

Note:
   1. Primary Lan is identified by '*'
          
Examples:
  * To display core I/O card MAC address
  fs0:\> lanaddress
   LAN Address Information

      LAN Address        Path
      -----------------  ----------------------------------------
      Mac(00306E1E5E58)  Acpi(HWP0002,0)/Pci(3|0)/Mac(00306E1E5E58))   
     *Mac(00306E1E5E0E)  Acpi(HWP0002,100)/Pci(2|0)/Mac(00306E1E5E0E))

load

Loads EFI drivers and then they can provide available services.

LOAD [-nc] file [file...] 

    -nc     - Load the driver, but do not connect the driver.
    file    - File that contains the image of the driver, extension as '.efi'

Note:
    1. LOAD can deal with multiple files and 'file' supports wildcard.
    2. Use command Unload to unload a driver.
    3. If option -nc is not specified, then the loaded drivers will be 
       automatically connected.  If -nc is specified, then none of the
       loaded drivers will be connected.

Examples:
    fs0:\> load Isabus.efi
    load: Image 'fs0:\Isabus.efi' loaded at 18FE000. returned Success
     
    fs0:\> load Isabus.efi IsaSerial.efi
    load: Image 'fs0:\Isabus.efi' loaded at 18E5000. returned Success
    load: Image 'fs0:\IsaSerial.efi' loaded at 18DC000. returned Success
    
    fs0:\> load Isa*.efi
    load: Image 'fs0:\IsaBus.efi' loaded at 18D4000. returned Success
    load: Image 'fs0:\IsaSerial.efi' loaded at 18CB000. returned Success

    fs0:\> load -nc IsaBus.efi
    load: Image 'fs0:\Isabus.efi' loaded at 18FE000. returned Success

loadpcirom

Loads a PCI Option ROM from romfile.

LOADPCIROM romfile

    romfile        - File that contains PCI Option ROM data

map

Displays or defines mappings between user defined names and device handles.

MAP [-r|-v|-d] [sname] [handle] [-Fs|-Blk] [-b]

    -r      - Resets to default mappings
    -v      - Lists verbose information of mappings
    -d      - Deletes a mapping
    sname   - User-defined name to be assigned to the mapping
    handle  - The number of handle, which is same as dumped from 'dh' command
    -Fs     - Display only File System mappings
    -Blk    - Display only Block IO device mappings
    -b      - Displays one screen at a time

Note:
    1. Default mappings are the mappings chosen by the EFI integrator of the
       system.  Typically stored in flash NVRAM in the system but may also
       reside on the EFI system partition in the /EFI/Boot directory. 
       Core EFI implementation will determine which NVRAM source to use.
    2. The mapping order of FSx: to BlockIO devices is arbitrary. EFI 
       applications should not rely on the system mapping blockio devices to a
       particular FSx mapping. Adding or removing media may cause arbitrarily 
       reassignments of the FSx designations incurred by the map -r command. 
       Applications should create their own mappings.
    3. Using -Fs (file system only) and -Blk (blockio only) together results
       in no mappings being displayed.       

Examples:

* To reset the mapping table as default mappings:
shell> map -r
Device mapping table
  fs0 : VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BC
FA-0080C73C8881)
  blk0: VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BC
FA-0080C73C8881)

* To display all mappings in the device mapping table:
Shell> map
Device mapping table
  fs0 : VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BC
FA-0080C73C8881)
  blk0: VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BC
FA-0080C73C8881)

* To display only the File System mappings in the device mapping table:
Shell> map -Fs
Device mapping table
  fs0 : VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BC
FA-0080C73C8881)

* To display only the BlockIO device mappings in the device mapping table:
Shell> map -Blk
Device mapping table
  blk0: VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BC
FA-0080C73C8881)

* To display mapping table verbosely:
Shell> map -v
Device mapping table
  fs0 : VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D
4-BCFA-0080C73C8881)
       = Handle 3C: diskio blkio fs WinNtDriverIo
       > \

  blk0: VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D
4-BCFA-0080C73C8881)
       = Handle 3C: diskio blkio fs WinNtDriverIo
       > \

* 3C is a valid handle from the above messages, so 3C can be mapped:
Shell> map floppy 3C
Shell> map
Device mapping table
  fs0   : VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-
BCFA-0080C73C8881)
  blk0  : VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-
BCFA-0080C73C8881)
  floppy: VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-
BCFA-0080C73C8881)

* To display the information of mapped name:
Shell> map floppy
  floppy : VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-1
1D4-BCFA-0080C73C8881)

* To operate with the mapped name:
Shell> floppy:
floppy:\> ls

* To delete a mapped name:
Shell> map -d floppy
Shell> map
Device mapping table
  fs0 : VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BC
FA-0080C73C8881)
  blk0: VenHw(58C518B1-76F3-11D4-BCEA-0080C73C8881)/VenHw(0C95A92F-A006-11D4-BC
FA-0080C73C8881)  

* To rename a default mapping to a user defined map name, follow these steps:
* Map display of a system with EDD 3.0 implemented
fs1:\> map
Device mapping table
  fs0 : Acpi(PNP0A03,0)/PCI(3|1)/Ata(Secondary,Master)
  fs1 : Acpi(PNP0A03,1)/PCI(0|0)/Scsi(Pun0,Lun0)/HD(Part1,Sig1B16CC00-ABD0-01C)
  fs2 : Acpi(PNP0A03,1)/PCI(0|0)/Scsi(Pun0,Lun0)/HD(Part4,SigG0)
  blk0: Acpi(PNP0A03,0)/PCI(3|1)/Ata(Secondary,Master)
  blk1: Acpi(PNP0A03,1)/PCI(0|0)/Scsi(Pun0,Lun0)
  blk2: Acpi(PNP0A03,1)/PCI(0|0)/Scsi(Pun0,Lun0)/HD(Part1,Sig1B16CC00-ABD0-01C)
  blk3: Acpi(PNP0A03,1)/PCI(0|0)/Scsi(Pun0,Lun0)/HD(Part4,SigG0)
  blk4: Acpi(PNP0A03,0)/PCI(3|1)/Ata(Primary,Master)
fs1:\>
* To remap fs0: from a LS120 so that it is always called floppy:
fs1:\> map -d fs0
fs1:\> dh -p diskio
Handle dump by protocol 'diskio'
 15: diskio blkio fs DevPath(..i(3|1)/Ata(Secondary,Master))
 16: diskio blkio DevPath(..,1)/PCI(0|0)/Scsi(Pun0,Lun0))
 48: diskio blkio fs DevPath(..ABD0-01C0-507B-9E5F8078F531)) ESP
 49: diskio blkio fs DevPath(..i(Pun0,Lun0)/HD(Part4,SigG0)) ESP
 17: diskio blkio DevPath(..PCI(3|1)/Ata(Primary,Master))
fs1:\> map floppy 15
fs1:\> floppy:
floppy:\>map
Device mapping table
  fs1   : Acpi(PNP0A03,1)/PCI(0|0)/Scsi(Pun0,Lun0)/HD(Part1,Sig1B16CC00-ABD0-0)
  fs2   : Acpi(PNP0A03,1)/PCI(0|0)/Scsi(Pun0,Lun0)/HD(Part4,SigG0)
  blk0  : Acpi(PNP0A03,0)/PCI(3|1)/Ata(Secondary,Master)
  blk1  : Acpi(PNP0A03,1)/PCI(0|0)/Scsi(Pun0,Lun0)
  blk2  : Acpi(PNP0A03,1)/PCI(0|0)/Scsi(Pun0,Lun0)/HD(Part1,Sig1B16CC00-ABD0-0)
  blk3  : Acpi(PNP0A03,1)/PCI(0|0)/Scsi(Pun0,Lun0)/HD(Part4,SigG0)
  blk4  : Acpi(PNP0A03,0)/PCI(3|1)/Ata(Primary,Master)
  floppy: Acpi(PNP0A03,0)/PCI(3|1)/Ata(Secondary,Master)
* Now the current directory is the root on floppy: which is the LS120 on the 
  atapi secondary channel master device.

openinfo

Displays the protocols on a handle and the agents.

OPENINFO Handle

    Handle     - The handle to show the open protocol information

Examples:
  * To show open protocols on handle 23 that is the PCI Root Bridge.
  * It shows that the PCI Root Bridge is being managed by the PCI
  * Bus Driver, and the PCI Bus contains 7 PCI child controllers.
    Shell> openinfo 23
    Handle 23 (07DEE108)
    PciRootBridgeIo
      Drv[1D] Ctrl[23] Cnt(01) Driver   Image(PciBus)
      Drv[1D] Ctrl[28] Cnt(01) Child    Image(PciBus)
      Drv[1D] Ctrl[29] Cnt(01) Child    Image(PciBus)
      Drv[1D] Ctrl[2A] Cnt(01) Child    Image(PciBus)
      Drv[1D] Ctrl[2B] Cnt(01) Child    Image(PciBus)
      Drv[1D] Ctrl[2C] Cnt(01) Child    Image(PciBus)
      Drv[1D] Ctrl[2D] Cnt(01) Child    Image(PciBus)
      Drv[1D] Ctrl[2E] Cnt(01) Child    Image(PciBus)
      Drv[00] Ctrl[  ] Cnt(01) HandProt
    dpath
      Drv[1D] Ctrl[23] Cnt(01) Driver   Image(PciBus)
      Drv[00] Ctrl[  ] Cnt(0D) HandProt

optload

Lists all optional ROM-based efi drivers and applications

OPTLOAD [[-l]|[-e] <index>]

-l <index>  :  load the driver at index <index>
-e <index>  :  execute the app at index <index>

With no parameters optload displays a lists all efi drivers 
and applications that can be optionally loaded in the ROM.

pci

Displays PCI devices or PCI function configuration space. 

PCI [Bus Dev [Func] [-i] [-s [Seg]]]

    Bus     - Bus number in hex
    Dev     - Device number in hex
    Func    - Function number in hex
    Seg     - Segment number in hex
    -i      - Information interpreted
    -s      - Segment number specified

Note:
    1. If only Bus and Dev are specified, Func is set as default value(0).
    2. If segment number is not specified, Seg is set as default value(0).

Examples:

* To display all the PCI devices found in the system:
Shell> PCI

   Seg  Bus  Dev  Func
   ---  ---  ---  ----
    00   00   00    00 ==> Bridge Device - Host/PCI bridge
             Vendor 0x8086 Device 0x1130 Prog Interface 0
    00   00   01    00 ==> Bridge Device - PCI/PCI bridge
             Vendor 0x8086 Device 0x1131 Prog Interface 0
    00   00   1E    00 ==> Bridge Device - PCI/PCI bridge
             Vendor 0x8086 Device 0x244E Prog Interface 0
    00   00   1F    00 ==> Bridge Device - PCI/ISA bridge
             Vendor 0x8086 Device 0x2440 Prog Interface 0
    00   00   1F    01 ==> Mass Storage Controller - IDE controller
             Vendor 0x8086 Device 0x244B Prog Interface 80
    00   00   1F    02 ==> Serial Bus Controllers - USB
             Vendor 0x8086 Device 0x2442 Prog Interface 0
    00   00   1F    03 ==> Serial Bus Controllers - System Management Bus
             Vendor 0x8086 Device 0x2443 Prog Interface 0
    00   00   1F    04 ==> Serial Bus Controllers - USB
             Vendor 0x8086 Device 0x2444 Prog Interface 0
    00   00   1F    05 ==> Multimedia Device - Audio device
             Vendor 0x8086 Device 0x2445 Prog Interface 0
    00   00   1F    06 ==> Simple Communications Controllers - Modem
             Vendor 0x8086 Device 0x2446 Prog Interface 0
    00   01   00    00 ==> Display Controller - VGA/8514 controller
             Vendor 0x1002 Device 0x5246 Prog Interface 0
    00   02   07    00 ==> Multimedia Device - Audio device
             Vendor 0x1274 Device 0x1371 Prog Interface 0
    00   02   0A    00 ==> Bridge Device - CardBus bridge
             Vendor 0x1180 Device 0x0476 Prog Interface 0
    00   02   0A    01 ==> Bridge Device - CardBus bridge
             Vendor 0x1180 Device 0x0476 Prog Interface 0

* To display the configuration space of function 0, device 0 on bus 0:
Shell> PCI 00 00 00 -i

  PCI Segment 00 Bus 00 Device 00 Func 00
  00000000: 86 80 30 11 06 00 90 20-02 00 00 06 00 00 00 00  *..0.... ........*
  00000010: 08 00 00 20 00 00 00 00-00 00 00 00 00 00 00 00  *... ............*
  00000020: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  00000030: 00 00 00 00 88 00 00 00-00 00 00 00 00 00 00 00  *................*

  00000040: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  00000050: 50 00 09 38 00 00 00 00-00 00 00 00 00 00 00 00  *P..8............*
  00000060: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  00000070: 00 00 18 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  00000080: DE 2C CF 00 00 00 00 00-09 A0 04 F1 00 00 00 00  *.,..............*
  00000090: 00 00 D6 FF FE FF 00 00-33 80 33 80 85 84 C4 00  *........3.3.....*
  000000A0: 02 00 20 00 07 02 00 1F-00 00 00 00 00 00 00 00  *.. .............*
  000000B0: 00 00 00 00 30 00 00 00-00 00 00 00 00 00 08 00  *....0...........*
  000000C0: 00 00 00 00 00 00 00 00-00 08 00 00 00 00 00 00  *................*
  000000D0: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  000000E0: 00 00 00 00 00 00 00 00-00 00 90 14 00 00 00 00  *................*
  000000F0: 00 00 00 00 74 F8 00 00-00 00 00 00 08 00 00 00  *....t...........*

Vendor ID(0x0): 8086                     Device ID(0x2): 1130

Command(0x4): 0006
  (00)I/O space access enabled:       0  (01)Memory space access enabled:    1
  (02)Behave as bus master:           1  (03)Monitor special cycle enabled:  0
  (04)Mem Write & Invalidate enabled: 0  (05)Palette snooping is enabled:    0
  (06)Assert PERR# when parity error: 0  (07)Do address/data stepping:       0
  (08)SERR# driver enabled:           0  (09)Fast back-to-back transact...:  0

Status(0x6): 2090
  (04)New Capabilities linked list:   1  (05)66MHz Capable:                  0
  (07)Fast Back-to-Back Capable:      1  (08)Master Data Parity Error:       0
  (09)DEVSEL timing:               Fast  (11)Signaled Target Abort:          0
  (12)Received Target Abort:          0  (13)Received Master Abort:          1
  (14)Signaled System Error:          0  (15)Detected Parity Error:          0

Revision ID(0x8):     02                 BIST(0x0F):  Incapable
Cache Line Size(0xC): 00                 Latency Timer(0xD): 00
Header Type(0x0E):    0, Single function, PCI device
Class: Bridge Device - Host/PCI bridge - 
Base Address Registers(0x10):
     Start  Type    Space     Prefectchable?      Size       Limit
  ----------------------------------------------------------------
  20000000  Mem     32 bits   YES             04000000    24000000
  ----------------------------------------------------------------
No Expansion ROM(0x30)

Cardbus CIS ptr(0x28):   00000000
Sub VendorID(0x2C):          0000      Subsystem ID(0x2E):      0000
Capabilities Ptr(0x34):        88
Interrupt Line(0x3C):          00      Interrupt Pin(0x3D):       00
Min_Gnt(0x3E):                 00      Max_Lat(0x3F):             00

* To display configuration space of function 0, device 0 on bus 0, segment 0:
Shell> PCI 00 00 00 -s 0

  PCI Segment 00 Bus 00 Device 00 Func 00
  00000000: 86 80 30 11 06 00 90 20-02 00 00 06 00 00 00 00  *..0.... ........*
  00000010: 08 00 00 20 00 00 00 00-00 00 00 00 00 00 00 00  *... ............*
  00000020: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  00000030: 00 00 00 00 88 00 00 00-00 00 00 00 00 00 00 00  *................*

  00000040: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  00000050: 50 00 09 38 00 00 00 00-00 00 00 00 00 00 00 00  *P..8............*
  00000060: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  00000070: 00 00 18 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  00000080: DE A8 CE 00 00 00 00 00-09 A0 04 F1 00 00 00 00  *................*
  00000090: 00 00 D6 FF FE FF 00 00-33 80 33 80 85 84 C4 00  *........3.3.....*
  000000A0: 02 00 20 00 07 02 00 1F-00 00 00 00 00 00 00 00  *.. .............*
  000000B0: 00 00 00 00 30 00 00 00-00 00 00 00 00 00 08 00  *....0...........*
  000000C0: 00 00 00 00 00 00 00 00-00 08 00 00 00 00 00 00  *................*
  000000D0: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  000000E0: 00 00 00 00 00 00 00 00-00 00 A0 18 00 00 00 00  *................*
  000000F0: 00 00 00 00 74 F8 00 00-00 00 00 00 08 00 00 00  *....t...........*

reconnect

Reconnects one or more drivers from a device.

RECONNECT DeviceHandle# [DriverHandle# [ChildHandle#]] | [-r]

    DeviceHandle#   - Device handle (hex)
    DriverHandle#   - Driver handle (hex)
    ChildHandle#    - Child handle of device (hex)
    -r              - Reconnect drivers from all devices

Note:
    1. This command disconnects the drivers from the controller, just like 
       disconnect, but it then immediately reconnects them.
    2. This command is a great way to test if drivers are following the 
       EFI 1.1 Driver Model.

Examples:
  * To reconnect all drivers from all devices:
    Shell> reconnect -r

  * To reconnect all drivers from device 28:
    fs0:\> reconnect 28

  * To reconnect driver 17 from device 28:
    fs0:\> reconnect 28 17

  * To reconnect child 32 on driver 17 from device 28:
    fs0:\> reconnect 28 17 32

unload

Unloads a protocol image.

UNLOAD [-n][-v] HandleIndex
    
    -n            - No prompt
    -v            - Verbose
    HandleIndex   - Handle of protocol to unload

Note:
    1. This command is obsolete.
    2. LOAD is opposite.

Examples:
  * To find the handle index protocol image to unload:
    Shell> dh -b
    Handle dump
      1: Image(DXE Core)
      2: FwVol FwFileSys FwVolBlk DevPath(MemMap(11:1760000-189FFC8))
         ...
     27: Image(Reset)
     28: Image(WinNtBlockIo) DriverBinding
     29: Image(Timer)
        ...
   
  * To unload the protocol image of 'Reset':
    Shell> unload 27
     27: Image(Reset)
    Unload protocol image (y/n)? n
    Exit status code: Aborted

memory

Memory commands:

default     -- Sets, Resets, or Clears default NVM values
dmpstore    -- Displays all NVRAM variables
dmem        -- Displays the contents of memory
memmap      -- Displays the memory map
mm          -- Displays or modifies MEM/IO/PCI
pdt         -- View or set page deallocation table

default

Sets NVM and Stable Store values to predefined default values.  

DEFAULT [efi|sal]
DEFAULT clear [bmc|efi|sal]

clear : clear NVM and Stable Store values
efi   : specify efi values for default
sal   : specify sal values for default 
bmc   : reinitialize token values


Note:
   1. Default without parmaters defaults sal and efi values.
   2. Default clear without parameters only clears efi and sal
      areas.  BMC must be a parameter to be cleared.
   3. ADMINs can access only a subset of values
   4. MFG can access default clear allowing the default
      set for a broader area of NVM and Stable Store.
   
Examples:
   * default efi and sal regions
     Shell> default
     default: nvm default values set
   
   * default sal region only
     Shell> default sal
     default: SAL nvm default values set 
     
   * clear efi and bmc regions 
     Shell> default clear bmc efi
     System will Reset
     0 0 0x00002F 0x0000000000000000 efi nvram test
     ...

dmpstore

Displays all the environment NVRAM variables being managed by EFI.

DMPSTORE

Examples:
Shell> dmpstore
 Dump NVRAM
 
 Variable RT+BS 'Efi:BootCurrent' DataSize = 2
   00000000: FF FF                                           *..*
 Variable NV+RT+BS 'Efi:LangCodes' DataSize = 2A
   00000000: 65 6E 67 65 6E 6D 61 6E-67 63 68 69 7A 68 6F 64 *engenmangchizhod*
   00000010: 65 75 67 65 6D 67 65 72-67 6D 68 67 6F 68 66 72 *eugemgergmhgohfr*
   00000020: 61 66 72 65 66 72 6D 66-72 6F                   *afrefrmfro*
 Variable NV+RT+BS 'Efi:Lang' DataSize = 3
   00000000: 65 6E 67                                        *eng*
  ...
 Variable NV+BS 'ShellAlias:copy' DataSize = 6
   00000000: 63 00 70 00 00 00                                *c.p...*
 Variable NV+BS 'SEnv:path' DataSize = 4
   00000000: 2E 00 00 00                                      *....*

dmem

Displays the contents of system memory or device memory.

DMEM [Address] [Size] [;MMIO]
    
    address - Starting address (hex) to display. This needs to be on an even 
              boundary for the processor that this command is run on.
    size    - NO. of bytes to display in hex.
    ;MMIO   - Memory mapped IO. It will turn on any bits required in the 
              chipset to force memory access out to the PCI bus.

Note:
    1. If no address is given the EFI, system table entry point will be 
       displayed. Also it will display all other system table pointer entries 
       as well (runtime services, boot services etc.).
    2. Address must be on a even boundary address for the processor being used.
    3. All units are in hex.

Examples:
* To display default content:
  fs0:\> dmem

  Memory Address 000000003FF7D808 200 Bytes
  3FF7D808: 49 42 49 20 53 59 53 54-02 00 01 00 78 00 00 00  *IBI SYST....x...*
  3FF7D818: 5C 3E 6A FE 00 00 00 00-88 2E 1B 3F 00 00 00 00  *\>j........?....*
  3FF7D828: 26 00 0C 00 00 00 00 00-88 D3 1A 3F 00 00 00 00  *&..........?....*
  3FF7D838: A8 CE 1A 3F 00 00 00 00-88 F2 1A 3F 00 00 00 00  *...?.......?....*
  3FF7D848: 28 EE 1A 3F 00 00 00 00-08 DD 1A 3F 00 00 00 00  *(..?.......?....*
  3FF7D858: A8 EB 1A 3F 00 00 00 00-18 C3 3F 3F 00 00 00 00  *...?..........*
  3FF7D868: 00 4B 3F 3F 00 00 00 00-06 00 00 00 00 00 00 00  *.K............*
  3FF7D878: 08 DA F7 3F 00 00 00 00-70 74 61 6C 88 00 00 00  *...?....ptal....*
  3FF7D888: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  3FF7D898: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  3FF7D8A8: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  3FF7D8B8: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  3FF7D8C8: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  3FF7D8D8: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  3FF7D8E8: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  3FF7D8F8: 00 00 00 00 00 00 00 00-70 68 06 30 88 00 00 00  *........ph.0....*
  3FF7D908: 65 76 6E 74 00 00 00 00-02 02 00 60 00 00 00 00  *evnt.......`....*
  3FF7D918: 18 6F 1A 3F 00 00 00 00-10 E0 3F 3F 00 00 00 00  *.o.?..........*
  3FF7D928: 10 00 00 00 00 00 00 00-40 C0 12 3F 00 00 00 00  *........@..?....*
  3FF7D938: 10 80 13 3F 00 00 00 00-00 00 00 00 00 00 00 00  *...?............*
  3FF7D948: 00 00 00 00 00 00 00 00-40 7D 3F 3F 00 00 00 00  *........@.....*
  3FF7D958: 50 6F 1A 3F 00 00 00 00-00 00 00 00 00 00 00 00  *Po.?............*
  3FF7D968: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  3FF7D978: 00 00 00 00 00 00 00 00-70 74 61 6C 88 00 00 00  *........ptal....*
  3FF7D988: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  3FF7D998: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  3FF7D9A8: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  3FF7D9B8: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  3FF7D9C8: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  3FF7D9D8: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  3FF7D9E8: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00  *................*
  3FF7D9F8: 00 00 00 00 00 00 00 00-70 68 06 30 A0 00 00 00  *........ph.0....*

  Valid EFI Header at Address 000000003FF7D808
  --------------------------------------------
  System: Table Structure size 00000078 revision 00010002
  ConIn (0x3F1AD388) ConOut (0x3F1AF288) StdErr (0x3F1ADD08)
  Runtime Services 0x000000003F3FC318
  Boot Services    0x000000003F3F4B00
  SAL System Table 0x000000003FF22760
  ACPI Table       0x000000003FFD9FC0
  ACPI 2.0 Table   0x00000000000E2000
  MPS Table        0x000000003FFD0000
  SMBIOS Table     0x00000000000F0020


* To display memory contents from 0x1af3088 with size of 16 bytes:    
  Shell> dmem 1af3088 16
  Memory Address 0000000001AF3088 16 Bytes
  01AF3088: 49 42 49 20 53 59 53 54-00 00 02 00 18 00 00 00 *IBI SYST........*
  01AF3098: FF 9E D7 9B 00 00                               *......*

* To display memory mapped IO contents, from 0x1af3088 with size of 16 bytes:
  Shell> dmem 1af3088 16 ;MMIO

memmap

Displays the memory map that is maintained by the EFI environment.

MEMMAP [-b] 

    -b     - Displays one screen at a time

Note:
    1. The EFI environment keeps track all the physical memory in the system
       and how it is currently being used. 
    2. Check the EFI specification to lookup the memory Type.
    3. Use the mem command output to determine where the EFI system table is
       at and where the pointers are for boot services, runtime services,  
       ACPI table Smbios table etc.

Examples:
fs0:\> memmap

Type     Start      End         # Pages      Attributes
available  0000000000750000-0000000001841FFF  00000000000010F2 0000000000000009
LoaderCode 0000000001842000-00000000018A3FFF  0000000000000062 0000000000000009
available  00000000018A4000-00000000018C1FFF  000000000000001E 0000000000000009
LoaderData 00000000018C2000-00000000018CAFFF  0000000000000009 0000000000000009
BS_code    00000000018CB000-0000000001905FFF  000000000000003B 0000000000000009
BS_data    0000000001906000-00000000019C9FFF  00000000000000C4 0000000000000009
... 
RT_data    0000000001B2B000-0000000001B2BFFF  0000000000000001 8000000000000009
BS_data    0000000001B2C000-0000000001B4FFFF  0000000000000024 0000000000000009
reserved   0000000001B50000-0000000001D4FFFF  0000000000000200 0000000000000009

  reserved  :     512 Pages (2,097,152)
  LoaderCode:      98 Pages (401,408)
  LoaderData:      32 Pages (131,072)
  BS_code   :     335 Pages (1,372,160)
  BS_data   :     267 Pages (1,093,632)
  RT_data   :      19 Pages (77,824)
  available :   4,369 Pages (17,895,424)
Total Memory: 20 MB (20,971,520) Bytes

mm

Displays or modifies MEM/IO/PCI.

MM Address [Width 1|2|4|8] [;MMIO | ;MEM | ;IO | ;PCI] [:Value] [-n]

    Address  - Start address of MMIO or MEM or IO or PCI
    ;MEM     - Memory Address (range: 0 - 0xffffffff_ffffffff)
    ;MMIO    - Memory Mapped IO Address (range: 0 - 0xffffffff_ffffffff)
    ;IO      - IO Address (range: 0 - 0xffff)
    ;PCI     - PCI Config Address (format: 0x000000ssbbddffrr)
               ss    - SEG
               bb    - bus  
               dd    - Device  
               ff    - Func  
               rr    - Register
    Width    - Size accessed in bytes
               1    - 1 byte
               2    - 2 bytes
               4    - 4 bytes
               8    - 8 bytes
    Value    - The value to write
    -n       - Non-interactive mode

Note:
    1. MEM type is default.
    2. In Interactive mode, type a hex value to modify, 'q' or '.' to exit.
    3. When MM PCI configuration space, the 'Address' should follow the format
       of PCI Config Address - 0x000000ssbbddffrr.
    4. Use PCI command to get the ;PCI address needed for a given PCI device.
       This will be displayed in the upper right hand row from the PCI command
       listed after "EFI" 0x000000ssbbddffxx.
    5. '-n' non-interactive mode for use inside of .nsh shell files so that
       mm command can be called from the .nsh file without user intervention.
    6. Not all PCI register locations are writable. PCI option will also not
       do read-modify write. Will only write the value posted.
    
Examples:
  * To display or modify memory from 0x1b07288, width=1 byte, Interactive mode:
    fs0:\> mm 1b07288
    MEM  0x0000000001B07288 : 0x6D >
    MEM  0x0000000001B07289 : 0x6D >
    MEM  0x0000000001B0728A : 0x61 > 80
    MEM  0x0000000001B0728B : 0x70 > q

    fs0:\> mm 1b07288
    MEM  0x0000000001B07288 : 0x6D >
    MEM  0x0000000001B07289 : 0x6D >
    MEM  0x0000000001B0728A : 0x80 >        *Modified
    MEM  0x0000000001B0728B : 0x70 > q
  
  * Modifies memory from 0x1b07288, width = 2 bytes, Interactive mode:
    Shell> mm 1b07288 2
    MEM  0x0000000001B07288 : 0x6D6D >
    MEM  0x0000000001B0728A : 0x7061 > 55aa 
    MEM  0x0000000001B0728C : 0x358C > q
    
    Shell> mm 1b07288 2
    MEM  0x0000000001B07288 : 0x6D6D >
    MEM  0x0000000001B0728A : 0x55AA >      *Modified
    MEM  0x0000000001B0728C : 0x358C > q
    
  * Operates with width = 4 bytes, type is IO:
    Shell> mm 80 4 ;IO
    IO  0x0000000000000080 : 0x000000FE >
    IO  0x0000000000000084 : 0x00FF5E6D > q

  * To display PCI configuration space, ss=00, bb=00, ss=00, ff=00, rr=00:
    Shell> mm 0000000000 ;PCI
    PCI  0x000000000000000 : 0x86 >
    PCI  0x000000000000001 : 0x80 >
    PCI  0x000000000000002 : 0x30 >
    PCI  0x000000000000003 : 0x11 >
    PCI  0x000000000000004 : 0x06 >
    PCI  0x000000000000005 : 0x00 > q
  * These contents can also be displayed by 'PCI 00 00 00'.
  
  * To modify memory in non-interactive mode:
    Shell> mm 80 1 ;IO :52
    Shell> mm 80 1 ;IO
    IO  0x0000000000000080 : 0x52 > FE    *Modified
    IO  0x0000000000000081 : 0xFF >
    IO  0x0000000000000082 : 0x00 >
    IO  0x0000000000000083 : 0x00 >
    IO  0x0000000000000084 : 0x6D >
    IO  0x0000000000000085 : 0x5E >
    IO  0x0000000000000086 : 0xFF >
    IO  0x0000000000000087 : 0x00 > q

pdt

View or set page deallocation table

PDT [clear]

clear  : Indicates the user wishes to clear the PDT

Note:
        1. Clearing the PDT without a reboot is not recommended and will
           result in an unstable system.

Examples:
  * To display the PDT
  fs0:\> pdt

  PDT Information for PD

                    Last Clear time for PD: PDT has not been cleared
         Number of total entries in PD PDT:                100
          Number of used entries in PD PDT:                  1
          Number of free entries in PD PDT:                 99
    Number of single-bit entries in PD PDT:                  1
     Number of multi-bit entries in PD PDT:                  0
    Address of first multi-bit error in PD: 0x0000000000000000


  Entry 1: Address: 0x00000000FEFBEE00 Type: single-bit Location: DIMM 4A

  
  * To clear the PDT
  fs0:\> pdt clear
  Are you sure you want to clear the PDT for PD? [y/N] y

shell

Shell navigation and other commands:

alias       -- Displays, creates, or deletes aliases in the EFI shell
attrib      -- Displays or changes the attributes of files or directories
cd          -- Displays or changes the current directory
cls         -- Clears the standard output with an optional background color
comp        -- Compares the contents of two files
cp          -- Copies one or more files/directories to another location
edit        -- Edits an ASCII or UNICODE file in full screen
eficompress -- Compress a file
efidecompress -- Compress a file
exit        -- Exits the EFI Shell
help        -- Displays help menus, command list, or verbose help of a command
hexedit     -- Edits with hex mode in full screen
ls          -- Displays a list of files and subdirectories in a directory
mkdir       -- Creates one or more directories
mode        -- Displays or changes the mode of the console output device
mv          -- Moves one or more files/directories to destination
rm          -- Deletes one or more files or directories
set         -- Displays, creates, changes or deletes EFI environment variables
setsize     -- Sets the size of the file
touch       -- Updates time with current time
type        -- Displays the contents of a file
xchar       -- Turn on/off extended character features

alias

Displays, creates, or deletes aliases in the EFI shell.

ALIAS [-d|-v|-b][sname][value]

    -d       - Deletes an alias
    -v       - Volatile variable
    -b       - Displays one screen at a time 
    sname    - Alias name
    value    - Original name
 
Note:
    1. 'sname' shall not be an EFI shell command or a device mapping name.
    2. 'value' shall be an EFI shell command or an EFI application.
    3. ALIAS values are stored in EFI NVRAM and will be retained between boots
       unless the option -v is specified.

Examples:
  * To display all aliases in the current EFI environment:
    Shell> alias
        dir  : ls
        md   : mkdir
        rd   : rm
        del  : rm
        copy : cp

  * To create an alias to the EFI environment:
    Shell> alias myguid guid
    Shell> alias
        dir    : ls
        md     : mkdir
        rd     : rm
        del    : rm
        copy   : cp
        myguid : guid

  * To delete an alias in the EFI environment:
    Shell> alias -d myguid
    Shell> alias
        dir    : ls
        md     : mkdir
        rd     : rm
        del    : rm
        copy   : cp

  * To add a volatile alias in current EFI environment, which has a star
  * at the line head. And this volatile alias will disappear at next boot.
    Shell> alias -v fs0 floppy
    Shell> alias
        dir  : ls
        md   : mkdir
        rd   : rm
        del  : rm
        copy : cp
      * fs0  : floppy

  * To add an alias with parameters:
    Shell> alias "dir /p" "ls -b"
    Shell> alias
        dir    : ls
        md     : mkdir
        rd     : rm
        del    : rm
        copy   : cp
        dir /p : ls -b    
    Shell> "dir /p"

attrib

Displays or changes the attributes of files or directories.

ATTRIB [+a|-a][+s|-s][+h|-h][+r|-r][-b][file...][directory...]

    +a|-a      - Sets or clears 'archive' attribute
    +s|-s      - Sets or clears 'system' attribute
    +h|-h      - Sets or clears 'hidden' attribute
    +r|-r      - Sets or clears 'read only' attribute
    -b         - Displays one screen at a time
    file       - File name (wildcards are permitted)
    directory  - Directory name (wildcards are permitted)

Examples:
  * To display the attributes of a directory:
    fs0:\> attrib fs0:\
    D     fs0:\
    
  * To add system attribute to all files of extension '.efi':
    fs0:\> attrib +s *.efi
    
  * To display attributes of all files/directories in current directory:
    fs0:\> attrib *
     AS   fs0:\serial.efi
    DA    fs0:\test1
     A HR fs0:\bios.inf
     A    fs0:\VerboseHelp.txt
     AS   fs0:\IsaBus.efi

  * To remove attributes of files, using -a,-s,-h,-r option:
    fs0:\> attrib -r *.inf
     AS    fs0:\serial.efi
    DA    fs0:\test1
     A H  fs0:\bios.inf
     A    fs0:\VerboseHelp.txt
     AS   fs0:\IsaBus.efi

cd

Displays or changes the current directory.

CD [path]
CD [..]

Note:
    1. Type CD without parameters to display the current fs and directory.
    2. Type "CD .." to change to the parent directory, and pay attention to
       the space after CD is required.
    3. CD shall be used in the same volume.

Examples:
  * To change current fs to the mapped fs0:
    Shell> fs0:

  * To change the current directory to subdirectory 'efi':
    fs0:\> cd efi

  * To change the current directory to the parent dirctory(fs0:\):
    fs0:\efi\> cd ..

  * To change the current directory to 'fs0:\efi\tools':
    fs0:\> cd efi\tools

  * To change the current directory to the root of current fs(fs0):
    fs0:\efi\tools\> cd \
    fs0:\>

  * To change volumes with cd will not work!! For example:
    fs0:\efi\tools\> cd fs1:\  !!!! will not work !!!!
    must first type fs1: then cd to desired directory

  * Moving between volumes, the current path is maintained.
    fs0:\> cd \efi\tools
    fs0:\efi\tools\> fs1:
    fs1:\> cd tmp
    fs1:\tmp> cp fs0:*.* .
    copies all of files in fs0:\efi\tools into fs1:\tmp directory

cls

Clears the standard output with an optional background color.  

CLS [color]

    color     - New background color
                0   - Black
                1   - Blue
                2   - Green
                3   - Cyan
                4   - Red
                5   - Magenta
                6   - Yellow
                7   - Light gray

Note:
    1. Type CLS without parameters to clear the standard output device, the 
       background color is not changed.
    2. If background color is out of range (0-7), black will be set as default.

Examples:
  * To clear the output but not to change the background color:
    fs0:\> cls

  * To clear the output and change the background color to Cyan:
    fs0:\> cls 3

  * To clear the output and change the background with default color(black):
    fs0:\> cls 10

  * The effect of above command line is same as:
    fs0:\> cls 0

comp

Compares the contents of two files of the same length byte for byte. 

COMP file1 file2

    file   - File name (directory name or wildcards are not permitted)

Note:
    1. COMP will exit immediately if the lengths of the compared files are
       different.
    2. COMP will exit if 10 differences encountered.

Examples:
  * To compare two files with different length:
    fs0:\> comp bios.inf legacy.inf
    Compare fs0:\bios.inf to fs0:\legacy.inf
    Difference #1: File sizes mismatch
    [difference(s) encountered]

  * To compare two files with the same contents:
    fs0:\> comp bios.inf rafter.inf
    Compare fs0:\bios.inf to fs0:\rafter.inf
    [no difference encountered]

  * To compare two files with the same length but different contents:
    fs0:\> comp bios.inf bios2.inf
    Compare fs0:\bios.inf to fs0:\bios2.inf
    Difference #1: File1: fs0:\bios.inf
     00000000: 5F                                               *_*
    File2: fs0:\bios2.inf
     00000000: 33                                               *3*
    Difference #2: File1: fs0:\bios.inf
     0000000C: 00 00 00 00                                      *....*
    File2: fs0:\bios2.inf
     0000000C: 25 32 03 03                                      *%%2..*
    [difference(s) encountered]

cp

Copies one or more files/directories to another location.

CP [-r][-q] src [src...] [dst]

     -r      - Recursive copy
     -q      - Quiet copying (replace existing files without prompt)
     src     - Source file/directory name (wildcards are permitted)
     dst     - Destination file/directory name (wildcards are not permitted)

Note:
    1. If dst is not specified, current directory is assumed to be the dst.
    2. 'CP -r src1 src2 dst' is copy all files and subdirectories in 'src1' 
       and 'src2' to the 'dst', 'src1' and 'src2' themselves are not copied.
    3. Copies a directory to itself is not allowed (eg: cp -r test* test ).
    4. If error occurs, CP will exit immediately and the remaining files or
       directories will not be copied.
    5. To remove directories please refer to RM.
    6. When 'cp' is executed within a script file, it always performs quiet
       copying regardless of whether '-q' is specified.

Examples:
  * To display the contents of current directory first of all:
    fs0:\> ls
    Directory of: fs0:\
    
      06/18/01  01:02p <DIR>            512  efi
      06/18/01  01:02p <DIR>            512  test1
      06/18/01  01:02p <DIR>            512  test2
      06/13/01  10:00a               28,739  IsaBus.efi
      06/13/01  10:00a               32,838  IsaSerial.efi
      06/18/01  08:04p                   29  temp.txt
      06/18/01  08:05p <DIR>            512  test
              3 File(s)      61,606 bytes
              4 Dir(s)

  * To copy a file in the same directory as different file name:
    fs0:\> cp temp.txt readme.txt
    copying fs0:\temp.txt -> fs0:\readme.txt
     - [ok]

  * To copy multiple files to another directory:     
    fs0:\> cp temp.txt isaBus.efi \test
    copying fs0:\temp.txt -> fs0:\test\temp.txt
     - [ok]
    copying fs0:\isaBus.efi -> fs0:\test\IsaBus.efi
     - [ok]

  * To copy multiple dirctories recursively to another directory:
    fs0:\> cp -r test1 test2 efi \test
    copying fs0:\test1\test1.txt -> fs0:\test\test1.txt
     - [ok]
    copying fs0:\test2\test2.txt -> fs0:\test\test2.txt
     - [ok]
    making dir fs0:\test\boot
    copying fs0:\efi\boot\nshell.efi -> fs0:\test\boot\nshell.efi
     - [ok]

  * To see the results of above operations:
    fs0:\> ls \test
    Directory of: fs0:\test
    
      06/18/01  01:01p <DIR>            512  .
      06/18/01  01:01p <DIR>              0  ..
      01/28/01  08:21p                   30  test1.txt
      01/28/01  08:21p                   30  test2.txt
      01/28/01  08:21p <DIR>            512  boot
      01/28/01  08:23p                   29  temp.txt
      01/28/01  08:23p               28,739  IsaBus.efi
              4 File(s)      28,828 bytes
              3 Dir(s)

edit

Edits an ASCII or UNICODE file in full screen.

EDIT [file]

    file    - Name of file to be edited

Note:
    1. If the file is not specified, NewFile.txt is edited.
    2. The size of file shall not be larger than 16 Mbytes.

Examples:
    fs0:\> edit shell.log

eficompress

Compress a file.

EFICOMPRESS infile outfile

    infile         - The file that need to be compressed
    outfile        - The output file that is compressed

efidecompress

Decompress a file.

EFIDECOMPRESS infile outfile

    infile         - The file that need to be decompressed
    outfile        - The output file that is decompressed

exit

Exits the EFI Shell environment and returns control to its parent.

EXIT

Examples:
    Shell> exit

help

Displays help menus, command list, or verbose help of a command in the EFI Shel
l.  

HELP [-a][-b]|[cmd]

    -a     - Displays list of all commands
    -b     - Displays one screen at a time
    cmd    - Shell command

Note:
    1. 'cmd -?' also displays the verbose help of cmd, the same as 'help cmd'.
    2. If cmd has no verbose help, its line help will be displayed instead.
    3. HELP will only show commands that were documented in the shell.

Examples:
* To display help menu
  Shell> help
  List of classes of commands:

  boot          -- Booting options and disk-related commands
  configuration -- Changing and retrieving system information
  device        -- Getting device, driver and handle information
  memory        -- Memory related commands
  shell         -- Basic shell navigation and customization
  scripts       -- EFI shell-script commands

  Type "help" followed by a class name for a list of commands in that class.
  Type "help" followed by command name for full documentation.

* To display help submenu
Shell> help  boot
Boot and disk commands:

  autoboot    -- View or set autoboot timeout variable
  bcfg        -- Displays/modifies the driver/boot configuration
  boottest    -- Set/View BootTest bits
  dblk        -- Displays the contents of blocks from a block device
  lanboot     -- Performs boot over lan from EFI Shell
  mount       -- Mounts a file system on a block device
  reset       -- Resets the system
  vol         -- Displays volume information of the file system

  Use 'help <command>' for full documentation of a command.
  Use 'help -a' to display list of all commands


* To display the list of all commands of EFI shell:
  Shell> help -a -b
  alias         - Displays, creates, or deletes aliases in the EFI shell
  attrib        - Displays or changes the attributes of files or directories
  autoboot      - View or set autoboot timeout variable
  baud          - Set Serial port com settings
  bcfg          - Displays/modifies the driver/boot configuration
  boottest      - Set/View BootTest bits
  break         - Executes a break point
  cd            - Displays or changes the current directory
  cls           - Clears the standard output with an optional background color
  comp          - Compares the contents of two files
  connect       - Binds an EFI driver to a device and starts the driver
  ...

* To display help information of a shell command - ls:
  Shell> help ls
  Shell> ? ls
  Shell> ls -?
  shell> ls /?

hexedit

Edits a file, block device or memory with hex mode in full screen.

HEXEDIT [[-f]FileName|[-d DiskName Offset Size]|[-m Offset Size]]

    -f     - Open file to edit
    -d     - Open disk block to edit
             DiskName - Editing disk's name (for example fs0)
             Offset   - Starting block's No. (beginning from 0)
             Size     - Number of blocks that to be edited
    -m     - Open memory region to edit
             Offset   - Starting offset of memory region (beginning from 0)
             Size     - Size of memory region that to be edited

Examples:
  * To edit a file as hex mode:
    fs0:\> hexedit test.bin
    
  * To edit disk block of fs0(floppy here)with 2 blocks:
    fs0:\> hexedit -d fs0 0 2
  
  * To edit memory of fs0 with 2 blocks:
    fs0:\> hexedit -m 0 2

ls

Displays a list of files and subdirectories in a directory. 

LS [-b] [-r] [-a[attrib]] [file]

    -b         - Displays one screen at a time
    -r         - Displays recursively (including subdirectories)
    -a         - Displays files of the attributes specified by [attrib]
    attrib     - 'a', 's', 'h', 'r', 'd' or combination of them or NULL
                  a    - Archive
                  s    - System
                  h    - Hidden
                  r    - Read-only
                  d    - Directory
    file       - Name of file/directory (wildcards are permitted)

Examples:
  * To Hide files by adding hidden or system attribute to them:
    fs0:\> attrib +sh *.efi
     ASH  fs0:\IsaBus.efi
     ASH  fs0:\IsaSerial.efi

  * To display all, except the files/directories with 'h' or 's' attribute:
    fs0:\> ls
    Directory of: fs0:\
    
      06/18/01  09:32p                  153  for.nsh
      06/18/01  01:02p <DIR>            512  efi
      06/18/01  01:02p <DIR>            512  test1
      06/18/01  01:02p <DIR>            512  test2
      06/18/01  08:04p                   29  temp.txt
      06/18/01  08:05p <DIR>            512  test
      01/28/01  08:24p       r           29  readme.txt
              3 File(s)         211 bytes
              4 Dir(s)

  * To display files with all attributes in the current directory:
    fs0:\> ls -a
    Directory of: fs0:\
    
      06/18/01  09:32p                  153  for.nsh
      06/18/01  01:02p <DIR>            512  efi
      06/18/01  01:02p <DIR>            512  test1
      06/18/01  01:02p <DIR>            512  test2
      06/18/01  10:59p               28,739  IsaBus.efi
      06/18/01  10:59p               32,838  IsaSerial.efi
      06/18/01  08:04p                   29  temp.txt
      06/18/01  08:05p <DIR>            512  test
      01/28/01  08:24p       r           29  readme.txt
              5 File(s)      61,788 bytes
              4 Dir(s)
    
  * To display files with read-only attributes in the current directory:
    fs0:\> ls  -ar
    Directory of: fs0:\
    
      06/18/01  11:14p       r           29  readme.txt
              1 File(s)          29 bytes
              0 Dir(s)

  * To display the files with attribute of 's':
    fs0:\> ls -as isabus.efi
    Directory of: fs0:\
    
      06/18/01  10:59p               28,739  IsaBus.efi
              1 File(s)      28,739 bytes
              0 Dir(s)

  * To display all in fs0:\efi directory recursively:
    fs0:\> ls -r -a efi
             
  * To search files with specified type in current directory recursively:
    fs0:\> ls -r -a  *.efi -b

mkdir

Creates one or more directories. 

MKDIR dir [dir...]

    dir     - Name of a directory to be created

Note:
    The parent directory shall already exist.
    
Examples:
  * To create a new directory:
    fs0:\> mkdir rafter

    fs0:\> ls
    Directory of: fs0:\
    
      06/18/01  08:05p <DIR>            512  test
      06/18/01  11:14p       r           29  readme.txt
      06/18/01  11:50p <DIR>            512  rafter
              1 File(s)         211 bytes
              2 Dir(s)

  * To create multiple directories:
    fs0:\> mkdir temp1 temp2   
    fs0:\> ls
    Directory of: fs0:\
    
      06/18/01  08:05p <DIR>            512  test
      06/18/01  11:14p       r           29  readme.txt
      06/18/01  11:50p <DIR>            512  rafter
      06/18/01  11:52p <DIR>            512  temp1
      06/18/01  11:52p <DIR>            512  temp2
              1 File(s)         211 bytes
              4 Dir(s)

mode

Displays or changes the mode of the console output device. 

MODE [col row]

    col     - Column number of the mode
    row     - Row number of the mode    

Note:
    1. The mode with a star at line end is the current mode setting.
    2. When console redirection is turned on, only 80x25 mode is supported in 
       current sample implementation.
    3. Most EFI command output was designed with 80x50 mode in mind (50 rows).

Examples:
  * To display available mode on standard output:
    Shell> mode
    Available modes on standard output
      col  80 row  25  *
      col  80 row  50
      col  80 row  43
      col 100 row 100
      col 100 row 999

  * To change the current mode setting:
    Shell> mode 80 50
    Available modes on standard output
      col  80 row  25
      col  80 row  50  *
      col  80 row  43
      col 100 row 100
      col 100 row 999

mv

Moves one or more files/directories to destination within fs. 

MV src [src...] [dst]

    src     - Source file/directory name (wildcards are permitted)
    dst     - Destination file/directory name (wildcards are not permitted)

Note:
    1. If 'dst' is not specified, current directory is assumed to be the 'dst'.
    2. The attempt to move a read-only file/directory will result a failure.

Examples:
  * To rename a file:
    fs0:\> mv IsaBus.efi Bus.efi
    moving fs0:\IsaBus.efi -> \Bus.efi
     - [ok]
     
  * To move a directory to current directory:   
    fs0:\> mkdir test1\temp
    fs0:\> mv test1\temp
    moving fs0:\test1\temp -> \.\temp
     - [ok]
     
  * To rename a directory:   
    fs0:\> mv efi efi1.1
    moving fs0:\efi -> \efi1.1
     - [ok]

  * To move multiple directories at a time:
    fs0:\> mv test1 test2 test
    moving fs0:\test1 -> \test\test1
     - [ok]
    moving fs0:\test2 -> \test\test2
     - [ok]

  * To Move a read-only directory will result a failure:
    fs0:\test> attrib +r temp1
    DA  R fs0:\test\temp1
    fs0:\test> mv temp1 temp2
    moving fs0:\test\temp1 -> \test\temp2
     - error - Invalid Parameter

rm

Deletes one or more files or directories.

RM [-q] file [file ...] 
RM [-q] directory [directory ...]

    -q           - Quiet mode, doesn't prompt user for a confirmation
    file         - File name (wildcards are permitted)
    directory    - Directory name (wildcards are permitted)

Note:
    1. To remove a read-only file/directory will result failure.
    2. If error occurs, RM will exit immediately and later files/directories
       will not be removed.
    
Examples:
  * To remove multiple directories at a time:
    fs0:\> ls test
    Directory of: fs0:\test
    
      06/18/01  01:01p <DIR>            512  .
      06/18/01  01:01p <DIR>              0  ..
      06/19/01  12:59a <DIR>            512  temp1
      06/19/01  12:59a <DIR>            512  temp2
              0 File(s)           0 bytes
              4 Dir(s)
        
  * Error occurs and RM will exit:
    fs0:\> rm test\temp11 temp2
    rm: Cannot find 'fs0:\test\temp11' - Not Found   

  * To remove multiple directories with wildcards:
    fs0:\> rm test\temp*
    rm: Remove subtree 'fs0:\test\temp1' [y/n]? y
    removing fs0:\test\temp1\temp1.txt
     - [ok]
    removing fs0:\test\temp1\boot\nshell.efi
     - [ok]
    removing fs0:\test\temp1\boot
     - [ok]
    removing fs0:\test\temp1
     - [ok]
    rm: Remove subtree 'fs0:\test\temp2' [y/n]? y
    removing fs0:\test\temp2\temp2.txt
     - [ok]
    removing fs0:\test\temp2
     - [ok]

  * To remove a directory that contains a read-only file will fail:
    fs0:\> attrib +r test\temp1\readme.txt
     A  R fs0:\test\temp1\readme.txt
     
    fs0:\> rm test\temp1
    rm: Cannot open 'readme.txt' under 'fs0:\test\temp1' in writable mode
    - Access denied

set

Displays, creates, changes or deletes EFI environment variables.

SET [-d|-v|-b] [sname [value]]

    -d     - Deletes the environment variable
    -v     - Volatile variable
    -b     - Displays one screen at a time 
    sname  - Environment variable name
    value  - Environment variable value

Note:
    1. See dmpstore command to see all of NVRAM variables used by the shell.
    2. Size of NVRAM for set command will depend on system implementation.
    3. May send NVRAM variables to /efi/boot/bootstr.nvr on files system if
       no NVRAM is implemented in the core EFI routines.
    4. SET values are stored in EFI NVRAM and will be retained between boots
       unless the option -v is specified.

Examples:
  * To add an environment variable:
    Shell> set DiagnosticPath fs0:\efi\diag;fs1:\efi\diag

  * To Display environment variables:
    Shell> set
        path           : .
        diagnosticPath : fs0:\efi1.1\diag;fs1:\efi1.1\diag

  * To delete an environment variable:
    Shell> set -d diagnosticpath
    Shell> set
        path           : .

  * To changes an environment variable:
    fs0:\> set src efi
    fs0:\> set
        path : .;fs0:\efi\tools;fs0:\efi\boot;fs0:\
        src  : efi
    fs0:\> set src efi1.1
    fs0:\> set
        path : .;fs0:\efi\tools;fs0:\efi\boot;fs0:\
        src  : efi1.1

  * To append an environment variable:
    Shell> set
        path           : .
    Shell> set path %%path%%;fs0:\efi\tools;fs0:\efi\boot;fs0:\
    Shell> set
        path           : .;fs0:\efi\tools;fs0:\efi\boot;fs0:\
  
  * To set a volatile variable which will be disappear at next boot:
    Shell> set -v EFI_SOURCE c:\project\EFI1.1
    Shell> set
        path       : .;fs0:\efi\tools;fs0:\efi\boot;fs0:\
      * EFI_SOURCE : c:\project\EFI1.1

setsize

Sets the size of the file specified by file name to specified bytes.

SETSIZE newsize file

    newsize  - The new size of the file in bytes
    file     - The file to be resized(supports asterisk wildcard)

Note:
    1. To set file size smaller will truncate the tail of file.
    2. To set file size larger will not pad the back part.
    3. The size of an Unicode file shall be an even number.

Examples:
  * Set the size of a file:
    Shell> setsize 100 fs0:\a.txt
    setsize: fs0:\a.txt 100

  * Set the sizes of multiple files:  
    Shell> setsize 100 fs0:\*.txt
    setsize: fs0:\a.txt 100
    setsize: fs0:\b.txt 100
    setsize: fs0:\c.txt 100

touch

Updates time with current time.

TOUCH [-r] file

    -r    - Recursive to subdirectories

Examples:
  * To touch a file, the time of file will be changed after TOUCH:
    fs0:\> ls for.nsh
    Directory of: fs0:\
      06/18/01  09:32p                  153  for.nsh
              1 File(s)         153 bytes
              0 Dir(s)
    
    fs0:\> touch for.nsh
    touch: fs0:\for.nsh [ok]

    fs0:\> ls for.nsh
    Directory of: fs0:\
      06/19/01  09:54a                  153  for.nsh
              1 File(s)         153 bytes
              0 Dir(s)

  * To touch a directory recursively:  
    fs0:\> touch -r efi1.1
    touch: fs0:\efi1.1 [ok]
    touch: fs0:\efi1.1\boot [ok]
    touch: fs0:\efi1.1\boot\nshell.efi [ok]

type

Displays the contents of a file on the standard output device.

TYPE [-a|-u] [-b] file [file...] 

    -a     - Displays the file as ASCII characters
    -u     - Displays the file as Unicode characters   
    -b     - Displays one screen at a time
    file   - Name of file to display

Examples:

  * To display the file as Unicode characters:
    fs0:\> type -u pause.nsh
    File: fs0:\pause.nsh, Size 204
    #
    #  Example script for 'pause' command
    #
    echo pause.nsh begin..
    date
    time
    pause
    echo pause.nsh done.

  * To display the file as ASCII characters:
    fs0:\> type -a pause.nsh
    File: fs0:\pause.nsh, Size 204
     #
     #     E x a m p l e   s c r i p t   f o r   ' p a u s e '   c o m m a n d
     #
     e c h o   p a u s e . n s h   b e g i n . .
     d a t e
     t i m e
     p a u s e
     e c h o   p a u s e . n s h   d o n e .    

  * To type multiple files at a time:
    fs0:\> type test.*
    File: fs0:\test.txt, Size 23
            How to Install?
    File: fs0:\test.nsh, Size 48
    time
    stall 3000000
    time

xchar

Turn on/off extended character features

XCHAR on|off
   
on  : Enables extended character features of the console
off : Disable extended character features of the console

scripts

Shell script commands/programming constructs:

echo        -- Displays messages or turns command echoing on or off
for/endfor  -- Executes commands for each item in a set of items
goto        -- Makes batch file execution jump to another location
if/endif    -- Executes commands in specified conditions
pause       -- Prints a message and suspends for keyboard input
stall       -- Stalls the processor for some microseconds

echo

Displays a message, or turns command echoing on or off in batch files.

ECHO [-on|-off]
ECHO [message] 

    -on          - Displays when reading command lines from batch files
    -off         - Doesn't display when reading batch command lines
    message      - Displays a message string

Note:
    1. Echo -off means not to display command line when reading from batch
       files. It's not like MS-DOS echo.
    2. Echo without a parameter is showing current echo setting.

Examples:
  * To display a message string of 'Hello World':
    fs0:\> echo Hello World
    Hello World

  * To turns command echoing off:
    fs0:\> echo -off

  * To displays current echo setting:
    fs0:\> echo
    Echo is off

  * To execute a batch file named as HelloWorld.nsh:  
    fs0:\> HelloWorld.nsh
    Hello World

  * To turns command echoing on,
    fs0:\> echo -on

  * To execute HelloWorld.nsh, display when reading lines from batch file:
    fs0:\> HelloWorld.nsh
    +HelloWorld.nsh> echo Hello World
    Hello World

for

Executes one or more commands for each item in a set of items. 

FOR %%indexvar IN set
    command [arguments]
    [command [arguments]]
     ...
ENDFOR

    %%indexvar            - The variable to index a set
    set                  - The set to be searched
    command [arguments]  - The command to be executed with optional arguments

Note:
    1. Be available only in batch script files.
    2. FOR shall be matched with ENDFOR.
    3. The index variable name must be a single letter.

Examples:
    #
    #  Sample for loop type contents of all *.txt files
    #
    for %%a in *.txt 
       type %%a%%
       echo ===== %%a%% done =====
    endfor

goto

Makes batch file execution jump to another location.

GOTO label

    label      - Specifies a location in batch file

Note:
    1. Only available in batch script files.
    2. Execution of batch file will jump to the next line of the label.
    3. GOTO can't jump from outside into a FOR cycle block.

Examples:
    #
    #  Example script for "goto" command
    #
    goto Done
    ...
    :Done
    cleanup.nsh

if

Executes one or more commands in specified conditions.

IF [NOT] EXIST file THEN
    command [arguments]
[ELSE
    command [arguments]]
ENDIF

IF [NOT] string1 == string2 THEN 
    command [arguments]
    [command [arguments]]
    ...
[ELSE
    command [arguments]
    [command [arguments]]
    ...]
ENDIF

    EXIST file            - TRUE if file exists in the directory
    string1 == string2    - TRUE if the two stings are same

Note:
    1. Only available in batch script files.
    2. If condition is TRUE, commands will execute.
    3. If condition is FALSE but keyword 'NOT' is prefixed, commands will
       also execute.
    
Examples:
    #
    #  Example script for "if" command
    #
    if exist fs0:\myscript.nsh then
    myscript myarg1 myarg2
    endif
    if %%myvar%% == runboth then
    myscript1
    myscript2
    endif

pause

Prints a message and suspends for keyboard input.
    
PAUSE

Note:
    1. Only available in batch script files.
    2. The prompt message is "Enter 'q' to quit, any other key to continue".

Examples:

  * Following script is a sample of 'pause' command:
    fs0:\> type pause.nsh
    File: fs0:\pause.nsh, Size 204
    #
    #  Example script for 'pause' command
    #
    echo pause.nsh begin..
    date
    time
    pause
    echo pause.nsh done.

  * To execute the script with echo on:    
    fs0:\> pause.nsh
    +pause.nsh> echo pause.nsh begin..
    pause.nsh begin..
    +pause.nsh> date
    06/19/2001
    +pause.nsh> time
    00:51:45
    +pause.nsh> pause
    Enter 'q' to quit, any other key to continue:
    +pause.nsh> echo pause.nsh done.
    pause.nsh done.

  * To execute the script with echo off:
    fs0:\> echo -off
    fs0:\> pause.nsh
    pause.nsh begin..
    06/19/2001
    00:52:50
    Enter 'q' to quit, any other key to continue: q
    fs0:\>

stall

Stalls the processor for the number of microseconds specified.

STALL microseconds

    microseconds    - Microseconds to stall

Note:
    1. To STALL in emulation NT environment will sleep for 'microseconds'.
    2. To STALL in some other platforms will wait for 'microseconds'.
    3. Microseconds is in decimal.

Examples:
    Shell> stall 1000000
    Stall for 1000000 uS