Changes

Jump to: navigation, search

MISC-TN-017: Persistent storage and read-write file systems

1,041 bytes added, 09:01, 18 January 2022
Example: embedded Linux system equipped with SanDisk SDINBDG4-8G-XI1 eMMC and ext4 file system
==== Testbed ====
These tests were run on the [[MITO_8M_SOM/MITO_8M_Evaluation_Kit|Evaluation Kit]] of the [[MITO_8M_SOM|Mito8M SoM]] featuring a SanDisk SDINBDG4-8G-XI1 eMMC operated with an <code>ext4</code> file system.   The kit consists of three boards: SoM, SBCX carrier board, adapter board. This setup provides off-chip trace via a parallel trace port or a PCIe interface. The SoM is equipped with the NXP i.MX8M processor based on the Quad Core Arm® Cortex-A53 CPU. The Linux kernel version used is 4.14.98. TBD
===Logging the accesses===
Below is an example of how the TRACE32-based log method can be applied to a Linux system. The solution is based on light instrumentation of the <code>mmc_start_request()</code> and <code>mmc_request_done()</code> functions defined in the Linux <code>drivers/mmc/core/core.c</code> source code file. Relevant eMMC device accesses are captured through the instrumentation code and they are written to a static data structure making them immediately traceable if data trace is available in the SoC. If data tracing is not possible, the instrumentation code writes the data to the Arm®/Cortex® Context ID register.
The solution was successfully tested on the aforementioned embedded platform.The instrumentation code is provided in Appendix 1. The zero initialization of the <code>T32_mmc</code> structure is guaranteed by Linux, since this variable is allocated in the bss section. The instrumentation is normally disabled but can be enabled by writing the value "1" into the <code>enable</code> field of the <code>T32_mmc</code> structure. The identifier of the eMMC device to be traced must be written into the <code>dev</code> field. Both of these operations can be performed from a TRACE32 script with the following commands: <pre class="workstation-terminal">Var.set T32_mmc.enable = 1Var.set T32_mmc.dev = 0x30636D6D // e.g.: "mmc0" in reverse ASCII order</pre> The <code>infoBit</code> field can be written as follows:  
==== Comparison with the software method ftrace ====
4,650
edits

Navigation menu