1 /****************************************************************************
3 * Copyright (c) 2014 - 2016 Samsung Electronics Co., Ltd. All rights reserved
5 ****************************************************************************/
7 #ifndef __MX_DBG_SAMPLER_H__
8 #define __MX_DBG_SAMPLER_H__
12 * Debug Sampler DRAM Buffer descriptor.
14 * Initialised by Debug Sampler Driver on AP and passed by
15 * reference to Debug Sampler (Proxy) on R4 (by reference in
18 * Integer fields are LittleEndian.
20 struct debug_sampler_buffer_info
{
22 * Offset of circular octet buffer w.r.t. shared dram start
27 * Circular buffer length (octets, 2^n)
29 * Default = 32KiB default
34 * Offset of 32bit write index (not wrapped, counts octets) w.r.t. shared dram start
36 uint32_t write_index_offset
;
39 * To AP interrupt number (0 – 15)
44 struct debug_sampler_sample_spec
{
46 * -relative address of Location to sample (usually a register)
48 * Default = 0x00000000
53 * Number of significant octets (1,2 or 4) to log (lsbytes from source)
62 * 0 means as fast as possible (powers of 2 only)
66 uint32_t period_usecs
;
71 * Debug Sampler Config Structure.
73 * This structure is allocated and initialised by the Debug Sampler driver
74 * on the AP and passed via the service_start message.
76 struct debug_sampler_config
{
78 * Config Structure Version (= DBGSAMPLER_CONFIG_VERSION)
80 * Set by driver, checked by service.
85 * To-host circular buffer desciptor.
87 struct debug_sampler_buffer_info buffer_info
;
90 * Init/default sampling specification.
92 * (There is also an API on R4 to allow dynamic specification
93 * change - e.g. by WLAN service)
95 struct debug_sampler_sample_spec sample_spec
;
98 * Start/stop sampling when service is started/stopped?
100 * (There is also an API on R4 to allow dynamic start/stop
101 * - e.g. by WLAN service)
108 struct debug_sampler_align
{
110 struct debug_sampler_config config
__aligned(4);
114 void *mem
__aligned(64);
119 #endif /* __MX_DBG_SAMPLER_H__ */