support different wifi bt chip auto compatible
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / mt5931_kk / drv_wlan / common / dump.c
1 /*
2 ** $Id: //Department/DaVinci/BRANCHES/MT662X_593X_WIFI_DRIVER_V2_3/common/dump.c#1 $
3 */
4
5 /*! \file   "dump.c"
6     \brief  Provide memory dump function for debugging.
7
8     Provide memory dump function for debugging.
9 */
10
11 /*******************************************************************************
12 * Copyright (c) 2007 MediaTek Inc.
13 *
14 * All rights reserved. Copying, compilation, modification, distribution
15 * or any other use whatsoever of this material is strictly prohibited
16 * except in accordance with a Software License Agreement with
17 * MediaTek Inc.
18 ********************************************************************************
19 */
20
21 /*******************************************************************************
22 * LEGAL DISCLAIMER
23 *
24 * BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND
25 * AGREES THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK
26 * SOFTWARE") RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE
27 * PROVIDED TO BUYER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY
28 * DISCLAIMS ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
29 * LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
30 * PARTICULAR PURPOSE OR NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE
31 * ANY WARRANTY WHATSOEVER WITH RESPECT TO THE SOFTWARE OF ANY THIRD PARTY
32 * WHICH MAY BE USED BY, INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK
33 * SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY
34 * WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE
35 * FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S SPECIFICATION OR TO
36 * CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
37 *
38 * BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
39 * LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL
40 * BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT
41 * ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY
42 * BUYER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
43 *
44 * THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
45 * WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT
46 * OF LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING
47 * THEREOF AND RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN
48 * FRANCISCO, CA, UNDER THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE
49 * (ICC).
50 ********************************************************************************
51 */
52
53 /*
54 ** $Log: dump.c $
55  *
56  * 11 24 2011 wh.su
57  * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG
58  * Adjust code for DBG and CONFIG_XLOG.
59  *
60  * 11 10 2011 wh.su
61  * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG
62  * Using the new XLOG define for dum Memory.
63  *
64  * 11 03 2011 wh.su
65  * [WCXRP00001078] [MT6620 Wi-Fi][Driver] Adding the mediatek log improment support : XLOG
66  * Add dumpMemory8 at XLOG support.
67  *
68  * 07 08 2010 cp.wu
69  * 
70  * [WPD00003833] [MT6620 and MT5931] Driver migration - move to new repository.
71  *
72  * 06 06 2010 kevin.huang
73  * [WPD00003832][MT6620 5931] Create driver base 
74  * [MT6620 5931] Create driver base
75 **  \main\maintrunk.MT6620WiFiDriver_Prj\2 2009-03-10 19:58:51 GMT mtk01426
76 **  Init develop
77 **
78 */
79
80 /*******************************************************************************
81 *                         C O M P I L E R   F L A G S
82 ********************************************************************************
83 */
84
85 /*******************************************************************************
86 *                    E X T E R N A L   R E F E R E N C E S
87 ********************************************************************************
88 */
89 #include "precomp.h"
90
91 /*******************************************************************************
92 *                              C O N S T A N T S
93 ********************************************************************************
94 */
95
96 /*******************************************************************************
97 *                             D A T A   T Y P E S
98 ********************************************************************************
99 */
100
101 /*******************************************************************************
102 *                            P U B L I C   D A T A
103 ********************************************************************************
104 */
105
106 /*******************************************************************************
107 *                           P R I V A T E   D A T A
108 ********************************************************************************
109 */
110
111 /*******************************************************************************
112 *                                 M A C R O S
113 ********************************************************************************
114 */
115
116 /*******************************************************************************
117 *                   F U N C T I O N   D E C L A R A T I O N S
118 ********************************************************************************
119 */
120
121 /*******************************************************************************
122 *                              F U N C T I O N S
123 ********************************************************************************
124 */
125 #if DBG
126 /*----------------------------------------------------------------------------*/
127 /*!
128 * \brief This routine is called to dump a segment of memory in bytes.
129 *
130 * \param[in] pucStartAddr   Pointer to the starting address of the memory to be dumped.
131 * \param[in] u4Length       Length of the memory to be dumped.
132 *
133 * \return (none)
134 */
135 /*----------------------------------------------------------------------------*/
136 VOID
137 dumpMemory8 (
138     IN PUINT_8  pucStartAddr,
139     IN UINT_32  u4Length
140     )
141 {
142     ASSERT(pucStartAddr);
143
144     LOG_FUNC("DUMP8 ADDRESS: %08lx, Length: %ld\n", (UINT_32)pucStartAddr, u4Length);
145
146     while (u4Length > 0) {
147         if (u4Length >= 16) {
148             LOG_FUNC("(%08lx) %02x %02x %02x %02x  %02x %02x %02x %02x - %02x %02x %02x %02x  %02x %02x %02x %02x\n",
149                 (UINT_32)pucStartAddr,
150                 pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
151                 pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
152                 pucStartAddr[ 8], pucStartAddr[ 9], pucStartAddr[10], pucStartAddr[11],
153                 pucStartAddr[12], pucStartAddr[13], pucStartAddr[14], pucStartAddr[15]);
154             u4Length -= 16;
155             pucStartAddr += 16;
156         }
157         else {
158             switch (u4Length) {
159             case 1:
160                 LOG_FUNC("(%08lx) %02x\n",
161                     (UINT_32)pucStartAddr,
162                     pucStartAddr[ 0]);
163                 break;
164             case 2:
165                 LOG_FUNC("(%08lx) %02x %02x\n",
166                     (UINT_32)pucStartAddr,
167                     pucStartAddr[ 0], pucStartAddr[ 1]);
168                 break;
169             case 3:
170                 LOG_FUNC("(%08lx) %02x %02x %02x\n",
171                     (UINT_32)pucStartAddr,
172                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2]);
173                 break;
174             case 4:
175                 LOG_FUNC("(%08lx) %02x %02x %02x %02x\n",
176                     (UINT_32)pucStartAddr,
177                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3]);
178                 break;
179             case 5:
180                 LOG_FUNC("(%08lx) %02x %02x %02x %02x  %02x\n",
181                     (UINT_32)pucStartAddr,
182                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
183                     pucStartAddr[ 4]);
184                 break;
185             case 6:
186                 LOG_FUNC("(%08lx) %02x %02x %02x %02x  %02x %02x\n",
187                     (UINT_32)pucStartAddr,
188                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
189                     pucStartAddr[ 4], pucStartAddr[ 5]);
190                 break;
191             case 7:
192                 LOG_FUNC("(%08lx) %02x %02x %02x %02x  %02x %02x %02x\n",
193                     (UINT_32)pucStartAddr,
194                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
195                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6]);
196                 break;
197             case 8:
198                 LOG_FUNC("(%08lx) %02x %02x %02x %02x  %02x %02x %02x %02x\n",
199                     (UINT_32)pucStartAddr,
200                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
201                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7]);
202                 break;
203             case 9:
204                 LOG_FUNC("(%08lx) %02x %02x %02x %02x  %02x %02x %02x %02x - %02x\n",
205                     (UINT_32)pucStartAddr,
206                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
207                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
208                     pucStartAddr[ 8]);
209                 break;
210             case 10:
211                 LOG_FUNC("(%08lx) %02x %02x %02x %02x  %02x %02x %02x %02x - %02x %02x\n",
212                     (UINT_32)pucStartAddr,
213                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
214                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
215                     pucStartAddr[ 8], pucStartAddr[ 9]);
216                 break;
217             case 11:
218                 LOG_FUNC("(%08lx) %02x %02x %02x %02x  %02x %02x %02x %02x - %02x %02x %02x\n",
219                     (UINT_32)pucStartAddr,
220                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
221                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
222                     pucStartAddr[ 8], pucStartAddr[ 9], pucStartAddr[10]);
223                 break;
224             case 12:
225                 LOG_FUNC("(%08lx) %02x %02x %02x %02x  %02x %02x %02x %02x - %02x %02x %02x %02x\n",
226                     (UINT_32)pucStartAddr,
227                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
228                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
229                     pucStartAddr[ 8], pucStartAddr[ 9], pucStartAddr[10], pucStartAddr[11]);
230                 break;
231             case 13:
232                 LOG_FUNC("(%08lx) %02x %02x %02x %02x  %02x %02x %02x %02x - %02x %02x %02x %02x  %02x\n",
233                     (UINT_32)pucStartAddr,
234                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
235                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
236                     pucStartAddr[ 8], pucStartAddr[ 9], pucStartAddr[10], pucStartAddr[11],
237                     pucStartAddr[12]);
238                 break;
239             case 14:
240                 LOG_FUNC("(%08lx) %02x %02x %02x %02x  %02x %02x %02x %02x - %02x %02x %02x %02x  %02x %02x\n",
241                     (UINT_32)pucStartAddr,
242                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
243                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
244                     pucStartAddr[ 8], pucStartAddr[ 9], pucStartAddr[10], pucStartAddr[11],
245                     pucStartAddr[12], pucStartAddr[13]);
246                 break;
247             case 15:
248                 LOG_FUNC("(%08lx) %02x %02x %02x %02x  %02x %02x %02x %02x - %02x %02x %02x %02x  %02x %02x %02x\n",
249                     (UINT_32)pucStartAddr,
250                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
251                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
252                     pucStartAddr[ 8], pucStartAddr[ 9], pucStartAddr[10], pucStartAddr[11],
253                     pucStartAddr[12], pucStartAddr[13], pucStartAddr[14]);
254                 break;
255             default:
256                 break;
257             }
258             u4Length = 0;
259         }
260     }
261
262     LOG_FUNC("\n");
263
264     return;
265 } /* end of dumpMemory8() */
266
267
268 /*----------------------------------------------------------------------------*/
269 /*!
270 * \brief This routine is called to dump a segment of memory in double words.
271 *
272 * \param[in] pucStartAddr   Pointer to the starting address of the memory to be dumped.
273 * \param[in] u4Length       Length of the memory to be dumped.
274 *
275 * \return (none)
276 */
277 /*----------------------------------------------------------------------------*/
278 VOID
279 dumpMemory32 (
280     IN PUINT_32 pu4StartAddr,
281     IN UINT_32  u4Length)
282 {
283     PUINT_8 pucAddr;
284
285
286     ASSERT(pu4StartAddr);
287
288     LOG_FUNC("DUMP32 ADDRESS: %08lx, Length: %ld\n", (UINT_32)pu4StartAddr, u4Length);
289
290     if (IS_NOT_ALIGN_4((UINT_32)pu4StartAddr)) {
291         UINT_32 u4ProtrudeLen = sizeof(UINT_32) - ((UINT_32)pu4StartAddr % 4);
292
293
294         u4ProtrudeLen = ((u4Length < u4ProtrudeLen) ? u4Length: u4ProtrudeLen);
295         LOG_FUNC("pu4StartAddr is not at DW boundary.\n");
296         pucAddr = (PUINT_8) &pu4StartAddr[0];
297
298         switch (u4ProtrudeLen) {
299             case 1:
300                 LOG_FUNC("(%08lx) %02x------\n",
301                    (UINT_32)pu4StartAddr,
302                    pucAddr[0]);
303                 break;
304             case 2:
305                 LOG_FUNC("(%08lx) %02x%02x----\n",
306                    (UINT_32)pu4StartAddr,
307                    pucAddr[1], pucAddr[0]);
308                 break;
309             case 3:
310                 LOG_FUNC("(%08lx) %02x%02x%02x--\n",
311                    (UINT_32)pu4StartAddr,
312                    pucAddr[2], pucAddr[1], pucAddr[0]);
313                 break;
314             default:
315                 break;
316         }
317
318         u4Length -= u4ProtrudeLen;
319         pu4StartAddr = (PUINT_32)((UINT_32)pu4StartAddr + u4ProtrudeLen);
320     }
321
322     while (u4Length > 0) {
323         if (u4Length >= 16) {
324             LOG_FUNC("(%08lx) %08lx %08lx %08lx %08lx\n",
325                 (UINT_32)pu4StartAddr,
326                 pu4StartAddr[0], pu4StartAddr[1], pu4StartAddr[2], pu4StartAddr[3]);
327             pu4StartAddr += 4;
328             u4Length -= 16;
329         }
330         else {
331             switch (u4Length) {
332             case 1:
333                  pucAddr = (PUINT_8) &pu4StartAddr[0];
334                  LOG_FUNC("(%08lx) ------%02x\n",
335                     (UINT_32)pu4StartAddr,
336                     pucAddr[0]);
337                  break;
338             case 2:
339                  pucAddr = (PUINT_8) &pu4StartAddr[0];
340                  LOG_FUNC("(%08lx) ----%02x%02x\n",
341                     (UINT_32)pu4StartAddr,
342                     pucAddr[1], pucAddr[0]);
343                  break;
344             case 3:
345                  pucAddr = (PUINT_8) &pu4StartAddr[0];
346                  LOG_FUNC("(%08lx) --%02x%02x%02x\n",
347                     (UINT_32)pu4StartAddr,
348                     pucAddr[2], pucAddr[1], pucAddr[0]);
349                  break;
350             case 4:
351                  LOG_FUNC("(%08lx) %08lx\n",
352                     (UINT_32)pu4StartAddr,
353                     pu4StartAddr[0]);
354                  break;
355             case 5:
356                  pucAddr = (PUINT_8) &pu4StartAddr[1];
357                  LOG_FUNC("(%08lx) %08lx ------%02x\n",
358                     (UINT_32)pu4StartAddr,
359                     pu4StartAddr[0],
360                     pucAddr[0]);
361                  break;
362             case 6:
363                  pucAddr = (PUINT_8) &pu4StartAddr[1];
364                  LOG_FUNC("(%08lx) %08lx ----%02x%02x\n",
365                     (UINT_32)pu4StartAddr,
366                     pu4StartAddr[0],
367                     pucAddr[1], pucAddr[0]);
368                  break;
369             case 7:
370                  pucAddr = (PUINT_8) &pu4StartAddr[1];
371                  LOG_FUNC("(%08lx) %08lx --%02x%02x%02x\n",
372                     (UINT_32)pu4StartAddr,
373                     pu4StartAddr[0],
374                     pucAddr[2], pucAddr[1], pucAddr[0]);
375                  break;
376             case 8:
377                  LOG_FUNC("(%08lx) %08lx %08lx\n",
378                     (UINT_32)pu4StartAddr,
379                     pu4StartAddr[0], pu4StartAddr[1]);
380                  break;
381             case 9:
382                  pucAddr = (PUINT_8) &pu4StartAddr[2];
383                  LOG_FUNC("(%08lx) %08lx %08lx ------%02x\n",
384                     (UINT_32)pu4StartAddr,
385                     pu4StartAddr[0], pu4StartAddr[1],
386                     pucAddr[0]);
387                  break;
388             case 10:
389                  pucAddr = (PUINT_8) &pu4StartAddr[2];
390                  LOG_FUNC("(%08lx) %08lx %08lx ----%02x%02x\n",
391                     (UINT_32)pu4StartAddr,
392                     pu4StartAddr[0], pu4StartAddr[1],
393                     pucAddr[1], pucAddr[0]);
394                  break;
395             case 11:
396                  pucAddr = (PUINT_8) &pu4StartAddr[2];
397                  LOG_FUNC("(%08lx) %08lx %08lx --%02x%02x%02x\n",
398                     (UINT_32)pu4StartAddr,
399                     pu4StartAddr[0], pu4StartAddr[1],
400                     pucAddr[2], pucAddr[1], pucAddr[0]);
401                  break;
402             case 12:
403                  LOG_FUNC("(%08lx) %08lx %08lx %08lx\n",
404                     (UINT_32)pu4StartAddr,
405                     pu4StartAddr[0], pu4StartAddr[1], pu4StartAddr[2]);
406                  break;
407             case 13:
408                  pucAddr = (PUINT_8) &pu4StartAddr[3];
409                  LOG_FUNC("(%08lx) %08lx %08lx %08lx ------%02x\n",
410                     (UINT_32)pu4StartAddr,
411                     pu4StartAddr[0], pu4StartAddr[1], pu4StartAddr[2],
412                     pucAddr[0]);
413                  break;
414             case 14:
415                  pucAddr = (PUINT_8) &pu4StartAddr[3];
416                  LOG_FUNC("(%08lx) %08lx %08lx %08lx ----%02x%02x\n",
417                      (UINT_32)pu4StartAddr,
418                      pu4StartAddr[0], pu4StartAddr[1], pu4StartAddr[2],
419                      pucAddr[1], pucAddr[0]);
420                  break;
421             case 15:
422                  pucAddr = (PUINT_8) &pu4StartAddr[3];
423                  LOG_FUNC("(%08lx) %08lx %08lx %08lx --%02x%02x%02x\n",
424                      (UINT_32)pu4StartAddr,
425                      pu4StartAddr[0], pu4StartAddr[1], pu4StartAddr[2],
426                      pucAddr[2], pucAddr[1], pucAddr[0]);
427                  break;
428             default:
429                 break;
430             }
431             u4Length = 0;
432         }
433     }
434
435     return;
436 } /* end of dumpMemory32() */
437 #elif CFG_SUPPORT_XLOG
438
439 /*----------------------------------------------------------------------------*/
440 /*!
441 * \brief This routine is called to dump a segment of memory in bytes.
442 *
443 * \param[in] pucStartAddr   Pointer to the starting address of the memory to be dumped.
444 * \param[in] u4Length       Length of the memory to be dumped.
445 *
446 * \return (none)
447 */
448 /*----------------------------------------------------------------------------*/
449 VOID
450 dumpMemory8 (
451     IN UINT_32  log_level,
452     IN PUINT_8  pucStartAddr,
453     IN UINT_32  u4Length
454     )
455 {
456     ASSERT(pucStartAddr);
457
458     if (log_level == ANDROID_LOG_ERROR) {
459         xlog_printk(ANDROID_LOG_ERROR, XLOG_TAG, "DUMP8 ADDRESS: %08lx, Length: %ld\n", (UINT_32)pucStartAddr, u4Length);
460     }
461     else if (log_level == ANDROID_LOG_WARN) {
462         xlog_printk(ANDROID_LOG_WARN, XLOG_TAG, "DUMP8 ADDRESS: %08lx, Length: %ld\n", (UINT_32)pucStartAddr, u4Length);
463     }
464     else if (log_level == ANDROID_LOG_INFO) {
465         xlog_printk(ANDROID_LOG_INFO, XLOG_TAG, "DUMP8 ADDRESS: %08lx, Length: %ld\n", (UINT_32)pucStartAddr, u4Length);
466     }
467     else if (log_level == ANDROID_LOG_DEBUG) {
468         xlog_printk(ANDROID_LOG_DEBUG, XLOG_TAG, "DUMP8 ADDRESS: %08lx, Length: %ld\n", (UINT_32)pucStartAddr, u4Length);
469     }
470     else if (log_level == ANDROID_LOG_VERBOSE) {
471         xlog_printk(ANDROID_LOG_VERBOSE, XLOG_TAG, "DUMP8 ADDRESS: %08lx, Length: %ld\n", (UINT_32)pucStartAddr, u4Length);
472     }
473
474     while (u4Length > 0) {
475         if (u4Length >= 16) {
476             XLOG_FUNC(log_level, "%02x %02x %02x %02x  %02x %02x %02x %02x - %02x %02x %02x %02x  %02x %02x %02x %02x\n",
477                 pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
478                 pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
479                 pucStartAddr[ 8], pucStartAddr[ 9], pucStartAddr[10], pucStartAddr[11],
480                 pucStartAddr[12], pucStartAddr[13], pucStartAddr[14], pucStartAddr[15]);
481             u4Length -= 16;
482             pucStartAddr += 16;
483         }
484         else {
485             switch (u4Length) {
486             case 1:
487                 XLOG_FUNC(log_level, "%02x\n",
488                     pucStartAddr[ 0]);
489                 break;
490             case 2:
491                 XLOG_FUNC(log_level, "%02x %02x\n",
492                     pucStartAddr[ 0], pucStartAddr[ 1]);
493                 break;
494             case 3:
495                 XLOG_FUNC(log_level, "%02x %02x %02x\n",
496                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2]);
497                 break;
498             case 4:
499                 XLOG_FUNC(log_level, "%02x %02x %02x %02x\n",
500                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3]);
501                 break;
502             case 5:
503                 XLOG_FUNC(log_level, "%02x %02x %02x %02x  %02x\n",
504                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
505                     pucStartAddr[ 4]);
506                 break;
507             case 6:
508                 XLOG_FUNC(log_level, "%02x %02x %02x %02x  %02x %02x\n",
509                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
510                     pucStartAddr[ 4], pucStartAddr[ 5]);
511                 break;
512             case 7:
513                 XLOG_FUNC(log_level, "%02x %02x %02x %02x  %02x %02x %02x\n",
514                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
515                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6]);
516                 break;
517             case 8:
518                 XLOG_FUNC(log_level, "%02x %02x %02x %02x  %02x %02x %02x %02x\n",
519                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
520                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7]);
521                 break;
522             case 9:
523                 XLOG_FUNC(log_level, "%02x %02x %02x %02x  %02x %02x %02x %02x - %02x\n",
524                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
525                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
526                     pucStartAddr[ 8]);
527                 break;
528             case 10:
529                 XLOG_FUNC(log_level, "%02x %02x %02x %02x  %02x %02x %02x %02x - %02x %02x\n",
530                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
531                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
532                     pucStartAddr[ 8], pucStartAddr[ 9]);
533                 break;
534             case 11:
535                 XLOG_FUNC(log_level, "%02x %02x %02x %02x  %02x %02x %02x %02x - %02x %02x %02x\n",
536                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
537                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
538                     pucStartAddr[ 8], pucStartAddr[ 9], pucStartAddr[10]);
539                 break;
540             case 12:
541                 XLOG_FUNC(log_level, "%02x %02x %02x %02x  %02x %02x %02x %02x - %02x %02x %02x %02x\n",
542                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
543                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
544                     pucStartAddr[ 8], pucStartAddr[ 9], pucStartAddr[10], pucStartAddr[11]);
545                 break;
546             case 13:
547                 XLOG_FUNC(log_level, "%02x %02x %02x %02x  %02x %02x %02x %02x - %02x %02x %02x %02x  %02x\n",
548                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
549                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
550                     pucStartAddr[ 8], pucStartAddr[ 9], pucStartAddr[10], pucStartAddr[11],
551                     pucStartAddr[12]);
552                 break;
553             case 14:
554                 XLOG_FUNC(log_level, "%02x %02x %02x %02x  %02x %02x %02x %02x - %02x %02x %02x %02x  %02x %02x\n",
555                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
556                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
557                     pucStartAddr[ 8], pucStartAddr[ 9], pucStartAddr[10], pucStartAddr[11],
558                     pucStartAddr[12], pucStartAddr[13]);
559                 break;
560             case 15:
561                 XLOG_FUNC(log_level, "%02x %02x %02x %02x  %02x %02x %02x %02x - %02x %02x %02x %02x  %02x %02x %02x\n",
562                     pucStartAddr[ 0], pucStartAddr[ 1], pucStartAddr[ 2], pucStartAddr[ 3],
563                     pucStartAddr[ 4], pucStartAddr[ 5], pucStartAddr[ 6], pucStartAddr[ 7],
564                     pucStartAddr[ 8], pucStartAddr[ 9], pucStartAddr[10], pucStartAddr[11],
565                     pucStartAddr[12], pucStartAddr[13], pucStartAddr[14]);
566                 break;
567             default:
568                 break;
569             }
570             u4Length = 0;
571         }
572     }
573
574
575     return;
576 } /* end of dumpMemory8() */
577 #endif /* DBG */
578
579