Simulator PPC PDF
Simulator PPC PDF
TRACE32 Directory
TRACE32 Index
Troubleshooting ...................................................................................................................... 6
FAQ ........................................................................................................................................... 6
Version 19-Oct-2020
All general commands are described in the “PowerView Command Reference” (ide_ref.pdf) and
“General Commands Reference”.
The extensive use of the TRACE32 Instruction Set Simulator requires a TRACE32 Simulator License.
1. Select the device prompt for the Simulator and reset the system.
B::
RESet
The device prompt B:: is normally already selected in the TRACE32 command line. If this is not the
case, enter B:: to set the correct device prompt. The RESet command is only necessary if you do
not start directly after booting TRACE32.
SYStem.CPU <cpu_name>
The default values of all other options are set in such a way that it should be possible to work without
modification. Please consider that this is probably not the best configuration for your target.
SYStem.Up
This command resets the CPU and enters debug mode. After this command is executed it is possible
to access memory and registers.
See the Data.LOAD command reference for a list of supported file formats. If uncertain about the
required format, try Data.LOAD.auto.
A detailed description of the Data.LOAD command and all available options is given in the reference
guide.
5. Start-up example
A typical start sequence is shown below. This sequence can be written to a PRACTICE script file
(*.cmm, ASCII format) and executed with the command DO <file>.
*) These commands open windows on the screen. The window position can be specified with the
WinPOS command.
For more information, see “API for TRACE32 Instruction Set Simulator” (simulator_api.pdf).
Troubleshooting
No information available
FAQ
Please refer to our Frequently Asked Questions page on the Lauterbach website.
P Program
D Data
IC Instruction Cache
DC Data Cache
If the cache is disabled, memory accesses to the memory classes IC or DC are realized by TRACE32-ICD
as reads and writes to physical memory.
The instruction set simulator has built-in support for all core registers. The level of support varies by register.
The first table lists all registers and their basic supported features, while the second table lists all registers
that have support beyond the basic features.
PVR Reports processor version, value may differ from actual processor
DEC (*) Decrementing, interrupt when passes through zero an MSR[EE] set.
DECAR (*) Reloaded with DECAR value (if supported by core)
TCR/TSR (*) Support for decrementer, fixed interval timer and watchdog
MAS[0..6] (*) MPC5XXX: MMU simulation limited to support mixed FLE/VLE appli-
cations
L1CSR0, L1CSR1 (*) MPC5XXX: evaluated for cache simulation (see SIM.CACHE)
L1FINV0, L1FINV1 (*)
Denied (default) Real-time memory access during program execution to target is disabled.
StopAndGo Temporarily halts the core(s) to perform the memory access. Each stop
takes some time depending on the speed of the JTAG port, the number of
the assigned cores, and the operations that should be performed.
For more information, see below.
<mode>: Down
NoDebug
Go
Up
Default: Down.
©1989-2020 Lauterbach GmbH
Simulator for PowerPC 10
Selects the target operating mode.
Down The CPU is in reset. Debug mode is not active. Default state and state after fatal
errors.
NoDebug The CPU is running. Debug mode is not active. Debug port is tristate. In this
mode the target should behave as if the debugger is not connected.
Go The CPU is running. Debug mode is active. After this command the CPU can be
stopped with the break command or if any break condition occurs.
Up The CPU is not in reset but halted. Debug mode is active. In this mode the CPU
can be started and stopped. This is the most typical way to activate debugging.
If the mode Go is selected, this mode will be entered, but the control button in the SYStem.state window
jumps to the mode Up.
Default: AUTO.
Selects the number of displayed address digits in various windows, e.g. List.auto or Data.dump.
<mode>: ACCESS
AUTO
FLE
VLE
MPC5XXX/SPC5XX only.
AUTO (default) Behavior depending on CPU selection. VLE/FLE operation for VLE/FLE-only
processors, others: see ACCESS
ACCESS Default: Standard PowerPC (FLE) instruction set. Simulator supports mixed
FLE/VLE code execution if MMU simulation is enabled.
FLE Simulator is configured to execute code compiled for the standard PowerPC
instruction set (fixed length encoding).
VLE Simulator is configured to execute code compiled for VLE (variable length
encoding).
Default: OFF.
Default: OFF.
If enabled, the interrupt mask bits of the CPU will be set during assembler single-step operations. The
interrupt routine is not executed during single-step operations. After single step the interrupt mask bits are
restored to the value before the step.
Default: OFF.
If enabled, the interrupt mask bits of the cpu will be set during HLL single-step operations. The interrupt
routine is not executed during single-step operations. After single step the interrupt mask bits are restored to
the value before the step.
NOTE: Do not enable this option for code that disables MSR_EE. The debugger will
disable MSR_EE while the CPU is running and restore it after the CPU stopped. If a
part of the application is executed that disables MSE_EE, the debugger cannot
detect this change and will restore MSE_EE.
Default: OFF.
Enables the use of space IDs for logical addresses to support multiple address spaces.
For an explanation of the TRACE32 concept of address spaces (zone spaces, MMU spaces, and machine
spaces), see “TRACE32 Glossary” (glossary.pdf).
If a debug session requires space IDs, you must observe the following
sequence of steps:
Examples:
Default: OFF
Enables the TRACE32 support for debugging virtualized systems. Virtualized systems are systems running
under the control of a hypervisor.
After loading a Hypervisor Awareness, TRACE32 is able to access the context of each guest machine. Both
currently active and currently inactive guest machines can be debugged.
• Addresses are extended with an identifier called machine ID. The machine ID clearly specifies to
which host or guest machine the address belongs.
The host machine always uses machine ID 0. Guests have a machine ID larger than 0.
TRACE32 currently supports machine IDs up to 30.
• The debugger address translation (MMU and TRANSlation command groups) can be individually
configured for each virtual machine.
Default: OFF.
ON Activates the overlay extension and extends the address scheme of the
debugger with a 16 bit virtual overlay ID. Addresses therefore have the
format <overlay_id>:<address>. This enables the debugger to handle
overlaid program memory.
WithOVS Like option ON, but also enables support for software breakpoints. This
means that TRACE32 writes software breakpoint opcodes to both, the
execution area (for active overlays) and the storage area. This way, it is
possible to set breakpoints into inactive overlays. Upon activation of the
overlay, the target’s runtime mechanisms copies the breakpoint opcodes to
the execution area. For using this option, the storage area must be readable
and writable for the debugger.
Example:
SYStem.Option OVERLAY ON
Data.List 0x2:0x11c4 ; Data.List <overlay_id>:<address>
Default: OFF.
Prevents the simulator from runnig faster than the frequency set with VCO.Frequency (default: 10MHz).
Default: ON.
This system option configures the debugger how to distinguish between user and supervisor modes.
In bare-metal applications or uncomplex operating systems typically the MSR[IS] bit is used to isolate user
from supervisor address space. There is no way to get the information about this bit within the trace
information, the program trace will be decoded using the current context of the cores.
In complex or hypervisor systems, typically the MSR[PR] bit is used to handle user and supervisor modes.
This bit will also be included in ownership trace messages. TRACE32 will therefore be able to decode the
program trace depending on this privilege information, which doesn’t have to be compliant to the current
context of cores.
a) SYStem.Option.TranslationSPACE ON (default)
Hypervisor-supervisor mode 0 0
Hypervisor-user 0 1
Guest-supervisor 1 0
Guest-user 1 1
b) SYStem.Option.TranslationSPACE OFF
Hypervisor-supervisor mode 0 0
Hypervisor-user 0 1
Guest-supervisor 1 0
Guest-user 1 1
Default: OFF.
The SYStem.Option ZoneSPACES command must be set to ON if separate symbol sets and MMU
translation tables are used for the CPU operation modes:
• Hypervisor-supervisor mode
• Hypervisor-user mode
• Guest-supervisor mode
• Guest-user mode
Within TRACE32, these CPU operation modes are referred to as zones. For information about the status
bits controlling these modes, see SYStem.Option TranslationSPACE.
NOTE: For an explanation of the TRACE32 concept of address spaces (zone spaces,
MMU spaces, and machine spaces), see “TRACE32 Glossary” (glossary.pdf).
In each CPU operation mode (zone), the CPU’s TLB may contain separate translations, and a kernel or
hypervisor may uses separate MMU translation tables for memory accesses and separate register sets.
Consequently, in each zone, different code and data can be visible on the same logical address.
OFF TRACE32 does not separate symbols by access class. Loading two or
more symbol sets with overlapping address ranges will result in
unpredictable behavior. Loaded symbols are independent of the CPU
mode.
ON Separate symbol sets can be loaded for each zone, even with
overlapping address ranges. Loaded symbols are specific to one of the
CPU zones.
SYStem.Option ZoneSPACES is usually set to ON if you need to debug virtualized systems with guest and
hypervisor. For both guest and hypervisor, TRACE32 also separates between supervisor mode and user
mode. Typical scenarios use separate symbol sets for the hypervisor-supervisor mode, the guest-supervisor
and the guest-user mode. The hypervisor-user mode is rarely used. The symbol sets are loaded to the
access classes HS: (hypervisor-supervisor mode, GS: (guest-supervisor mode) and GU: (guest-user
mode).
If SYStem.Option ZoneSPACES is ON, TRACE32 enforces any memory address specified in a TRACE32
command to have an access class which clearly indicates to which of the four zones the memory address
belongs.
If an address specified in a command uses an anonymous access class such as D:, P: or C:, the access
class of the current PC context is used to complete the access class of the addresses. Also, if an incomplete
access class where either the guest/hypervisor information is missing (such as SP: or UP:) or the
supervisor/user information is missing (such as GP: or HP:), the missing information will automatically be
expanded from the access class of the current PC context.
Example: If the CPU is currently in user mode, a memory access with the access class GP: will be
expanded by TRACE32 to become GUP:
If a symbol is referenced by name, the associated access class of its zone will be used automatically, so that
the memory access is done within the correct CPU mode context. As a result, the symbol’s effective address
will be translated to the physical address with the correct MMU translation table.
Example 1
In this script, SYStem.Option ZoneSPACES is used for a simple host and guest debugging.
SYStem.Option ZoneSPACES ON
SYStem.Option ZoneSPACES ON
; show the list of static translations created by the commands
; TRANSlation.Create and TRANSlation.COMMON
TRANSlation.List
<table>: PageTable
KernelPageTable
TaskPageTable <task_magic> | <task_id> | <task_name> | <space_id>:0x0
<cpu_specific_tables>
• If the command is called with either an address range or an explicit address, table entries will
only be displayed if their logical address matches with the given parameter.
<root> The <root> argument can be used to specify a page table base address
deviating from the default page table base address. This allows to display
a page table located anywhere in memory.
For most table types, the arguments <range> or <address> can also be
used to select the translation table of a specific process or a specific
machine if a space ID and/or a machine ID is given.
If both SYStem.Option ZoneSPACES and SYStem.Option MACHINESPACES are set to ON, then these
CPU specific tables are available:
SupervisorPT Displays the supervisor mode page table of the machine specified with
option MACHINE.
UserPT Displays the user mode page table of the machine specified with the option
MACHINE.
If only SYStem.Option ZoneSPACES is set to ON, then these CPU specific tables are available:
HSPageTable Displays the page table which is defined for the hypervisor supervisor mode.
HUPageTable Displays the page table which is defined for the hypervisor user mode.
GSPageTable Displays the page table which is defined for the guest supervisor mode.
GUPageTable Displays the page table which is defined for the guest user mode.
Defines the information needed for the page table walks, which are performed by TRACE32 for debugger
address translation, page table dumps, or page table scans.
<format>
<format> is to be replaced with a CPU architecture specific keyword which defines the structure of the MMU
page tables used by the kernel. By default, TRACE32 assumes that the MMU format is STD, unless you
specify the MMU.FORMAT <format> explicitly.
<format> Description
VXWORKS.E500_64 VxWorks specific format for PowerPC e500 core (PPC64 only)
PIKEOS.OEA PIKEOS specific format for PowerPC core (formerly named PIKEOS) */
PIKEOS.E500 PIKEOS specific format for PowerPC e500 core (formerly named
PIKEOSE5).Works for PikeOS 4.1 and older. For e500 cores with PikeOS
4.2 and newer use E500MC format.*/
PIKEOS.E500MC PIKEOS specific format for PowerPC e500mc core (PPC64 only).Can also
be used with PikeOS 4.2 and newer on PPC32 e500 cores.*/
PIKEOS.E500MC4G PIKEOS specific format for PowerPC e500mc core addressing 4GB of
memory.Has no common address range.*/
<base_address>
<base_address> defines the start address of the default page table which is usually the kernel page table.
The kernel page table contains translations for mapped address ranges owned by the kernel.
The debugger address translation uses the default page table if no process specific page table (task
page table) is available to translate an address.
<base_address> can be left empty by typing a comma or set to zero if there is no default page table
available in the system.
For the <physical_kernel_address> you just need to specify the start address.
NOTE: If no kernel translation is specified for a given memory access, TRACE32 tries to
use static address translations defined by the command TRANSlation.Create. The
kernel translation is shown in the TRANSlation.List window.
Hypervisormode Specifies the format, default page table, and default translation for one or
both hypervisor zones (access class HS: or HU:). Can be combined with
the Supervisormode or Usermode option.
Guestmode Specifies the format, default page table, and default translation for one or
both guest zones (access class GS: or GU:). Can be combined with the
Supervisormode or Usermode option.
If both SYStem.Option ZoneSPACES and SYStem.Option MACHINESPACES are set to ON, then these
options are available:
• MACHINE
• Supervisormode
• Usermode
If only SYStem.Option ZoneSPACES is set to ON, then these options are available:
• Hypervisormode
• Guestmode
• Supervisormode
• Usermode
©1989-2020 Lauterbach GmbH
Simulator for PowerPC 25
If only SYStem.Option MACHINESPACES is set to ON, then these option is available:
• MACHINE
NOTE: • The MMU format and default page table base address of each zone can be
viewed with the command TRANSlation.state.
• The default translation of each zone can be viewed with the command
TRANSlation.List
Example 1: This script shows how to define separate default page tables and separate default
translations for various zones (without Hypervisor Awareness and without machine IDs).
The backslash \ is used as a line continuation character. No white space permitted after the backslash.
; define the format for the hypervisor-supervisor zone (access class HS:)
MMU.FORMAT STD HS:0xC8000000 HS:0x80000000++0x0FFFFFFF \
A:0x00000000 /Hypervisormode /Supervisormode
; define the format for the hypervisor-user zone (access class HU:)
MMU.FORMAT STD HU:0x34000000 HU:0x30000000++0x0FFFFFFF \
A:0x00800000 /Hypervisormode /Usermode
; define the format for both the guest-supervisor zone and the guest-user
; zone of machine 2 concurrently (access class G:)
MMU.FORMAT VX653 G:0xB8000000 G:0xB0000000++0x1FFFFFFF \
A:0x40000000 /MACHINE 2
<table>: PageTable
KernelPageTable
TaskPageTable <task_magic> | <task_id> | <task_name> | <space_id>:0x0
<cpu_specific_tables>
• If called without address or range parameters, the complete table will be displayed.
• If called without a table specifier, this command shows the debugger-internal translation table.
See TRANSlation.List.
• If the command is called with either an address range or an explicit address, table entries will
only be displayed if their logical address matches with the given parameter.
<root> The <root> argument can be used to specify a page table base address
deviating from the default page table base address. This allows to display
a page table located anywhere in memory.
For most table types, the arguments <range> or <address> can also be
used to select the translation table of a specific process or a specific
machine if a space ID and/or a machine ID is given.
If both SYStem.Option ZoneSPACES and SYStem.Option MACHINESPACES are set to ON, then these
CPU specific tables are available:
SupervisorPT Displays the supervisor mode page table of the machine specified with
option MACHINE.
UserPT Displays the user mode page table of the machine specified with the option
MACHINE.
If only SYStem.Option ZoneSPACES is set to ON, then these CPU specific tables are available:
HSPageTable Displays the page table which is defined for the hypervisor supervisor mode.
HUPageTable Displays the page table which is defined for the hypervisor user mode.
GSPageTable Displays the page table which is defined for the guest supervisor mode.
GUPageTable Displays the page table which is defined for the guest user mode.
<table>: PageTable
KernelPageTable
TaskPageTable <task_magic> | <task_id> | <task_name> | <space_id>:0x0
ALL
<cpu_specific_tables>
Loads the CPU-specific MMU translation table from the CPU to the debugger-internal static translation table.
• If called without parameters, the complete page table will be loaded. The list of static address
translations can be viewed with TRANSlation.List.
• If the command is called with either an address range or an explicit address, page table entries
will only be loaded if their logical address matches with the given parameter.
Use this command to make the translation information available for the debugger even when the program
execution is running and the debugger has no access to the page tables and TLBs. This is required for the
real-time memory access. Use the command TRANSlation.ON to enable the debugger-internal MMU table.
PageTable Loads the entries of an MMU translation table and copies the address
translation into the debugger-internal static translation table.
• if <range> or <address> have a space ID and/or machine ID: loads
the translation table of the specified process and/or machine
• else, this command loads the table the CPU currently uses for
MMU translation.
TaskPageTable Loads the MMU address translation of the given process. Specify one of
<task_magic> | the TaskPageTable arguments to choose the process you want.
<task_id> | In MMU-based operating systems, each process uses its own MMU
<task_name> | translation table. This command reads the table of the specified process
<space_id>:0x0 and copies its address translation into the debugger-internal static
translation table.
• For information about the first three parameters, see “What to
know about the Task Parameters” (general_ref_t.pdf).
• See also the appropriate OS Awareness Manual.
If both SYStem.Option ZoneSPACES and SYStem.Option MACHINESPACES are set to ON, then these
CPU specific tables are available:
SupervisorPT Displays the supervisor mode page table of the machine specified with
option MACHINE.
UserPT Displays the user mode page table of the machine specified with the option
MACHINE.
If only SYStem.Option ZoneSPACES is set to ON, then these CPU specific tables are available:
HSPageTable Displays the page table which is defined for the hypervisor supervisor mode.
HUPageTable Displays the page table which is defined for the hypervisor user mode.
GSPageTable Displays the page table which is defined for the guest supervisor mode.
GUPageTable Displays the page table which is defined for the guest user mode.