Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/include/sof/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@
#include <stdint.h>
#include <stdlib.h>

#if defined CONFIG_GDB_DEBUG
#define DEBUG_GDB 1
#else
#define DEBUG_GDB 0
#endif

#ifdef DEBUG_BUILD

#define DEBUG_SET_FW_READY_FLAGS \
Expand All @@ -50,6 +56,7 @@
.build = 1, \
.locks = DEBUG_LOCKS, \
.locks_verbose = DEBUG_LOCKS_VERBOSE, \
.gdb = DEBUG_GDB, \
}, \
}

Expand Down Expand Up @@ -133,6 +140,7 @@
.build = 0, \
.locks = DEBUG_LOCKS, \
.locks_verbose = DEBUG_LOCKS_VERBOSE, \
.gdb = DEBUG_GDB, \
}, \
}

Expand Down
2 changes: 0 additions & 2 deletions src/include/uapi/ipc/info.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ struct sof_ipc_fw_ready {
} bits;
} debug;

uint32_t gdb_enabled;

/* reserved for future use */
uint32_t reserved[4];
} __attribute__((packed));
Expand Down
3 changes: 2 additions & 1 deletion src/ipc/handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,8 @@ static int ipc_glb_gdb_debug(uint32_t header)
(void) header;

#ifdef CONFIG_GDB_DEBUG
/* trigger debug exception */
/* TODO: this asm should be in arch/include/debug.h with a generic */
/* name and trigger debug exception */
asm volatile("_break 0, 0");
return 0;
#else
Expand Down
5 changes: 0 additions & 5 deletions src/platform/intel/cavs/platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,6 @@ static const struct sof_ipc_fw_ready ready
.abi_version = SOF_ABI_VERSION,
},
.debug = DEBUG_SET_FW_READY_FLAGS,

#ifdef CONFIG_GDB_DEBUG
.gdb_enabled = CONFIG_GDB_DEBUG
#endif

};

#if defined(CONFIG_MEM_WND)
Expand Down