1 /* Copyright (c) 2008-2019, The Linux Foundation. All rights reserved.
3 * This program is free software; you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License version 2 and
5 * only version 2 as published by the Free Software Foundation.
7 * This program is distributed in the hope that it will be useful,
8 * but WITHOUT ANY WARRANTY; without even the implied warranty of
9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 * GNU General Public License for more details.
13 #ifndef DIAGCHAR_SHARED
14 #define DIAGCHAR_SHARED
16 #define MSG_MASKS_TYPE 0x00000001
17 #define LOG_MASKS_TYPE 0x00000002
18 #define EVENT_MASKS_TYPE 0x00000004
19 #define PKT_TYPE 0x00000008
20 #define DEINIT_TYPE 0x00000010
21 #define USER_SPACE_DATA_TYPE 0x00000020
22 #define DCI_DATA_TYPE 0x00000040
23 #define USER_SPACE_RAW_DATA_TYPE 0x00000080
24 #define DCI_LOG_MASKS_TYPE 0x00000100
25 #define DCI_EVENT_MASKS_TYPE 0x00000200
26 #define DCI_PKT_TYPE 0x00000400
27 #define HDLC_SUPPORT_TYPE 0x00001000
30 #define MEMORY_DEVICE_MODE 2
31 #define NO_LOGGING_MODE 3
34 #define CALLBACK_MODE 6
36 /* different values that go in for diag_data_type */
38 #define DATA_TYPE_EVENT 0
39 #define DATA_TYPE_F3 1
40 #define DATA_TYPE_LOG 2
41 #define DATA_TYPE_RESPONSE 3
42 #define DATA_TYPE_DELAYED_RESPONSE 4
43 #define DATA_TYPE_DCI_LOG 0x00000100
44 #define DATA_TYPE_DCI_EVENT 0x00000200
46 /* Different IOCTL values */
47 #define DIAG_IOCTL_COMMAND_REG 0
48 #define DIAG_IOCTL_COMMAND_DEREG 1
49 #define DIAG_IOCTL_SWITCH_LOGGING 7
50 #define DIAG_IOCTL_GET_DELAYED_RSP_ID 8
51 #define DIAG_IOCTL_LSM_DEINIT 9
52 #define DIAG_IOCTL_DCI_INIT 20
53 #define DIAG_IOCTL_DCI_DEINIT 21
54 #define DIAG_IOCTL_DCI_SUPPORT 22
55 #define DIAG_IOCTL_DCI_REG 23
56 #define DIAG_IOCTL_DCI_STREAM_INIT 24
57 #define DIAG_IOCTL_DCI_HEALTH_STATS 25
58 #define DIAG_IOCTL_DCI_LOG_STATUS 26
59 #define DIAG_IOCTL_DCI_EVENT_STATUS 27
60 #define DIAG_IOCTL_DCI_CLEAR_LOGS 28
61 #define DIAG_IOCTL_DCI_CLEAR_EVENTS 29
62 #define DIAG_IOCTL_REMOTE_DEV 32
63 #define DIAG_IOCTL_VOTE_REAL_TIME 33
64 #define DIAG_IOCTL_GET_REAL_TIME 34
65 #define DIAG_IOCTL_PERIPHERAL_BUF_CONFIG 35
66 #define DIAG_IOCTL_PERIPHERAL_BUF_DRAIN 36
67 #define DIAG_IOCTL_REGISTER_CALLBACK 37
68 #define DIAG_IOCTL_HDLC_TOGGLE 38
69 #define DIAG_IOCTL_QUERY_PD_LOGGING 39
72 #define APQ8060_TOOLS_ID 4062
73 #define AO8960_TOOLS_ID 4064
74 #define APQ8064_TOOLS_ID 4072
75 #define MSM8625_TOOLS_ID 4075
76 #define MSM8930_TOOLS_ID 4076
77 #define MSM8630_TOOLS_ID 4077
78 #define MSM8230_TOOLS_ID 4078
79 #define APQ8030_TOOLS_ID 4079
80 #define MSM8627_TOOLS_ID 4080
81 #define MSM8227_TOOLS_ID 4081
82 #define MSM8974_TOOLS_ID 4083
83 #define APQ8074_TOOLS_ID 4090
84 #define MSM8916_TOOLS_ID 4094
85 #define APQ8084_TOOLS_ID 4095
86 #define MSM8994_TOOLS_ID 4097
87 #define MSM8939_TOOLS_ID 4103
88 #define APQ8026_TOOLS_ID 4104
89 #define MSM8909_TOOLS_ID 4108
90 #define MSM8992_TOOLS_ID 4111
91 #define MSM8952_TOOLS_ID 4110
92 #define MSM_8996_TOOLS_ID 4112
94 #define MSG_MASK_0 (0x00000001)
95 #define MSG_MASK_1 (0x00000002)
96 #define MSG_MASK_2 (0x00000004)
97 #define MSG_MASK_3 (0x00000008)
98 #define MSG_MASK_4 (0x00000010)
99 #define MSG_MASK_5 (0x00000020)
100 #define MSG_MASK_6 (0x00000040)
101 #define MSG_MASK_7 (0x00000080)
102 #define MSG_MASK_8 (0x00000100)
103 #define MSG_MASK_9 (0x00000200)
104 #define MSG_MASK_10 (0x00000400)
105 #define MSG_MASK_11 (0x00000800)
106 #define MSG_MASK_12 (0x00001000)
107 #define MSG_MASK_13 (0x00002000)
108 #define MSG_MASK_14 (0x00004000)
109 #define MSG_MASK_15 (0x00008000)
110 #define MSG_MASK_16 (0x00010000)
111 #define MSG_MASK_17 (0x00020000)
112 #define MSG_MASK_18 (0x00040000)
113 #define MSG_MASK_19 (0x00080000)
114 #define MSG_MASK_20 (0x00100000)
115 #define MSG_MASK_21 (0x00200000)
116 #define MSG_MASK_22 (0x00400000)
117 #define MSG_MASK_23 (0x00800000)
118 #define MSG_MASK_24 (0x01000000)
119 #define MSG_MASK_25 (0x02000000)
120 #define MSG_MASK_26 (0x04000000)
121 #define MSG_MASK_27 (0x08000000)
122 #define MSG_MASK_28 (0x10000000)
123 #define MSG_MASK_29 (0x20000000)
124 #define MSG_MASK_30 (0x40000000)
125 #define MSG_MASK_31 (0x80000000)
127 /* These masks are to be used for support of all legacy messages in the sw.
128 The user does not need to remember the names as they will be embedded in
129 the appropriate macros. */
130 #define MSG_LEGACY_LOW MSG_MASK_0
131 #define MSG_LEGACY_MED MSG_MASK_1
132 #define MSG_LEGACY_HIGH MSG_MASK_2
133 #define MSG_LEGACY_ERROR MSG_MASK_3
134 #define MSG_LEGACY_FATAL MSG_MASK_4
136 /* Legacy Message Priorities */
137 #define MSG_LVL_FATAL (MSG_LEGACY_FATAL)
138 #define MSG_LVL_ERROR (MSG_LEGACY_ERROR | MSG_LVL_FATAL)
139 #define MSG_LVL_HIGH (MSG_LEGACY_HIGH | MSG_LVL_ERROR)
140 #define MSG_LVL_MED (MSG_LEGACY_MED | MSG_LVL_HIGH)
141 #define MSG_LVL_LOW (MSG_LEGACY_LOW | MSG_LVL_MED)
143 #define MSG_LVL_NONE 0
145 /* This needs to be modified manually now, when we add
146 a new RANGE of SSIDs to the msg_mask_tbl */
147 #define MSG_MASK_TBL_CNT 26
148 #define APPS_EVENT_LAST_ID 0xCB7
151 #define MSG_SSID_0_LAST 131
152 #define MSG_SSID_1 500
153 #define MSG_SSID_1_LAST 506
154 #define MSG_SSID_2 1000
155 #define MSG_SSID_2_LAST 1007
156 #define MSG_SSID_3 2000
157 #define MSG_SSID_3_LAST 2008
158 #define MSG_SSID_4 3000
159 #define MSG_SSID_4_LAST 3014
160 #define MSG_SSID_5 4000
161 #define MSG_SSID_5_LAST 4010
162 #define MSG_SSID_6 4500
163 #define MSG_SSID_6_LAST 4584
164 #define MSG_SSID_7 4600
165 #define MSG_SSID_7_LAST 4616
166 #define MSG_SSID_8 5000
167 #define MSG_SSID_8_LAST 5036
168 #define MSG_SSID_9 5500
169 #define MSG_SSID_9_LAST 5517
170 #define MSG_SSID_10 6000
171 #define MSG_SSID_10_LAST 6081
172 #define MSG_SSID_11 6500
173 #define MSG_SSID_11_LAST 6521
174 #define MSG_SSID_12 7000
175 #define MSG_SSID_12_LAST 7003
176 #define MSG_SSID_13 7100
177 #define MSG_SSID_13_LAST 7111
178 #define MSG_SSID_14 7200
179 #define MSG_SSID_14_LAST 7201
180 #define MSG_SSID_15 8000
181 #define MSG_SSID_15_LAST 8000
182 #define MSG_SSID_16 8500
183 #define MSG_SSID_16_LAST 8532
184 #define MSG_SSID_17 9000
185 #define MSG_SSID_17_LAST 9008
186 #define MSG_SSID_18 9500
187 #define MSG_SSID_18_LAST 9521
188 #define MSG_SSID_19 10200
189 #define MSG_SSID_19_LAST 10210
190 #define MSG_SSID_20 10251
191 #define MSG_SSID_20_LAST 10255
192 #define MSG_SSID_21 10300
193 #define MSG_SSID_21_LAST 10300
194 #define MSG_SSID_22 10350
195 #define MSG_SSID_22_LAST 10377
196 #define MSG_SSID_23 10400
197 #define MSG_SSID_23_LAST 10416
198 #define MSG_SSID_24 10500
199 #define MSG_SSID_24_LAST 10505
200 #define MSG_SSID_25 0xC000
201 #define MSG_SSID_25_LAST 0xC063
203 static const uint32_t msg_bld_masks_0[] = {
221 MSG_LVL_MED | MSG_MASK_5 | MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8,
234 MSG_LVL_MED|MSG_MASK_7 | \
235 MSG_MASK_8|MSG_MASK_9|MSG_MASK_10|MSG_MASK_11|MSG_MASK_12 | \
236 MSG_MASK_13|MSG_MASK_14|MSG_MASK_15|MSG_MASK_16 | \
237 MSG_MASK_17|MSG_MASK_18|MSG_MASK_19|MSG_MASK_20|MSG_MASK_21,
238 MSG_LVL_MED|MSG_MASK_5 | \
239 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8|MSG_MASK_9|MSG_MASK_10| \
240 MSG_MASK_11|MSG_MASK_12|MSG_MASK_13|MSG_MASK_14| \
241 MSG_MASK_15|MSG_MASK_16|MSG_MASK_17,
250 MSG_LVL_MED|MSG_MASK_5 | \
251 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8,
258 MSG_LVL_MED|MSG_MASK_5 | \
259 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8|MSG_MASK_9|MSG_MASK_10| \
260 MSG_MASK_11|MSG_MASK_12|MSG_MASK_13|MSG_MASK_14|MSG_MASK_15| \
261 MSG_MASK_16|MSG_MASK_17|MSG_MASK_18|MSG_MASK_19|MSG_MASK_20| \
262 MSG_MASK_21|MSG_MASK_22|MSG_MASK_23|MSG_MASK_24|MSG_MASK_25,
263 MSG_LVL_MED|MSG_MASK_5 | \
264 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8|MSG_MASK_9|MSG_MASK_10,
275 MSG_LVL_LOW | MSG_MASK_5 | \
276 MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8,
277 MSG_LVL_LOW | MSG_MASK_5 | \
282 MSG_LVL_MED | MSG_MASK_5 | \
283 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8|MSG_MASK_9|MSG_MASK_10| \
284 MSG_MASK_11|MSG_MASK_12|MSG_MASK_13|MSG_MASK_14|MSG_MASK_15 | \
285 MSG_MASK_16|MSG_MASK_17|MSG_MASK_18|MSG_MASK_19|MSG_MASK_20,
298 MSG_LVL_HIGH | MSG_MASK_21,
306 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
308 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
317 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
322 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
323 MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR,
324 MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR,
325 MSG_LVL_MED|MSG_LVL_HIGH,
326 MSG_LVL_MED|MSG_LVL_HIGH,
328 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
330 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
331 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
332 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
335 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
336 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
338 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
339 MSG_LVL_LOW|MSG_LVL_MED|MSG_LVL_HIGH|MSG_LVL_ERROR|MSG_LVL_FATAL,
344 MSG_LVL_LOW | MSG_LVL_MED | MSG_LVL_HIGH | MSG_LVL_ERROR |
352 MSG_LVL_LOW | MSG_LVL_MED | MSG_LVL_HIGH | MSG_LVL_ERROR
355 static const uint32_t msg_bld_masks_1[] = {
365 static const uint32_t msg_bld_masks_2[] = {
371 MSG_LVL_MED|MSG_MASK_5,
376 static const uint32_t msg_bld_masks_3[] = {
382 MSG_LVL_MED|MSG_MASK_5|MSG_MASK_6|MSG_MASK_7|
383 MSG_MASK_8|MSG_MASK_9|MSG_MASK_10,
389 static const uint32_t msg_bld_masks_4[] = {
407 static const uint32_t msg_bld_masks_5[] = {
417 MSG_LVL_MED|MSG_LVL_MED|MSG_MASK_5|MSG_MASK_6|MSG_MASK_7| \
418 MSG_MASK_8|MSG_MASK_9,
422 static const uint32_t msg_bld_masks_6[] = {
423 MSG_LVL_LOW | MSG_MASK_5,
424 MSG_LVL_LOW | MSG_MASK_5,
425 MSG_LVL_LOW | MSG_MASK_5,
426 MSG_LVL_LOW | MSG_MASK_5,
427 MSG_LVL_LOW | MSG_MASK_5,
428 MSG_LVL_LOW | MSG_MASK_5,
429 MSG_LVL_LOW | MSG_MASK_5,
430 MSG_LVL_LOW | MSG_MASK_5,
431 MSG_LVL_LOW | MSG_MASK_5,
432 MSG_LVL_LOW | MSG_MASK_5,
433 MSG_LVL_LOW | MSG_MASK_5,
434 MSG_LVL_LOW | MSG_MASK_5,
435 MSG_LVL_LOW | MSG_MASK_5,
436 MSG_LVL_LOW | MSG_MASK_5,
437 MSG_LVL_LOW | MSG_MASK_5,
438 MSG_LVL_LOW | MSG_MASK_5,
439 MSG_LVL_LOW | MSG_MASK_5,
440 MSG_LVL_LOW | MSG_MASK_5,
441 MSG_LVL_LOW | MSG_MASK_5,
442 MSG_LVL_LOW | MSG_MASK_5,
443 MSG_LVL_LOW | MSG_MASK_5,
444 MSG_LVL_LOW | MSG_MASK_5,
445 MSG_LVL_LOW | MSG_MASK_5,
446 MSG_LVL_LOW | MSG_MASK_5,
447 MSG_LVL_LOW | MSG_MASK_5,
448 MSG_LVL_LOW | MSG_MASK_5,
449 MSG_LVL_LOW | MSG_MASK_5,
450 MSG_LVL_LOW | MSG_MASK_5,
451 MSG_LVL_LOW | MSG_MASK_5,
452 MSG_LVL_LOW | MSG_MASK_5,
453 MSG_LVL_LOW | MSG_MASK_5,
454 MSG_LVL_LOW | MSG_MASK_5,
455 MSG_LVL_LOW | MSG_MASK_5,
456 MSG_LVL_LOW | MSG_MASK_5,
457 MSG_LVL_LOW | MSG_MASK_5,
458 MSG_LVL_LOW | MSG_MASK_5,
459 MSG_LVL_LOW | MSG_MASK_5,
460 MSG_LVL_LOW | MSG_MASK_5,
461 MSG_LVL_LOW | MSG_MASK_5,
462 MSG_LVL_LOW | MSG_MASK_5,
463 MSG_LVL_LOW | MSG_MASK_5,
464 MSG_LVL_LOW | MSG_MASK_5,
465 MSG_LVL_LOW | MSG_MASK_5,
466 MSG_LVL_LOW | MSG_MASK_5,
467 MSG_LVL_LOW | MSG_MASK_5,
468 MSG_LVL_LOW | MSG_MASK_5,
469 MSG_LVL_LOW | MSG_MASK_5,
470 MSG_LVL_LOW | MSG_MASK_5,
471 MSG_LVL_LOW | MSG_MASK_5,
472 MSG_LVL_LOW | MSG_MASK_5,
473 MSG_LVL_LOW | MSG_MASK_5,
474 MSG_LVL_LOW | MSG_MASK_5,
475 MSG_LVL_LOW | MSG_MASK_5,
476 MSG_LVL_LOW | MSG_MASK_5,
477 MSG_LVL_LOW | MSG_MASK_5,
478 MSG_LVL_LOW | MSG_MASK_5,
479 MSG_LVL_LOW | MSG_MASK_5,
480 MSG_LVL_LOW | MSG_MASK_5,
481 MSG_LVL_LOW | MSG_MASK_5,
482 MSG_LVL_LOW | MSG_MASK_5,
483 MSG_LVL_LOW | MSG_MASK_5,
484 MSG_LVL_LOW | MSG_MASK_5,
485 MSG_LVL_LOW | MSG_MASK_5,
486 MSG_LVL_LOW | MSG_MASK_5,
487 MSG_LVL_LOW | MSG_MASK_5,
488 MSG_LVL_LOW | MSG_MASK_5,
489 MSG_LVL_LOW | MSG_MASK_5,
490 MSG_LVL_LOW | MSG_MASK_5,
491 MSG_LVL_LOW | MSG_MASK_5,
492 MSG_LVL_LOW | MSG_MASK_5,
493 MSG_LVL_LOW | MSG_MASK_5,
494 MSG_LVL_LOW | MSG_MASK_5,
495 MSG_LVL_LOW | MSG_MASK_5,
496 MSG_LVL_LOW | MSG_MASK_5,
497 MSG_LVL_LOW | MSG_MASK_5,
498 MSG_LVL_LOW | MSG_MASK_5,
499 MSG_LVL_LOW | MSG_MASK_5,
500 MSG_LVL_LOW | MSG_MASK_5,
501 MSG_LVL_LOW | MSG_MASK_5,
502 MSG_LVL_LOW | MSG_MASK_5,
503 MSG_LVL_LOW | MSG_MASK_5,
504 MSG_LVL_LOW | MSG_MASK_5,
505 MSG_LVL_LOW | MSG_MASK_5,
506 MSG_LVL_LOW | MSG_MASK_5,
507 MSG_LVL_LOW | MSG_MASK_5,
510 static const uint32_t msg_bld_masks_7[] = {
526 MSG_LVL_LOW | MSG_LVL_MED | MSG_LVL_HIGH | MSG_LVL_ERROR |
531 static const uint32_t msg_bld_masks_8[] = {
571 static const uint32_t msg_bld_masks_9[] = {
572 MSG_LVL_MED | MSG_MASK_5,
573 MSG_LVL_MED | MSG_MASK_5,
574 MSG_LVL_MED | MSG_MASK_5,
575 MSG_LVL_MED | MSG_MASK_5,
576 MSG_LVL_MED | MSG_MASK_5,
577 MSG_LVL_MED | MSG_MASK_5,
578 MSG_LVL_MED | MSG_MASK_5,
579 MSG_LVL_MED | MSG_MASK_5,
580 MSG_LVL_MED | MSG_MASK_5,
581 MSG_LVL_MED | MSG_MASK_5,
582 MSG_LVL_MED | MSG_MASK_5,
583 MSG_LVL_MED | MSG_MASK_5,
584 MSG_LVL_MED | MSG_MASK_5,
585 MSG_LVL_MED | MSG_MASK_5,
586 MSG_LVL_MED | MSG_MASK_5,
587 MSG_LVL_MED | MSG_MASK_5,
588 MSG_LVL_MED | MSG_MASK_5,
592 static const uint32_t msg_bld_masks_10[] = {
596 MSG_LVL_LOW|MSG_MASK_5 | \
597 MSG_MASK_6|MSG_MASK_7|MSG_MASK_8|MSG_MASK_9|MSG_MASK_10| \
598 MSG_MASK_11|MSG_MASK_12|MSG_MASK_13|MSG_MASK_14|MSG_MASK_15| \
599 MSG_MASK_16|MSG_MASK_17|MSG_MASK_18|MSG_MASK_19|MSG_MASK_20| \
600 MSG_MASK_21|MSG_MASK_22,
601 MSG_LVL_LOW|MSG_MASK_5,
610 MSG_LVL_LOW|MSG_MASK_5,
611 MSG_LVL_LOW|MSG_MASK_5,
612 MSG_LVL_LOW|MSG_MASK_5,
613 MSG_LVL_LOW|MSG_MASK_5,
614 MSG_LVL_LOW|MSG_MASK_5,
615 MSG_LVL_LOW|MSG_MASK_5,
616 MSG_LVL_LOW|MSG_MASK_5,
617 MSG_LVL_LOW|MSG_MASK_5,
618 MSG_LVL_LOW|MSG_MASK_5,
619 MSG_LVL_LOW|MSG_MASK_5,
620 MSG_LVL_LOW|MSG_MASK_5,
621 MSG_LVL_LOW|MSG_MASK_5,
622 MSG_LVL_LOW|MSG_MASK_5,
623 MSG_LVL_LOW|MSG_MASK_5,
624 MSG_LVL_LOW|MSG_MASK_5,
625 MSG_LVL_LOW|MSG_MASK_5,
626 MSG_LVL_LOW|MSG_MASK_5,
627 MSG_LVL_LOW|MSG_MASK_5,
628 MSG_LVL_LOW|MSG_MASK_5,
634 MSG_LVL_LOW|MSG_MASK_5,
635 MSG_LVL_LOW|MSG_MASK_0 | MSG_MASK_1 | MSG_MASK_2 | \
636 MSG_MASK_3 | MSG_MASK_4 | MSG_MASK_5 | MSG_MASK_6,
682 static const uint32_t msg_bld_masks_11[] = {
707 static const uint32_t msg_bld_masks_12[] = {
714 static const uint32_t msg_bld_masks_13[] = {
729 static const uint32_t msg_bld_masks_14[] = {
734 static const uint32_t msg_bld_masks_15[] = {
738 static const uint32_t msg_bld_masks_16[] = {
764 MSG_LVL_LOW | MSG_LVL_MED | MSG_LVL_HIGH | MSG_LVL_ERROR |
766 MSG_LVL_LOW | MSG_LVL_MED | MSG_LVL_HIGH | MSG_LVL_ERROR |
768 MSG_LVL_LOW | MSG_LVL_MED | MSG_LVL_HIGH | MSG_LVL_ERROR |
770 MSG_LVL_LOW | MSG_LVL_MED | MSG_LVL_HIGH | MSG_LVL_ERROR |
772 MSG_LVL_LOW | MSG_LVL_MED | MSG_LVL_HIGH | MSG_LVL_ERROR |
779 static const uint32_t msg_bld_masks_17[] = {
783 MSG_LVL_MED | MSG_MASK_6 | \
784 MSG_MASK_7 | MSG_MASK_8 | MSG_MASK_9,
785 MSG_LVL_MED | MSG_MASK_5 | \
786 MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8 | MSG_MASK_9 | \
787 MSG_MASK_10 | MSG_MASK_11 | MSG_MASK_12 | MSG_MASK_13 | \
788 MSG_MASK_14 | MSG_MASK_15 | MSG_MASK_16 | MSG_MASK_17,
790 MSG_LVL_MED | MSG_MASK_5 | \
791 MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8 | MSG_MASK_9 | \
792 MSG_MASK_10 | MSG_MASK_11 | MSG_MASK_12 | MSG_MASK_13 | \
793 MSG_MASK_14 | MSG_MASK_15 | MSG_MASK_16 | MSG_MASK_17 | \
794 MSG_MASK_18 | MSG_MASK_19 | MSG_MASK_20 | MSG_MASK_21 | \
800 static const uint32_t msg_bld_masks_18[] = {
802 MSG_LVL_MED | MSG_MASK_8 | MSG_MASK_9 | MSG_MASK_10 | MSG_MASK_11 |
803 MSG_MASK_12 | MSG_MASK_13 | MSG_MASK_14 | MSG_MASK_15 |
804 MSG_MASK_16 | MSG_MASK_17 | MSG_MASK_18 | MSG_MASK_19 |
806 MSG_LVL_MED | MSG_MASK_5 | MSG_MASK_6,
807 MSG_LVL_MED | MSG_MASK_5,
808 MSG_LVL_MED | MSG_MASK_5 | MSG_MASK_6,
810 MSG_LVL_MED | MSG_MASK_5 | MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8 |
814 MSG_LVL_MED | MSG_MASK_5 | MSG_MASK_6 | MSG_MASK_7 | MSG_MASK_8 |
815 MSG_MASK_9 | MSG_MASK_10 | MSG_MASK_11 | MSG_MASK_12 |
816 MSG_MASK_13 | MSG_MASK_14 | MSG_MASK_15 | MSG_MASK_16 |
817 MSG_MASK_20 | MSG_MASK_21 | MSG_MASK_22,
821 static const uint32_t msg_bld_masks_19[] = {
835 static const uint32_t msg_bld_masks_20[] = {
836 MSG_LVL_LOW | MSG_MASK_5 | MSG_MASK_6 | MSG_MASK_7 |
837 MSG_MASK_8 | MSG_MASK_9 | MSG_MASK_10 | MSG_MASK_11 |
845 static const uint32_t msg_bld_masks_21[] = {
849 static const uint32_t msg_bld_masks_22[] = {
880 static const uint32_t msg_bld_masks_23[] = {
900 static const uint32_t msg_bld_masks_24[] = {
909 static const uint32_t msg_bld_masks_25[] = {
914 static const uint32_t log_code_last_tbl[] = {
915 0x0, /* EQUIP ID 0 */
916 0x1CC0, /* EQUIP ID 1 */
917 0x0, /* EQUIP ID 2 */
918 0x0, /* EQUIP ID 3 */
919 0x4910, /* EQUIP ID 4 */
920 0x5420, /* EQUIP ID 5 */
921 0x0, /* EQUIP ID 6 */
922 0x74FF, /* EQUIP ID 7 */
923 0x0, /* EQUIP ID 8 */
924 0x0, /* EQUIP ID 9 */
925 0xA38A, /* EQUIP ID 10 */
926 0xB9FF, /* EQUIP ID 11 */
927 0x0, /* EQUIP ID 12 */
928 0xD1FF, /* EQUIP ID 13 */
929 0x0, /* EQUIP ID 14 */
930 0x0, /* EQUIP ID 15 */
933 #define LOG_GET_ITEM_NUM(xx_code) (xx_code & 0x0FFF)
934 #define LOG_GET_EQUIP_ID(xx_code) ((xx_code & 0xF000) >> 12)
935 #define LOG_ITEMS_TO_SIZE(num_items) ((num_items+7)/8)
936 #define LOG_SIZE_TO_ITEMS(size) ((8*size) - 7)
937 #define EVENT_COUNT_TO_BYTES(count) ((count/8) + 1)