debug: make sure debug status is sent to host at boot.

Send debug status to host at boot.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
Liam Girdwood 2018-11-07 16:55:38 +00:00
parent c5a4f121be
commit 0f3e1ee0bd
5 changed files with 26 additions and 5 deletions

View File

@ -33,6 +33,7 @@
#define __INCLUDE_DEBUG__
#include <sof/sof.h>
#include <config.h>
#include <sof/mailbox.h>
#include <sof/cpu.h>
#include <uapi/ipc/header.h>
@ -41,10 +42,14 @@
#include <stdint.h>
#include <stdlib.h>
#ifdef DEBUG_BUILD
#define DEBUG
#ifdef DEBUG
#define DEBUG_SET_FW_READY_FLAGS \
{ \
.build = 1, \
.locks = DEBUG_LOCKS, \
.locks_verbose = DEBUG_LOCKS_VERBOSE, \
}
/* dump file and line to start of mailbox or shared memory */
#define dbg() \
@ -120,6 +125,13 @@
#else
#define DEBUG_SET_FW_READY_FLAGS \
{ \
.build = 0, \
.locks = DEBUG_LOCKS, \
.locks_verbose = DEBUG_LOCKS_VERBOSE, \
}
#define dbg()
#define dbg_at(__x)
#define dbg_val(__v)

View File

@ -78,6 +78,14 @@ struct sof_ipc_fw_ready {
uint32_t hostbox_size;
struct sof_ipc_fw_version version;
/* Miscellaneous debug flags showing build/debug features enabled */
union {
uint64_t reserved;
uint64_t build:1;
uint64_t locks:1;
uint64_t locks_verbose:1;
} debug;
/* reserved for future use */
uint32_t reserved[4];
} __attribute__((packed));

View File

@ -77,7 +77,7 @@ static const struct sof_ipc_fw_ready ready
.tag = SOF_TAG,
.abi_version = SOF_ABI_VERSION,
},
/* TODO: add capabilities */
.debug = DEBUG_SET_FW_READY_FLAGS,
};
#define NUM_BYT_WINDOWS 6

View File

@ -76,7 +76,7 @@ static const struct sof_ipc_fw_ready ready
.tag = SOF_TAG,
.abi_version = SOF_ABI_VERSION,
},
/* TODO: add capabilities */
.debug = DEBUG_SET_FW_READY_FLAGS,
};
#define NUM_HSW_WINDOWS 6

View File

@ -77,6 +77,7 @@ static const struct sof_ipc_fw_ready ready
.tag = SOF_TAG,
.abi_version = SOF_ABI_VERSION,
},
.debug = DEBUG_SET_FW_READY_FLAGS,
};
#if defined(CONFIG_MEM_WND)