Skip to content

Commit 5346bfb

Browse files
lrgirdwoclaude
authored andcommitted
docs: debug_stream: describe the kernel and user parts
Add a "Runs in:" banner to the debug stream README: the text message clients can run in user threads and use the slot system call, and the slot, the thread info client and the exception dump hook are in src/kernel/debug/debug_stream. debug_stream was the last directory without a banner, so drop the note about such directories from the user-space README. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
1 parent 21e12bc commit 5346bfb

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

‎src/debug/debug_stream/README.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# SOF Debug Stream
22

3+
> **Runs in:** Boundary / bridge — the debug stream clients here (`ds_msg()` and `ds_vamsg()`
4+
> in `debug_stream_text_msg.c`) can run in user threads and send their records through the
5+
> `debug_stream_slot_send_record()` syscall. The kernel parts are in
6+
> `src/kernel/debug/debug_stream`: the debug window slot with both halves of the syscall
7+
> (`debug_stream_slot.c`), the thread info client (`debug_stream_thread_info.c`) and the
8+
> exception dump hook with `assert_print()` (`debug_stream_text_msg-kernel.c`). See
9+
> [User/kernel split](../../include/sof/userspace/README.md).
10+
311
The `debug_stream` framework is an abstract logging and live-data streaming mechanism allowing the DSP to asynchronously push structured or freeform diagnostic records immediately out to the host.
412

513
## Feature Overview

‎src/include/sof/userspace/README.md‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,11 @@ its subdirectories span all tiers.
7575
| Tier | Meaning | Directories |
7676
|------|---------|-------------|
7777
| **Kernel-only** | OS integration, HAL, boot, inter-core. Never executes in a user thread. Must not be reached directly from user code — only via a syscall. | `kernel/` (see [its README](../../../kernel/README.md)) |
78-
| **Boundary / bridge** | Owns the syscalls and the thread / memory-domain setup. Split internally: some translation units run kernel-side, some user-side (e.g. `handler-kernel.c` vs `handler-user.c`). | `schedule/`, `ipc/`, `debug/debug_stream/` *, and (in the Zephyr integration tree) `zephyr/syscall/` |
78+
| **Boundary / bridge** | Owns the syscalls and the thread / memory-domain setup. Split internally: some translation units run kernel-side, some user-side (e.g. `handler-kernel.c` vs `handler-user.c`). | `schedule/`, `ipc/`, `debug/debug_stream/`, and (in the Zephyr integration tree) `zephyr/syscall/` |
7979
| **Application** | Audio pipeline / component logic that runs in user threads under userspace configs. | `audio/` |
8080
| **Shared library** | Context-agnostic code linked into whichever context calls it. Must stay "user-safe": no privileged operations (no direct MMIO, no spinlocks held across syscalls, no raw kernel object access) so it is safe when pulled into a user build. | `math/`, `module/` |
8181
| **Mixed** | A directory whose files span more than one tier; see its own README for per-file classification. | `lib/` |
8282

83-
Directories marked * do not yet have a "Runs in:" README banner.
84-
8583
Kernel-only code lives under `src/kernel/`, which Zephyr builds into a library of its own,
8684
`sof_kernel`, instead of `modules_sof`. Source files that mix kernel and user code are split,
8785
and their kernel halves moved there, separately.

0 commit comments

Comments
 (0)