You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
zephyr/shell: document all missing shell commands in shell.md
Add entries for 21 commands not previously covered:
Status commands:
pipeline_status, module_status, core_status, core_on, core_off,
sram_status, clock_status
MMU/TLB debug commands:
mmu_status, tlb_dump, tlb_lookup (MTL/ARL TLB MMIO)
rasid, page_info (PTL Xtensa MMU)
llext commands:
llext_load, llext_list, llext_purge
IPC4 pipeline construction commands:
ppl_create, ppl_delete, ppl_state,
mod_init, mod_delete, mod_bind, mod_unbind
Also:
- Expand the Enabling Shell Commands section with all Kconfig guards.
- Update Task 1 ipc_stats note to reflect dedicated g_ipc_stats_lock
(replacing ipc->lock which caused IPC timeout on MTL).
- Add four new task-level sections at the end of the file for the
above command groups.
-**Description**: Reports HPSRAM heap allocated, free, and peak-allocated bytes.
85
+
-**Usage**: `sof sram_status`
86
+
-**Dependency**: Requires `CONFIG_SOF_SHELL_SRAM_STATUS=y` and `CONFIG_SYS_HEAP_RUNTIME_STATS=y`.
87
+
88
+
### 14. `sof clock_status`
89
+
-**Description**: Prints the current CPU clock frequency for each DSP core.
90
+
-**Usage**: `sof clock_status`
91
+
-**Output**: `clock freq_hz freq_mhz` per core.
92
+
-**Dependency**: Requires `CONFIG_SOF_SHELL_CLOCK_STATUS=y` and `!CONFIG_SOF_ZEPHYR_NO_SOF_CLOCK`.
93
+
94
+
### 15. `sof mmu_status`
95
+
-**Description**: Prints Intel ADSP MTL TLB / virtual memory status including VM base, page count, mapped/free pages, TLB MMIO base, and the `sys_mm_drv` mapped memory region list.
-**Description**: Decodes the Xtensa RASID hardware register showing the ring→ASID mapping.
112
+
-**Usage**: `sof rasid`
113
+
-**Output**: Raw RASID value plus per-ring (kernel/unused/user/shared) ASID byte.
114
+
-**Dependency**: Requires `CONFIG_XTENSA_MMU=y`.
115
+
116
+
### 19. `sof page_info`
117
+
-**Description**: Probes the Xtensa DTLB for a page or address range and reports physical address, ring, ASID, cache mode (WB/WT/uncached/illegal) and RWX permissions.
118
+
-**Usage**: `sof page_info <vaddr> [end_vaddr]`
119
+
-**Dependency**: Requires `CONFIG_XTENSA_MMU=y`.
120
+
121
+
### 20. `sof llext_load`
122
+
-**Description**: Initiates an interactive llext module load from the host via the ADSP debug-window DMA slot. Sets up the handshake then waits (up to 120 s) for the host to DMA the `.ri` file.
-**Dependency**: Requires `CONFIG_SOF_SHELL_LLEXT_LOAD=y` and `CONFIG_LIBRARY_MANAGER=y`.
126
+
127
+
### 21. `sof llext_list`
128
+
-**Description**: Lists all llext libraries currently held in IMR/DRAM. For each library shows base address, storage size, number of module files, and per-file DRAM/SRAM mapping state, use count and dependency count.
129
+
-**Usage**: `sof llext_list`
130
+
-**Dependency**: Requires `CONFIG_SOF_SHELL_LLEXT_LIST=y` and `CONFIG_LIBRARY_MANAGER=y`.
131
+
132
+
### 22. `sof llext_purge`
133
+
-**Description**: Removes a loadable llext library from IMR/DRAM and frees its memory. Fails with `-EBUSY` if any module file is still mapped in SRAM.
134
+
-**Usage**: `sof llext_purge <lib_id>`
135
+
-**Dependency**: Requires `CONFIG_SOF_SHELL_LLEXT_PURGE=y` and `CONFIG_LIBRARY_MANAGER=y`.
136
+
137
+
### 23. `sof ppl_create`
138
+
-**Description**: Creates a new IPC4 pipeline instance. Intended for bring-up and debug use only.
-**Description**: Instantiates a module into a pipeline. Module ID can be given as a decimal/hex number or as the 8-char manifest name. No init-data blob is sent; only modules with a working zero-parameter default config will succeed.
These commands manage loadable extension (llext) firmware libraries.
614
+
615
+
| Command | Kconfig | Description |
616
+
|---|---|---|
617
+
|`sof llext_load <name> [lib_id]`|`SOF_SHELL_LLEXT_LOAD`| Interactive DMA-based load from host. Signals the host via a debug-window slot then waits up to 120 s. |
618
+
|`sof llext_list`|`SOF_SHELL_LLEXT_LIST`| List all libraries in IMR/DRAM with DRAM/SRAM mapping state, use count and dependency count. |
619
+
|`sof llext_purge <lib_id>`|`SOF_SHELL_LLEXT_PURGE`| Free a library from IMR/DRAM. Fails with `-EBUSY` if any module is still mapped. |
620
+
621
+
All three require `CONFIG_LIBRARY_MANAGER=y`.
622
+
623
+
### Host-side usage for `llext_load`
624
+
625
+
```sh
626
+
# Build and sign your library, then:
627
+
dd if=my_module.ri \
628
+
of=/sys/kernel/debug/sof/llext_load \
629
+
bs=$(stat -c%s my_module.ri) count=1
630
+
```
631
+
632
+
The firmware prints the result (bytes transferred or error code) on the shell
0 commit comments