MIPS: pbl: add nmon MIPS nano-monitor
nmon is a tiny monitor (<1200 bytes) program
for the MIPS processors.
It can operate with NO working RAM at all!
It uses only the processor registers and NS16550-compatible
UART port for operation, so it can be used for a memory
controller setup code debugging.

With no changes nmon should work on different MIPS
processors as it uses only common MIPS-I instructions.

nmon is inspired by mmon, MIPS VR4300 Mini-monitor.

mmon is copyrighted 1996, 2003 by Eric Smith.
Also Alexander Voropay must be noted for his work
on qemu & YAMON mmon adaptations made in 2006 and 2007.

See http://www.brouhaha.com/~eric/software/mmon/
for mmon details.

The mmon's features missed in nmon:

 * batch memory dumps;
 * byte and 16-bit half-words dumps and stores;
 * fill memory;
 * load S-records (this function make sense only
 if RAM works properly).

nmon has only 4 commands:
 q - quit to barebox
 d <addr> - read 32-bit word from <addr> address
 w <addr> <val> - write 32-bit word <val> to <addr>
 g <addr> - jump to <addr>

Addresses and data must be given in hexadecimal.
Everything (including hex digits 'a'..'f') must
be in lower case.

EXAMPLE: change value of word with address 0xa0000000

nmon> d a0000000
00000000
nmon> w a0000000 12345678
nmon> d a0000000
12345678
nmon>

There is no error checking of any kind. If you
give an invalid address you will probably get
an exception which will hang the board and you
will have to press the reset button.

You can interrupt current command (e.g. you have
made error in input <addr> value) by pressing
the <ESC> key.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent e6acb3f commit 15001b1f95635a25f08e3b1e2463da280a5409a3
@Antony Pavlov Antony Pavlov authored on 24 Jun 2013
Sascha Hauer committed on 25 Jun 2013
Showing 3 changed files
View
arch/mips/Kconfig
View
arch/mips/include/asm/debug_ll_ns16550.h
View
arch/mips/include/asm/pbl_nmon.h 0 → 100644