
GRMON3-UM
June 2019, Version 3.1.0
21
www.cobham.com/gaisler
necessary in case the application is later restarted. The run command may not have the intended effect since the
debug drivers have not been initialized during start-up.
3.4.12. Multi-processor support
In systems with more than one LEON processor, the cpu command can be used to control the state and debugging
focus of the processors. In MP systems, the processors are enumerated with 0..N-1, where N is the number of
processors. Each processor can be in two states; enabled or disabled. When enabled, a processor can be started by
LEON software or by GRMON. When disabled, the processor will remain halted regardless. One can pause a MP
operating system and disable a CPU to debug a hanged CPU for example.
Most per-CPU (DSU) debugging commands such as displaying registers, backtrace or adding breakpoints will be
directed to the active processor only. Switching active processor can be done using the 'cpu active N' command,
see example below. The Tcl
cpu
namespace exported by GRMON is also changed to point to the active CPU's
namespace, thus accessing
cpu
will be the same as accessing
cpu1
if CPU1 is the currently active CPU.
grmon3> cpu
cpu 0: enabled active
cpu 1: enabled
grmon3> cpu act 1
grmon3> cpu
cpu 0: enabled
cpu 1: enabled active
grmon3> cpu act 0
grmon3> cpu dis 1
grmon3> cpu
cpu 0: enabled active
cpu 1: disabled
grmon3> puts $cpu::fpu::f1
-1.984328031539917
grmon3> puts $cpu0::fpu::f1
-1.984328031539917
grmon3> puts $cpu1::fpu::f1
2.301796668918
NOTE: Non-MP software can still run on the first CPU unaffected of the additional CPUs since it is the target
software that is responsible for waking other CPUs. All processors are enabled by default.
Note that it is possible to debug MP systems using GDB, but the user are required to change CPU itself. GRMON
specific commands can be entered from GDB using the monitor command.
3.4.13. Stack and entry point
The stack pointer is located in %O6 (%SP) register of SPARC CPUs. GRMON sets the stack pointer before starting
the CPU with the run command. The address is auto-detected to end of main memory, however it is overridable
using the
-stack
when starting GRMON or by issuing the stack command. Thus stack pointer can be used by
software to detect end of main memory.
The entry point (EP) determines at which address the CPU start its first instruction execution. The EP defaults to
main memory start and normally overridden by the load command when loading the application. ELF-files has
support for storing entry point. The entry point can manually be set with the ep command.
In a MP systems if may be required to set EP and stack pointer individual per CPU, one can use the cpu command
in conjunction with ep and stack.
3.4.14. Memory Management Unit (MMU) support
The LEON optionally implements the reference MMU (SRMMU) described in the SPARCv8 specification. GR-
MON support viewing and changing the MMU registers through the DSU, using the mmu command. GRMON
also supports address translation by reading the MMU table from memory similar to the MMU. The walk com-
Содержание GRMON3
Страница 56: ...GRMON3 UM June 2019 Version 3 1 0 56 www cobham com gaisler...
Страница 114: ...GRMON3 UM June 2019 Version 3 1 0 114 www cobham com gaisler...
Страница 123: ...GRMON3 UM June 2019 Version 3 1 0 123 www cobham com gaisler dcache...
Страница 156: ...GRMON3 UM June 2019 Version 3 1 0 156 www cobham com gaisler SEE ALSO Section 6 13 On chip logic analyzer driver...
Страница 208: ...GRMON3 UM June 2019 Version 3 1 0 208 www cobham com gaisler SEE ALSO Section 3 5 Tcl integration...