Skip to content

Commit fb2a323

Browse files
committed
soc: intel_adsp: tools: cavstool.py: Look up the shell slot by type
Instead of using hardwired index for the shell debug slot, look it up by it's type. Signed-off-by: Peter Ujfalusi <[email protected]>
1 parent c5c7e1e commit fb2a323

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

soc/intel/intel_adsp/tools/cavstool.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737

3838
DEBUG_SLOT_SIZE = 4096
3939
DEBUG_SLOT_SHELL = 0
40+
DEBUG_SLOT_SHELL_TYPE = 0x73686c6c
4041
SHELL_RX_SIZE = 256
4142
SHELL_MAX_VALID_SLOT_SIZE = 16777216
4243

@@ -769,7 +770,7 @@ def debug_slot_offset_by_type(the_type, timeout_s=0.2):
769770
return None
770771

771772
def shell_base_offset():
772-
return debug_offset() + DEBUG_SLOT_SIZE * (1 + DEBUG_SLOT_SHELL)
773+
return debug_slot_offset_by_type(DEBUG_SLOT_SHELL_TYPE)
773774

774775
def read_from_shell_memwindow_winstream(last_seq):
775776
offset = shell_base_offset() + SHELL_RX_SIZE

0 commit comments

Comments
 (0)