osd_cl_cdm class¶
API to access the functionality of the Core Debug Module (CDM).
Usage¶
#include <osd/osd.h>
#include <osd/cl_cdm.h>
Public Interface¶
Typedefs
-
typedef void
(* osd_cl_cdm_handler_fn)
(void *, const struct osd_cdm_desc *, const struct osd_cdm_event *)¶
Functions
-
osd_result
osd_cl_cdm_get_desc
(struct osd_hostmod_ctx * hostmod_ctx, unsigned int cdm_di_addr, struct osd_cdm_desc * cdm_desc)¶ Populate the CDM descriptor with data from the debug module
- Return
- OSD_OK on success OSD_ERROR_WRONG_MODULE if the module at cdm_di_addr is not a CDM any other value indicates an error
- Parameters
hostmod_ctx
: the host module handling the communicationcdm_di_addr
: DI address of the CDM module to get describe[out] cdm_desc
: pre-allocated memory descriptor for the result
-
osd_result
osd_cl_cdm_handle_event
(void * arg, struct osd_packet * pkg)¶ Event handler to process CDM event, to be passed to a hostmod instance
-
osd_result
cl_cdm_cpureg_read
(struct osd_hostmod_ctx * hostmod_ctx, struct osd_cdm_desc * cdm_desc, void * reg_val, uint16_t reg_addr, int flags)¶ Read data from an SPR of the CPU attached to a Core Debug Module (CDM)
- Return
- OSD_OK if the read was successful any other value indicates an error
- See
- osd_cl_cdm_cpureg_write()
- Parameters
hostmod_ctx
: the host module handling the communication[out] cdm_desc
: pre-allocated memory descriptor for the resultreg_val
: the returned read datareg_addr
: address to read fromflags
: flags. Set OSD_HOSTMOD_BLOCKING to block indefinitely until the access succeeds.
-
osd_result
cl_cdm_cpureg_write
(struct osd_hostmod_ctx * hostmod_ctx, struct osd_cdm_desc * cdm_desc, const void * reg_val, uint16_t reg_addr, int flags)¶ Write data to an SPR of the CPU attached to a Core Debug Module (CDM)
- Return
- OSD_OK if the write was successful any other value indicates an error
- See
- osd_cl_cdm_cpureg_read()
- Parameters
hostmod_ctx
: the host module handling the communication[out] cdm_desc
: pre-allocated memory descriptor for the resultreg_val
: the data to be writtenreg_addr
: address to write data toflags
: flags. Set OSD_HOSTMOD_BLOCKING to block indefinitely until the access succeeds.
-
struct
osd_cdm_desc
¶ - #include <cl_cdm.h>
Information about a Core Debug Module
-
struct
osd_cdm_event
¶ - #include <cl_cdm.h>
A single event generated by the CDM module
Public Members
-
bool
stall
¶ indicates the debugger that the CPU core is stalled.
-
bool
-
struct
osd_cdm_event_handler
¶