6.16 About debugging caches

DS-5 Debugger allows you to view contents of caches in your system. For example, L1 cache or TLB cache.

You can either view information about the caches in the Cache Data view or by using the cache list and cache print commands in the Commands view.

Figure 6-4 Cache Data view (showing L1 TLB cache)
Cache Data view (showing L1 TLB cache)


Note:

Cache awareness is dependent on the exact device and connection method.

The Cache debug mode option in the DTSL Configuration Editor dialog enables or disables the reading of cache RAMs in the Cache Data view. Selecting this option enables the reading of cache RAMs every time the target stops, if the Cache Data view is suitably configured.

Enabling the Preserve cache contents in debug state option in the DTSL Configuration Editor preserves the cache contents while the core is stopped. If this option is disabled, there is no guarantee that the cache contents will be preserved when the core is stopped.

Note:

For the most accurate results, enable the Preserve cache contents in debug state option in the DTSL Configuration Editor dialog. When this option is not enabled, the information presented might be less accurate due to debugger interactions with the target.
Figure 6-5 DTSL Configuration Editor (Cache RAMs configuration tab)
DTSL Configuration Editor (Shown with cache read option enabled)


Note:

For processors based on the ARMv8 architecture, there are restrictions on cache preservation:
  • Cache preservation is not possible when the MMU is configured to use the short descriptor translation table format.
  • When using the long descriptor translation table format, cache preservation is possible but the TLB contents cannot be preserved.

You can either enable the options prior to connecting to the target from the Debug Configurations dialog, or after connecting from the Debug Control view context menu.

Note:

On some devices, reading cache data can be very slow. To avoid issues, do not enable DTSL options that are not required. Also, if not required, close any cache views in the user interface.

You can use the Memory view to display the target memory from the perspective of the different caches present on the target. On the command line, to display or read the memory from the perspective of a cache, prefix the memory address with <cacheViewID=value>:. For the Cortex-A15 processor, possible values of cacheViewID are:

For example:

# Display memory from address 0x9000 from the perspective of the L1D cache.
x/16w N<cacheViewID=L1D>:0x9000

# Dump memory to myFile.bin, from address 0x80009000 from the perspective of the L2 cache.
dump binary memory myFile.bin S<cacheViewID=L2>:0x80009000 0x10000 

# Append to myFile.bin, memory from address 0x80009000 from the perspective of the L3 cache.
append memory myFile.bin <cacheViewID=L3>:0x80009000 0x10000 
Non-ConfidentialPDF file icon PDF versionARM DUI0446Z
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.