boards: intel_adsp: add comments explaining log IDs start from 1

The mismatch between the slot number and the sequence ("id") made me
suspect a bug for too long. Fix one related comment and add two more. No
code change.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2021-05-19 17:26:48 -07:00 committed by Christopher Friedt
commit 2fac69422c
3 changed files with 5 additions and 3 deletions

View file

@ -28,7 +28,7 @@ import mmap
# data, followed a 16 bit "ID" number, followed by a null-terminated
# string in the final 60 bytes (or 60 non-null bytes of log data).
# The DSP firmware will write sequential IDs into the buffer starting
# from an ID of zero in the first slot, and wrapping at the end.
# from an ID of '1' in the 0th slot, and wrapping at the end.
MAP_SIZE = 8192
SLOT_SIZE = 64

View file

@ -35,6 +35,8 @@ class Loglist:
magic = read_bytes(slot[0:2])
if magic == MAGIC:
# Sequence number starting from 1, see
# soc/xtensa/intel_adsp/common/trace_out.c
id_num = read_bytes(slot[2:4])
before_first_zero = slot[4:].split(b'\x00')[0]
logstr = before_first_zero.decode(errors='replace')

View file

@ -11,8 +11,8 @@
* for communication with the host processor as a shared memory
* region. The protocol uses an array of 64-byte "slots", each of
* which is prefixed by a 16 bit magic number followed by a sequential
* ID number. The remaining bytes are a (potentially nul-terminated)
* string containing output data.
* ID number starting from 1. The remaining bytes are a (potentially
* nul-terminated) string containing output data.
*
* IMPORTANT NOTE on cache coherence: the shared memory window is in
* HP-SRAM. Each DSP core has an L1 cache that is incoherent (!) from