Displays or modifies MEM/MMIO/IO/PCI/PCIE address space.
MM Address [Value] [-w 1|2|4|8] [-MEM | -MMIO | -IO | -PCI | -PCIE] [-n]
Address - Starting address
Value - The value to write
-MEM - Memory Address type
-MMIO - Memory Mapped IO Address type
-IO - IO Address type
-PCI - PCI Configuration Space Address type:
Address format: 0x000000ssbbddffrr
ss - Segment
bb - Bus
dd - Device
ff - Function
rr - Register
-PCIE - PCIE Configuration Space Address type:
Address format: 0x00000ssbbddffrrr
ss - Segment
bb - Bus
dd - Device
ff - Function
rrr - Register
-w - Unit size accessed in bytes:
1 - 1 byte
2 - 2 bytes
4 - 4 bytes
8 - 8 bytes
-n - Non-interactive mode
Note:
1. If the address type parameter is not specified, address type defaults
to the 'MEM' type.
2. If the 'Value' parameter is specified, the '-n' option will be used
automatically. In this case, this command will write the value to the
specified address in non-interactive mode. If the 'Value' parameter is
not specified, only the current contents in the address are displayed.
3. If the '-w' option is not specified, unit size defaults to 1 byte.
4. If the PCI address type is specified, the 'Address' parameter should
follow the PCI Configuration Space Address format above. The 'PCI'
command can be used to determine the address for a specified device.
It is listed in the PCI configuration space dump information, in the
following format: "[EFI 0x000000ssbbddffxx]".
5. If the PCIE address type is specified, the 'Address' parameter should
follow the PCIE Configuration Space Address format above.
6. In interactive mode, type a hex value to modify, 'q' or '.' to exit.
If the '-n' option is specified, it will run in non-interactive mode
which supports batch file operation without user intervention.
7. Not all PCI configuration register locations are writable.
8. MM will only write the specified value. Read-modify-write operations
are not supported.
9. The 'Address' parameter should be aligned on a boundary of the
specified width.
10. Not all addresses are safe to access. Access to any improper address
can bring unexpected results.
Examples:
* To display or modify memory:
Address 0x1b07288, default width=1 byte:
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
* To modify memory:
Address 0x1b07288, width = 2 bytes:
Shell> mm 1b07288 -w 2
MEM 0x0000000001B07288 : 0x6D6D >
MEM 0x0000000001B0728A : 0x7061 > 55aa
MEM 0x0000000001B0728C : 0x358C > q
Shell> mm 1b07288 -w 2
MEM 0x0000000001B07288 : 0x6D6D >
MEM 0x0000000001B0728A : 0x55AA > *Modified
MEM 0x0000000001B0728C : 0x358C > q
* To display IO space:
Address 80h, width = 4 bytes:
Shell> mm 80 -w 4 -IO
IO 0x0000000000000080 : 0x000000FE >
IO 0x0000000000000084 : 0x00FF5E6D > q
* To modify IO space using non-interactive mode:
Shell> mm 80 52 -w 1 -IO
Shell> mm 80 -w 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
* To display PCI configuration space, ss=00, bb=00, dd=00, ff=00, rr=00:
Shell> mm 0000000000 -PCI
PCI 0x0000000000000000 : 0x86 >
PCI 0x0000000000000001 : 0x80 >
PCI 0x0000000000000002 : 0x30 >
PCI 0x0000000000000003 : 0x11 >
PCI 0x0000000000000004 : 0x06 >
PCI 0x0000000000000005 : 0x00 > q
* These contents can also be displayed by 'PCI 00 00 00'.
* To display PCIE configuration space, ss=00, bb=06, dd=00, ff=00, rrr=000:
Shell> mm 00060000000 -PCIE
PCIE 0x0000000060000000 : 0xAB >
PCIE 0x0000000060000001 : 0x11 >
PCIE 0x0000000060000002 : 0x61 >
PCIE 0x0000000060000003 : 0x43 >
PCIE 0x0000000060000004 : 0x00 > q