soc: intel_adsp: add a debug window slot descriptor

Add a debug window slot descriptor for the debug window area in the
first page, where descriptors themselves occupy the first few
hundreds of bytes. This area begins 1024 bytes after the beginning of
the debug window until the end of the page and is therefore 3 * 1024
bytes large. Descriptor 15 will be used to describe it and it will be
used for the GDB stub.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
This commit is contained in:
Guennadi Liakhovetski 2025-06-18 10:28:28 +02:00 committed by Dan Kalowsky
parent cae5e5adc6
commit 5f4b51f9b1

View File

@ -40,12 +40,15 @@
#define ADSP_DW_PAGE_SIZE 0x1000
#define ADSP_DW_SLOT_SIZE ADSP_DW_PAGE_SIZE
#define ADSP_DW_SLOT_COUNT 15
#define ADSP_DW_DESC_COUNT (ADSP_DW_SLOT_COUNT + 1)
/* debug window slots usage, mutually exclusive options can reuse slots */
#define ADSP_DW_SLOT_NUM_SHELL 0
#define ADSP_DW_SLOT_NUM_MTRACE 0
#define ADSP_DW_SLOT_NUM_TRACE 1
#define ADSP_DW_SLOT_NUM_TELEMETRY 1
/* this uses remaining space in the first page after descriptors */
#define ADSP_DW_SLOT_NUM_GDB (ADSP_DW_DESC_COUNT - 1)
/* debug log slot types */
#define ADSP_DW_SLOT_UNUSED 0x00000000
@ -69,9 +72,9 @@ struct adsp_dw_desc {
} __packed;
struct adsp_debug_window {
struct adsp_dw_desc descs[ADSP_DW_SLOT_COUNT];
uint8_t reserved[ADSP_DW_SLOT_SIZE - ADSP_DW_SLOT_COUNT * sizeof(struct adsp_dw_desc)];
uint8_t slots[ADSP_DW_SLOT_COUNT][ADSP_DW_SLOT_SIZE];
struct adsp_dw_desc descs[ADSP_DW_DESC_COUNT];
uint8_t reserved[ADSP_DW_SLOT_SIZE - ADSP_DW_DESC_COUNT * sizeof(struct adsp_dw_desc)];
uint8_t slots[ADSP_DW_DESC_COUNT][ADSP_DW_SLOT_SIZE];
} __packed;
#define WIN2_MBASE DT_REG_ADDR(DT_PHANDLE(DT_NODELABEL(mem_window2), memory))