osd_cl_stm class¶
API to access the functionality of the System Trace Module (STM).
Usage¶
#include <osd/osd.h>
#include <osd/cl_stm.h>
Public Interface¶
Typedefs
-
typedef void
(* osd_cl_stm_handler_fn)
(void *, const struct osd_stm_desc *, const struct osd_stm_event *)¶
Functions
-
osd_result
osd_cl_stm_get_desc
(struct osd_hostmod_ctx * hostmod_ctx, unsigned int stm_di_addr, struct osd_stm_desc * stm_desc)¶ Populate the STM descriptor with data from the debug module
- Return
- OSD_OK on success OSD_ERROR_WRONG_MODULE if the module at stm_di_addr is not a STM any other value indicates an error
- Parameters
hostmod_ctx
: the host module handling the communicationstm_di_addr
: DI address of the STM module to get describe[out] stm_desc
: pre-allocated memory descriptor for the result
-
osd_result
osd_cl_stm_handle_event
(void * arg, struct osd_packet * pkg)¶ Event handler to process STM event, to be passed to a hostmod instance
-
bool
osd_cl_stm_is_print_event
(const struct osd_stm_event * ev)¶ Is the given STM event a sysprint event?
-
osd_result
osd_cl_stm_print_buf_new
(struct osd_cl_stm_print_buf ** print_buf_p)¶ Allocate memory for a new osd_cl_stm_print_buf struct
-
void
osd_cl_stm_print_buf_free
(struct osd_cl_stm_print_buf ** print_buf_p)¶ Free a osd_cl_stm_print_buf struct
-
osd_result
osd_cl_stm_add_to_print_buf
(const struct osd_stm_event * ev, struct osd_cl_stm_print_buf * buf, bool * should_flush)¶ Add a STM event to the print buffer
-
struct
osd_stm_desc
¶ - #include <cl_stm.h>
Information a System Trace Module
-
struct
osd_stm_event
¶ - #include <cl_stm.h>
A single event emitted by the STM module
In case of an overflow in the system an overflow even is generated, containing the number of missed events. If the overflow value is set to a non-zero value, id and value are invalid.
-
struct
osd_stm_event_handler
¶
-
struct
osd_cl_stm_print_buf
¶