Project

General

Profile

Diag » History » Version 5

laforge, 12/17/2016 10:40 AM

1 4 laforge
{{>toc}}
2
3 1 laforge
h1. Diag
4
5
h2. Acronyms
6
7
|DCI|Diag Consumer Interface|
8
9 4 laforge
h2. Child Pages
10
11
{{child_pages()}}
12
13 3 laforge
h2. Kernel support
14
15 1 laforge
See [[Qualcomm_Kernel#diag]]
16
17 4 laforge
h2. Library
18 1 laforge
19 4 laforge
There is @/usr/lib/libdiag.so.1@ which is linked by virtually any Qualcomm or Quectel proprietary program running on the Linux in the Modem.
20
21
it offers the follwing symbols:
22
<pre>
23
24
4af43a7c g    DF .text»·0000014c  Base        log_submit
25
4af4d128 g    DO .data»·000001d0  Base        pools
26
4af40578 g    DF .text»·0000000c  Base        diag_vote_md_real_time
27
4af45f54 g    DF .text»·000000b0  Base        DiagSvc_Free
28
4af42f98 g    DF .text»·000000ec  Base        diag_dci_get_real_time_status_proc
29
4af45278 g    DF .text»·00000080  Base        diagpkt_subsys_get_delayed_rsp_id
30
4af456f8 g    DF .text»·000001cc  Base        diagpkt_subsys_alloc_v2
31
4af3fed4 g    DF .text»·00000450  Base        diag_read_mask_file_list
32
4af4515c g    DF .text»·00000020  Base        diagpkt_subsys_get_cmd_code
33
4af436f8 g    DF .text»·00000024  Base        Diag_LSM_Event_DeInit
34
4af3cd80 g    DF .text»·00000174  Base        diag_wakelock_init
35
4af4ecf8 g    DO .data»·000001f4  Base        mask_file2
36
4b044b30 g    DO .bss»··00000004  Base        cleanup_mask
37
4af41f54 g    DF .text»·00000160  Base        diag_register_dci_client
38
4af4eeec g    DO .data»·000001f4  Base        mask_file
39
4af444e8 g    DF .text»·000000e8  Base        msg_send_var
40
4af458c4 g    DF .text»·000000ac  Base        diagpkt_subsys_alloc_v2_delay
41
4b044b5c g    DO .bss»··00000004  Base        log_to_memory
42
4af453f4 g    DF .text»·000000b8  Base        diagpkt_alloc
43
4b025b98 g    DO .bss»··00000004  Base        db_thread_initialized
44
4af3bacc g    DF .init»·00000000  Base        _init
45
4b044a28 g    DO .bss»··00000030  Base        stop_cond
46
4af41808 g    DF .text»·00000110  Base        diag_hdlc_toggle
47
4af3cf5c g    DF .text»·000000b0  Base        diag_wakelock_acquire
48
4b044b6c g    DO .bss»··00000004  Base        parser_state
49
4b044b60 g    DO .bss»··00000004  Base        num_bytes_read
50
4af43884 g    DF .text»·00000054  Base        log_update_dci_mask
51
4af40324 g    DF .text»·00000004  Base        send_mask_modem
52
4af4f310 g    DO .data»·00000004  Base        qsr4_db_file_fd
53
4b0448c8 g    DO .bss»··00000098  Base        qsr4_db_write_buf_pool
54
4af4342c g    DF .text»·0000005c  Base        event_update_mask
55
4af3c2b0 g    DF .text»·00000014  Base        mask_sync_initialize
56
4b042e00 g    DO .bss»··00001388  Base        file_name_curr
57
4af445d0 g    DF .text»·00000264  Base        msg_sprintf
58
4af4e910 g    DO .data»·000001f4  Base        mask_file_mdm2
59
4af435a8 g    DF .text»·000000f0  Base        event_report_payload
60
4af46088 g    DF .text»·00000098  Base        DiagSvc_Malloc_Init
61
4af42190 g    DF .text»·00000194  Base        diag_release_dci_client
62
4af3ccb0 g    DF .text»·00000054  Base        update_sync_mask
63
4af3f934 g    DF .text»·0000014c  Base        diag_send_socket_data
64
4af420b4 g    DF .text»·00000094  Base        diag_register_dci_stream_proc
65
4af45e68 g    DF .text»·000000ec  Base        DiagSvc_Malloc
66
4b044a58 g    DO .bss»··00000028  Base        buffer_init
67
4af4bfd8 g    DO .rodata»·······00000004  Base        msg_mask_tbl_size
68
4b025b8c g    DO .bss»··00000004  Base        curr_write_idx
69
4af46834 g    DF .text»·00000094  Base        diag_logger_flush
70
4b044aa8 g    DO .bss»··00000028  Base        pool0_buffers
71
4af43bc8 g    DF .text»·0000000c  Base        log_set_length
72
4b044b7c g    DO .bss»··00000001  Base        hdlc_disabled
73
4af4f314 g    DO .data»·00000028  Base        fd_qsr4_xml
74
4af4d394 g    DO .data»·000001f4  Base        qsr4_xml_file_name
75
4af45c30 g    DF .text»·00000238  Base        diagpkt_LSM_process_request
76
4af40680 g    DF .text»·0000000c  Base        diag_get_real_time_status
77
4af44d70 g    DF .text»·00000100  Base        Diag_LSM_Pkt_DeInit
78
4af40864 g    DF .text»·000004f4  Base        flush_buffer
79
4af40494 g    DF .text»·00000018  Base        diag_callback_send_data
80
4b044188 g    DO .bss»··00000200  Base        dci_cumulative_event_mask
81
4b044b44 g    DO .bss»··00000004  Base        dci_transaction_id
82
4af42940 g    DF .text»·0000010c  Base        diag_get_health_stats_proc
83
4b044b10 g    DO .bss»··00000018  Base        stop_mutex
84
4af42a4c g    DF .text»·0000002c  Base        diag_get_health_stats
85
4af43a68 g    DF .text»·00000014  Base        log_free
86
4af4eb04 g    DO .data»·000001f4  Base        mask_file_mdm
87
4af452f8 g    DF .text»·00000080  Base        diagpkt_subsys_reset_delayed_rsp_id
88
4af46418 g    DF .text»·00000210  Base        diag_logger_init
89
4af3c2c4 g    DF .text»·00000040  Base        dummy_handler
90
4af3f870 g    DF .text»·000000c4  Base        diag_send_data
91
4af488ac g    DF .text»·00000234  Base        diag_kill_qshrink4_threads
92
4af41b20 g    DF .text»·0000002c  Base        ts_get_lohi
93
4af45378 g    DF .text»·0000007c  Base        diagpkt_subsys_set_rsp_cnt
94
4af482b4 g    DF .text»·00000030  Base        diag_notify_parser_thread
95
4af42c88 g    DF .text»·000000f8  Base        diag_disable_all_logs
96
4af45a2c g    DF .text»·00000204  Base        diagpkt_commit
97
4b0238e4 g    DO .bss»··00000004  Base        proc_type
98
4af42670 g    DF .text»·00000160  Base        diag_log_stream_config
99
4af43c28 g    DF .text»·00000034  Base        log_status
100
4af4415c g    DF .text»·000000a4  Base        msg_send
101
4af3e4b0 g    DF .text»·00000470  Base        WriteToDisk
102
4af43d04 g    DF .text»·00000050  Base        Diag_LSM_Log_DeInit
103
4af4f2d4 g    DO .data»·00000004  Base        fd_dev
104
4af43084 g    DF .text»·0000000c  Base        diag_dci_get_real_time_status
105
4b0449c4 g    DO .bss»··00000032  Base        qsr4_db_cmd_req_buf
106
4af45694 g    DF .text»·00000064  Base        diagpkt_subsys_alloc
107
4af3cc64 g    DF .text»·0000004c  Base        get_sync_mask
108
4af425bc g    DF .text»·000000a8  Base        diag_get_dci_support_list_proc
109
4af40584 g    DF .text»·000000fc  Base        diag_get_real_time_status_proc
110
4b044af8 g    DO .bss»··00000018  Base        qsr4_read_db_mutex
111
4b044388 g    DO .bss»··000001f4  Base        dir_name
112
4af3d210 g    DF .text»·0000005c  Base        diag_set_socket_fd
113
4af4115c g    DF .text»·0000001c  Base        diag_switch_logging_proc
114
4af45124 g    DF .text»·0000000c  Base        diagpkt_get_cmd_code
115
4af4517c g    DF .text»·00000080  Base        diagpkt_subsys_get_status
116
4b044b58 g    DO .bss»··00000004  Base        in_read
117
4af43698 g    DF .text»·00000060  Base        Diag_LSM_Event_Init
118
4b044b48 g    DO .bss»··00000004  Base        diag_dci_error_type
119
4af42d80 g    DF .text»·000000f8  Base        diag_disable_all_events
120
4b044960 g    DO .bss»··00000064  Base        pid_file
121
4b044b70 g    DO .bss»··00000004  Base        qsr4_db_parser_thread_hdl
122
4b044b68 g    DO .bss»··00000004  Base        num_dci_proc
123
4b025b84 g    DO .bss»··00000004  Base        in_wait_for_peripheral_status
124
4b044b78 g    DO .bss»··00000004  Base        write_in_progress
125
4af44d34 g    DF .text»·0000003c  Base        Diag_LSM_Pkt_Init
126
4af4d328 g    DO .data»·00000004  Base        max_file_size
127
4af41a18 g    DF .text»·00000108  Base        ts_get
128
4af42b80 g    DF .text»·00000108  Base        diag_get_event_status
129
4af43bfc g    DF .text»·00000014  Base        log_set_timestamp
130
4b044b34 g    DO .bss»··00000004  Base        curr_read
131
4af43090 g    DF .text»·000000b4  Base        diag_register_dci_signal_data
132
4af45970 g    DF .text»·00000040  Base        diagpkt_shorten
133
4b025b90 g    DO .bss»··00000004  Base        curr_read_idx
134
4b044ad0 g    DO .bss»··00000028  Base        pool1_buffers
135
4af41d38 g    DF .text»·0000021c  Base        lookup_pkt_rsp_transaction
136
4b0238f0 g    DO .bss»··00000004  Base        diag_disable_console
137
4af4d320 g    DO .data»·00000004  Base        max_file_num
138
4af42324 g    DF .text»·00000298  Base        diag_send_dci_async_req
139
4af43c10 g    DF .text»·0000000c  Base        log_get_length
140
4af45130 g    DF .text»·0000000c  Base        diagpkt_set_cmd_code
141
4af451fc g    DF .text»·0000007c  Base        diagpkt_subsys_set_status
142
4af41744 g    DF .text»·000000c4  Base        diag_peripheral_buffering_drain_immediate
143
4b044770 g    DO .bss»··00000155  Base        event_mask
144
4af439b4 g    DF .text»·000000b4  Base        log_commit
145
4af4d324 g    DO .data»·00000004  Base        min_file_size
146
4b02394c g    DO .bss»··00000004  Base        gdwClientID
147
4af44200 g    DF .text»·000000b4  Base        msg_send_ts
148
4b044b74 g    DO .bss»··00000004  Base        read_thread_hdl
149
4af3d26c g    DF .text»·0000004c  Base        valid_token
150
4af41918 g    DF .text»·0000005c  Base        add_guid_to_qshrink4_header
151
4b03e240 g    DO .bss»··00004bc0  Base        msg_mask
152
4b0238f4 g    DO .bss»··00000028  Base        file_list_size
153
4af43bd4 g    DF .text»·0000001c  Base        log_shorten
154
4af45a18 g    DF .text»·00000014  Base        diagpkt_free
155
4af4f2d8 g    DO .data»·00000008  Base        fd_socket
156
4b044b54 g    DO .bss»··00000004  Base        flush_log
157
4af482e4 g    DF .text»·000002b4  Base        create_diag_qshrink4_db_parser_thread
158
4af3fb3c g    DF .text»·00000398  Base        diag_read_mask_file
159
4af43144 g    DF .text»·000000ac  Base        diag_deregister_dci_signal_data
160
4b044b64 g    DO .bss»··00000004  Base        num_dci_clients_event
161
4af4d358 g    DO .data»·0000003c  Base        proc_name
162
4af41d10 g    DF .text»·00000028  Base        diag_lsm_dci_deinit
163
4af3d00c g    DF .text»·000000b0  Base        diag_wakelock_release
164
4b025ba0 g    DO .bss»··000186a0  Base        read_buffer
165
4af4513c g    DF .text»·00000020  Base        diagpkt_subsys_get_id
166
4b04457c g    DO .bss»··000001f4  Base        peripheral_name
167
4af411a4 g    DF .text»·0000042c  Base        Diag_LSM_Init
168
4af415d0 g    DF .text»·00000174  Base        diag_configure_peripheral_buffering_tx_mode
169
4b044b38 g    DO .bss»··00000004  Base        curr_write
170
4af404ac g    DF .text»·00000018  Base        diag_callback_send_data_hdlc
171
4af448dc g    DF .text»·000000ac  Base        qsr_msg_send_1
172
4af44988 g    DF .text»·000000b4  Base        qsr_msg_send_2
173
4b044b3c g    DO .bss»··00000004  Base        db_write_thread_hdl
174
4af44bd4 g    DF .text»·00000024  Base        Diag_LSM_Msg_Init
175
4af44a3c g    DF .text»·000000bc  Base        qsr_msg_send_3
176
4af4d2f8 g    DO .data»·00000028  Base        token_list
177
4af3d148 g    DF .text»·00000054  Base        diag_has_remote_device
178
4af3f754 g    DF .text»·0000011c  Base        diag_register_remote_callback
179
4b025b88 g    DO .bss»··00000004  Base        in_write
180
4b02391c g    DO .bss»··00000028  Base        file_list
181
4af46120 g    DF .text»·00000238  Base        process_incoming_data
182
4af3d3d4 g    DF .text»·000002dc  Base        delete_log
183
4af3d6b0 g    DF .text»·00000e00  Base        log_to_device
184
4af4d354 g    DO .data»·00000004  Base        logging_mode
185
4af43bf0 g    DF .text»·0000000c  Base        log_set_code
186
4af454ac g    DF .text»·000001e8  Base        diagpkt_delay_commit
187
4b044b50 g    DO .bss»··00000004  Base        flush_in_progress
188
4af431f0 g    DF .text»·00000064  Base        diag_send_to_output
189
4af3d0bc g    DF .text»·00000008  Base        diag_get_max_channels
190
4af43c5c g    DF .text»·000000a8  Base        Diag_LSM_Log_Init
191
4af4f0e0 g    DO .data»·000001f4  Base        file_name_del
192
4b023944 g    DO .bss»··00000004  Base        uart_logging_proc
193
4af46004 g    DF .text»·00000084  Base        DiagSvc_Malloc_Exit
194
4af4d588 g    DO .data»·00001388  Base        output_dir
195
4af427d0 g    DF .text»·00000170  Base        diag_event_stream_config
196
4af4068c g    DF .text»·000001d8  Base        Diag_LSM_DeInit
197
4af44e70 g    DF .text»·000002b4  Base        diagpkt_tbl_reg
198
4af42e78 g    DF .text»·00000120  Base        diag_dci_vote_real_time
199
4b025b94 g    DO .bss»··00000004  Base        kill_thread
200
4b023948 g    DO .bss»··00000004  Base        count_written_bytes_1
201
4af44834 g    DF .text»·000000a8  Base        qsr_msg_send
202
4af434f4 g    DF .text»·000000b4  Base        event_report
203
4af4f30c g    DO .data»·00000004  Base        diag_fd
204
4af43488 g    DF .text»·0000006c  Base        event_update_dci_mask
205
4af42664 g    DF .text»·0000000c  Base        diag_get_dci_support_list
206
4af437d8 g    DF .text»·000000ac  Base        log_update_mask
207
4af48598 g    DF .text»·00000314  Base        parse_data_for_qsr4_db_file_op_rsp
208
4af4d32c g    DO .data»·00000028  Base        file_list_index
209
4b0238ec g    DO .bss»··00000004  Base        rename_file_names
210
4af3f694 g    DF .text»·000000c0  Base        diag_register_callback
211
4af41b84 g    DF .text»·0000018c  Base        diag_lsm_dci_init
212
4af404c4 g    DF .text»·000000b4  Base        diag_vote_md_real_time_proc
213
4af442b4 g    DF .text»·000000b4  Base        msg_send_1
214
4af44368 g    DF .text»·000000bc  Base        msg_send_2
215
4af44424 g    DF .text»·000000c4  Base        msg_send_3
216
4af3cf48 g    DF .text»·00000014  Base        diag_is_wakelock_init
217
4b044b4c g    DO .bss»··00000004  Base        disk_write_hdl
218
4af3d19c g    DF .text»·00000074  Base        diag_register_socket_cb
219
4af44c10 g    DF .text»·000000c0  Base        msg_update_mask
220
4af41974 g    DF .text»·00000014  Base        diag_set_peripheral_mask
221
4af438d8 g    DF .text»·000000dc  Base        log_alloc
222
4b044b40 g    DO .bss»··00000004  Base        dci_client_tbl
223
4af3cd04 g    DF .text»·0000007c  Base        do_mask_sync
224
4b044b7d g    DO .bss»··00000001  Base        write_qshrink_header
225
4af4f2e0 g    DO .data»·00000004  Base        fd_uart
226
4af44af8 g    DF .text»·000000dc  Base        qsr_msg_send_var
227
4b044b28 g    DO .bss»··00000008  Base        periph_info
228
4af468c8 g    DF .text»·00000074  Base        diag_logger_exit
229
4af3fa80 g    DF .text»·000000bc  Base        send_empty_mask
230
4b023954 g    DO .bss»··00000004  Base        gnDiag_LSM_Event_Initialized
231
4af459b0 g    DF .text»·00000068  Base        diagpkt_err_rsp
232
4af46628 g    DF .text»·0000020c  Base        diag_logger_write
233
4af42a78 g    DF .text»·00000108  Base        diag_get_log_status
234
4b0449f8 g    DO .bss»··00000030  Base        qsr4_read_db_cond
235
4b0238e8 g    DO .bss»··00000004  Base        rename_dir_name
236
4af3cef4 g    DF .text»·00000054  Base        diag_wakelock_destroy
237
4af42148 g    DF .text»·00000048  Base        diag_register_dci_stream
238
4af43c1c g    DF .text»·0000000c  Base        log_get_code
239
4af4f348 g    DO .data.rel.ro.local»····00000120  Base        msg_mask_tbl
240
4af44bf8 g    DF .text»·00000018  Base        Diag_LSM_Msg_DeInit
241
4af3d0c4 g    DF .text»·00000084  Base        to_integer
242
4af48e08 g    DF .fini»·00000000  Base        _fini
243
4af3d2b8 g    DF .text»·0000011c  Base        diag_get_peripheral_name_from_mask
244
4b044a80 g    DO .bss»··00000028  Base        count_written_bytes
245
4af41178 g    DF .text»·0000002c  Base        diag_switch_logging
246
4af4f2e4 g    DO .data»·00000028  Base        fd_md
247
</pre>
248 5 laforge
249
h3. Logging Service API
250
251
This is about sending log messages via the Diag interface.
252
253
|_.Function|_.Purpose|
254
|log_alloc(u16 code, len)|Allocate a buffer + fill header|
255
|log_shorten(ptr, len)|Shorten the length of a previously allocated buffer|
256
|log_commit(ptr)|Send the log to diag|
257
|log_free(ptr)|Free a buffer previously allocated with log_alloc()|
258
|log_submit(ptr)|Convenience wrapper around log_alloc()/memcpy()/log_commit()|
259
260
h3. Diag Consumer Interface
261
262
This seems to be about implementing a program that consumes Diag events. You can register to certain events/masks and then receive the related information in call-backs.
Add picture from clipboard (Maximum size: 48.8 MB)