xref: /utopia/UTPA2-700.0.x/modules/dscmb/hal/curry/nsk2/halNSK2.c (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1 //<MStar Software>
2 //******************************************************************************
3 // MStar Software
4 // Copyright (c) 2010 - 2012 MStar Semiconductor, Inc. All rights reserved.
5 // All software, firmware and related documentation herein ("MStar Software") are
6 // intellectual property of MStar Semiconductor, Inc. ("MStar") and protected by
7 // law, including, but not limited to, copyright law and international treaties.
8 // Any use, modification, reproduction, retransmission, or republication of all
9 // or part of MStar Software is expressly prohibited, unless prior written
10 // permission has been granted by MStar.
11 //
12 // By accessing, browsing and/or using MStar Software, you acknowledge that you
13 // have read, understood, and agree, to be bound by below terms ("Terms") and to
14 // comply with all applicable laws and regulations:
15 //
16 // 1. MStar shall retain any and all right, ownership and interest to MStar
17 //    Software and any modification/derivatives thereof.
18 //    No right, ownership, or interest to MStar Software and any
19 //    modification/derivatives thereof is transferred to you under Terms.
20 //
21 // 2. You understand that MStar Software might include, incorporate or be
22 //    supplied together with third party`s software and the use of MStar
23 //    Software may require additional licenses from third parties.
24 //    Therefore, you hereby agree it is your sole responsibility to separately
25 //    obtain any and all third party right and license necessary for your use of
26 //    such third party`s software.
27 //
28 // 3. MStar Software and any modification/derivatives thereof shall be deemed as
29 //    MStar`s confidential information and you agree to keep MStar`s
30 //    confidential information in strictest confidence and not disclose to any
31 //    third party.
32 //
33 // 4. MStar Software is provided on an "AS IS" basis without warranties of any
34 //    kind. Any warranties are hereby expressly disclaimed by MStar, including
35 //    without limitation, any warranties of merchantability, non-infringement of
36 //    intellectual property rights, fitness for a particular purpose, error free
37 //    and in conformity with any international standard.  You agree to waive any
38 //    claim against MStar for any loss, damage, cost or expense that you may
39 //    incur related to your use of MStar Software.
40 //    In no event shall MStar be liable for any direct, indirect, incidental or
41 //    consequential damages, including without limitation, lost of profit or
42 //    revenues, lost or damage of data, and unauthorized system use.
43 //    You agree that this Section 4 shall still apply without being affected
44 //    even if MStar Software has been modified by MStar in accordance with your
45 //    request or instruction for your use, except otherwise agreed by both
46 //    parties in writing.
47 //
48 // 5. If requested, MStar may from time to time provide technical supports or
49 //    services in relation with MStar Software to you for your use of
50 //    MStar Software in conjunction with your or your customer`s product
51 //    ("Services").
52 //    You understand and agree that, except otherwise agreed by both parties in
53 //    writing, Services are provided on an "AS IS" basis and the warranty
54 //    disclaimer set forth in Section 4 above shall apply.
55 //
56 // 6. Nothing contained herein shall be construed as by implication, estoppels
57 //    or otherwise:
58 //    (a) conferring any license or right to use MStar name, trademark, service
59 //        mark, symbol or any other identification;
60 //    (b) obligating MStar or any of its affiliates to furnish any person,
61 //        including without limitation, you and your customers, any assistance
62 //        of any kind whatsoever, or any information; or
63 //    (c) conferring any license or right under any intellectual property right.
64 //
65 // 7. These terms shall be governed by and construed in accordance with the laws
66 //    of Taiwan, R.O.C., excluding its conflict of law rules.
67 //    Any and all dispute arising out hereof or related hereto shall be finally
68 //    settled by arbitration referred to the Chinese Arbitration Association,
69 //    Taipei in accordance with the ROC Arbitration Law and the Arbitration
70 //    Rules of the Association by three (3) arbitrators appointed in accordance
71 //    with the said Rules.
72 //    The place of arbitration shall be in Taipei, Taiwan and the language shall
73 //    be English.
74 //    The arbitration award shall be final and binding to both parties.
75 //
76 //******************************************************************************
77 //<MStar Software>
78 ////////////////////////////////////////////////////////////////////////////////
79 //
80 // Copyright (c) 2008-2009 MStar Semiconductor, Inc.
81 // All rights reserved.
82 //
83 // Unless otherwise stipulated in writing, any and all information contained
84 // herein regardless in any format shall remain the sole proprietary of
85 // MStar Semiconductor Inc. and be kept in strict confidence
86 // ("MStar Confidential Information") by the recipient.
87 // Any unauthorized act including without limitation unauthorized disclosure,
88 // copying, use, reproduction, sale, distribution, modification, disassembling,
89 // reverse engineering and compiling of the contents of MStar Confidential
90 // Information is unlawful and strictly prohibited. MStar hereby reserves the
91 // rights to any and all damages, losses, costs and expenses resulting therefrom.
92 ////////////////////////////////////////////////////////////////////////////////
93 #define _HAL_NSK2_C
94 
95 ////////////////////////////////////////////////////////////////////////////////
96 /// @file halEMMflt.c
97 /// @author MStar Semiconductor Inc.
98 /// @brief
99 ////////////////////////////////////////////////////////////////////////////////
100 
101 ////////////////////////////////////////////////////////////////////////////////
102 // Header Files
103 ////////////////////////////////////////////////////////////////////////////////
104 #ifdef MSOS_TYPE_LINUX_KERNEL
105 #include <linux/string.h>
106 #else
107 #include "string.h"
108 #endif
109 
110 #include "MsCommon.h"
111 #include "MsTypes.h"
112 #include "drvSYS.h"
113 
114 #include "halNSK2.h"
115 #include "regNSK2.h"
116 #include "MsOS.h"
117 
118 #include "../tsp/regTSP.h"
119 #include "../tsp/halTSP.h"
120 #include "../../include/drvDSCMB.h"
121 #include "../dscmb/halDSCMB.h"
122 
123 #include "../../include/drvNSK2Type.h"
124 #include "halNSK2OtpField.h"
125 #include "../../include/drvCA.h"
126 //#include "../ca2/halCA.h"		//postpone it until halCA is ready
127 
128 #include "nsk_282.h"
129 
130 ////////////////////////////////////////////////////////////////////////////////
131 // Define & data type
132 ///////////////////////////////////////////////////////////////////////////////
133 
134 #define POLLING_CNT     100
135 #define BUSYCHECK_CNT   100
136 
137 static MS_U32 _gBasicAddr = 0;
138 static MS_U32 _gNSK2_Addr = 0;
139 static MS_U32 _gOTP_Addr = 0;
140 static MS_U32 _gOTP_CTRL_Addr = 0;
141 static MS_U32 _gNI_Addr = 0;
142 static MS_U32 _gRSA_Addr = 0;
143 static MS_U32 _gKeyTable_Addr = 0;
144 static MS_U32 _gNDSJTagPwd_Addr = 0;
145 static MS_U32 _gCipherCH0_Addr = 0;
146 static MS_U32 _gCryptoDMA_Addr = 0;
147 
148 static MS_U32 _g32NSK2HalDbgLv = NSK2_DBGLV_DEBUG;
149 
150 #define HALNSK2_DBG(lv, x, args...)   if (lv <= _g32NSK2HalDbgLv ) \
151                                         {printf(x, ##args);}
152 
153 //bank 0x1700
154 #define OTP_REG(addr)           (*((volatile MS_U32*)(_gOTP_Addr + addr )))
155 
156 //bank 0x162B
157 #define OTP_CTRL_REG(addr)      (*((volatile MS_U32*)(_gOTP_CTRL_Addr + (addr<<2) )))
158 
159 //bank 0x1620
160 #define NI_REG(addr)            (*((volatile MS_U32*)(_gNI_Addr + (addr<<2) )))
161 
162 //bank 1630
163 #define RSA_REG(addr)           (*((volatile MS_U32*)(_gRSA_Addr + (addr<<2) )))
164 
165 //bank 1626
166 #define KeyTable_REG(addr)      (*((volatile MS_U32*)(_gKeyTable_Addr + (addr<<2) )))
167 
168 //bank xxxxxx
169 #define NDSJTagPwd_REG(addr)    (*((volatile MS_U16*)(_gNDSJTagPwd_Addr + (addr<<2) )))
170 
171 //bank 1621
172 #define CMCHANNEL0_REG(addr)    (*((volatile MS_U32*)(_gCipherCH0_Addr + (addr<<2) )))
173 
174 
175 //#define FPGAMode
176 //#define NSK2SelfTest
177 
178 //#define TestGenIn
179 //#define ReadSwitchInfoNSK2
180 
181 
182 #define StatusCheck(status)   do { if(status == FALSE) \
183                                      { \
184                                          printf("status error %s, %d\n",__FUNCTION__,__LINE__); \
185                                          return status;   \
186                                      } \
187                                  } while(0);
188 
189 #define NSK2HDI_CMCHANNEL_WITH_ALL_PARITY   ( NSK2HDI_CMCHANNEL_CLEAR_PARITY | NSK2HDI_CMCHANNEL_EVEN_PARITY |  NSK2HDI_CMCHANNEL_EVEN_CLEAR_PARITY | NSK2HDI_CMCHANNEL_ODD_PARITY | \
190                                               NSK2HDI_CMCHANNEL_ODD_CLEAR_PARITY | NSK2HDI_CMCHANNEL_ODD_EVEN_PARITY | NSK2HDI_CMCHANNEL_ODD_EVEN_CLEAR_PARITY )
191 
192 #define CMCHANNEL_NSK_All_CAPABILITY        (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV2_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV_WRITEKEY_CAPABILITY_FLAG)
193 
194 ////////////////////////////////////////////////////////////////////////////////
195 // Local variable
196 ////////////////////////////////////////////////////////////////////////////////
197 
198 static MS_BOOL _gReset = FALSE;
199 static MS_BOOL _gCheckBusyFlag = FALSE;
200 static MS_U32 dead_polling_cnt = 1;
201 
202 static cmchannel_group_capability_descriptor_t cm_capb =
203 {
204     .descriptor_tag = NSK2HDI_CMCHANNELGROUP_CAPABILITY_DESC_TAG,
205     .descriptor_length = sizeof(cmchannel_group_capability_descriptor_t) - 2,
206     .number_of_channels[3] = 40,
207     .switch_combination_bitmap[0] = 0xff,
208     .user_context[0] = 'M',
209     .user_context[1] = 'S',
210     .user_context[2] = 't',
211     .user_context[3] = 'a',
212     .user_context[4] = 'r',
213     .user_context[5] = 0x00,
214     .user_context[6] = 0x00,
215     .user_context[7] = 0x00,
216 };
217 
218 static cmchannel_group_algorithm_record_descriptor_t cm_algo[] =
219 {
220 
221 //-------------------------------LSA---------------------------------------//
222     {
223         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
224         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
225         .algorithm_type = NSK2HDI_CMCHANNEL_LSA_ALGORITHM_TYPE,
226         .algorithm = NSK2HDI_SPROFILE_CPCM_LSA_MDI_CBC,
227         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
228         //.capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
229         .capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV_WRITEKEY_CAPABILITY_FLAG),
230     },
231 
232     {
233         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
234         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
235         .algorithm_type = NSK2HDI_CMCHANNEL_LSA_ALGORITHM_TYPE,
236         .algorithm = NSK2HDI_SPROFILE_CPCM_LSA_MDI_RCBC,
237         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
238         //.capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
239         .capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV_WRITEKEY_CAPABILITY_FLAG),
240     },
241 
242     {
243         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
244         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
245         .algorithm_type = NSK2HDI_CMCHANNEL_LSA_ALGORITHM_TYPE,
246         .algorithm = NSK2HDI_SPROFILE_CPCM_LSA_MDD_CBC,
247         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
248         //.capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
249         .capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV_WRITEKEY_CAPABILITY_FLAG),
250     },
251 
252     {
253         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
254         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
255         .algorithm_type = NSK2HDI_CMCHANNEL_LSA_ALGORITHM_TYPE,
256         .algorithm = NSK2HDI_SPROFILE_CPCM_LSA_MDD_RCBC,
257         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
258         //.capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
259         .capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV_WRITEKEY_CAPABILITY_FLAG),
260     },
261 
262     {
263         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
264         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
265         .algorithm_type = NSK2HDI_CMCHANNEL_LSA_ALGORITHM_TYPE,
266         .algorithm = NSK2HDI_SPROFILE_SYNAMEDIA_AES,
267         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
268         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG ,
269     },
270 
271     {
272         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
273         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
274         .algorithm_type = NSK2HDI_CMCHANNEL_LSA_ALGORITHM_TYPE,
275         .algorithm = NSK2HDI_SPROFILE_AES_ECB_CLEARTAIL,
276         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
277         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
278     },
279 
280     {
281         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
282         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
283         .algorithm_type = NSK2HDI_CMCHANNEL_LSA_ALGORITHM_TYPE,
284         .algorithm = NSK2HDI_SPROFILE_CIPLUS_AES,
285         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
286         //.capability = CMCHANNEL_NSK_All_CAPABILITY,
287         .capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV_WRITEKEY_CAPABILITY_FLAG),
288     },
289 
290     {
291         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
292         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
293         .algorithm_type = NSK2HDI_CMCHANNEL_LSA_ALGORITHM_TYPE,
294         .algorithm = NSK2HDI_SPROFILE_SCTE41_DES,
295         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
296         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG ,
297     },
298 
299     {
300         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
301         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
302         .algorithm_type = NSK2HDI_CMCHANNEL_LSA_ALGORITHM_TYPE,
303         .algorithm = NSK2HDI_SPROFILE_SCTE52_DES,
304         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
305         //.capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG ,
306         .capability = CMCHANNEL_NSK_All_CAPABILITY,
307     },
308 
309     {
310         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
311         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
312         .algorithm_type = NSK2HDI_CMCHANNEL_LSA_ALGORITHM_TYPE,
313         .algorithm = NSK2HDI_SPROFILE_TDES_ECB_CLEARTAIL,
314         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
315         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG ,
316     },
317 
318 
319 //-------------------------------LSA---------------------------------------//
320 //10
321 
322 
323 
324 //-------------------------------ESA---------------------------------------//
325     {
326         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
327         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
328         .algorithm_type = NSK2HDI_CMCHANNEL_ESA_ALGORITHM_TYPE,
329         .algorithm = NSK2HDI_SPROFILE_DVB_CSA2,
330         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
331         //.capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV2_CONFIGURE_CAPABILITY_FLAG),
332         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
333     },
334 
335 
336     {
337         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
338         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
339         .algorithm_type = NSK2HDI_CMCHANNEL_ESA_ALGORITHM_TYPE,
340         .algorithm = NSK2HDI_SPROFILE_DVB_CSA_CONFORMANCE,
341         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
342         //.capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV2_CONFIGURE_CAPABILITY_FLAG),
343         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
344     },
345 
346     {
347         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
348         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
349         .algorithm_type = NSK2HDI_CMCHANNEL_ESA_ALGORITHM_TYPE,
350         .algorithm = NSK2HDI_SPROFILE_DVB_CSA3,
351         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
352         //.capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV2_CONFIGURE_CAPABILITY_FLAG),
353         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
354     },
355 
356 
357     {
358         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
359         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
360         .algorithm_type = NSK2HDI_CMCHANNEL_ESA_ALGORITHM_TYPE,
361         .algorithm = NSK2HDI_SPROFILE_CPCM_LSA_MDI_CBC,
362         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
363         //.capability = CMCHANNEL_NSK_All_CAPABILITY,
364         .capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV_WRITEKEY_CAPABILITY_FLAG),
365     },
366 
367     {
368         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
369         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
370         .algorithm_type = NSK2HDI_CMCHANNEL_ESA_ALGORITHM_TYPE,
371         .algorithm = NSK2HDI_SPROFILE_SYNAMEDIA_AES,
372         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
373         //.capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV2_CONFIGURE_CAPABILITY_FLAG),
374         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
375     },
376 
377     {
378         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
379         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
380         .algorithm_type = NSK2HDI_CMCHANNEL_ESA_ALGORITHM_TYPE,
381         .algorithm = NSK2HDI_SPROFILE_AES_ECB_CLEARTAIL,
382         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
383         //.capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV2_CONFIGURE_CAPABILITY_FLAG),
384         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
385     },
386 
387 
388     {
389         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
390         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
391         .algorithm_type = NSK2HDI_CMCHANNEL_ESA_ALGORITHM_TYPE,
392         .algorithm = NSK2HDI_SPROFILE_CIPLUS_AES,
393         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
394         //.capability = CMCHANNEL_NSK_All_CAPABILITY,
395         .capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV_WRITEKEY_CAPABILITY_FLAG),
396     },
397 
398     {
399         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
400         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
401         .algorithm_type = NSK2HDI_CMCHANNEL_ESA_ALGORITHM_TYPE,
402         .algorithm = NSK2HDI_SPROFILE_SCTE41_DES,
403         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
404         //.capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV2_CONFIGURE_CAPABILITY_FLAG),
405         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
406     },
407 
408     {
409         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
410         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
411         .algorithm_type = NSK2HDI_CMCHANNEL_ESA_ALGORITHM_TYPE,
412         .algorithm = NSK2HDI_SPROFILE_SCTE52_DES,
413         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
414         .capability = CMCHANNEL_NSK_All_CAPABILITY,
415     },
416 
417     {
418         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
419         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
420         .algorithm_type = NSK2HDI_CMCHANNEL_ESA_ALGORITHM_TYPE,
421         .algorithm = NSK2HDI_SPROFILE_TDES_ECB_CLEARTAIL,
422         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
423         //.capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV2_CONFIGURE_CAPABILITY_FLAG),
424         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
425     },
426 
427 
428     {
429         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
430         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
431         .algorithm_type = NSK2HDI_CMCHANNEL_ESA_ALGORITHM_TYPE,
432         .algorithm = NSK2HDI_SPROFILE_MULTI2_TS,
433         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
434         //.capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV2_CONFIGURE_CAPABILITY_FLAG),
435         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
436     },
437 //-------------------------------ESA---------------------------------------//
438 //24
439 
440 //-------------------------------LDA---------------------------------------//
441     {
442         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
443         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
444         .algorithm_type = NSK2HDI_CMCHANNEL_LDA_ALGORITHM_TYPE,
445         .algorithm = NSK2HDI_SPROFILE_CPCM_LSA_MDI_CBC,
446         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
447         //.capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
448         .capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV_WRITEKEY_CAPABILITY_FLAG),
449     },
450 
451         {
452         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
453         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
454         .algorithm_type = NSK2HDI_CMCHANNEL_LDA_ALGORITHM_TYPE,
455         .algorithm = NSK2HDI_SPROFILE_CPCM_LSA_MDI_RCBC,
456         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
457         //.capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
458         .capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV_WRITEKEY_CAPABILITY_FLAG),
459     },
460 
461     {
462         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
463         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
464         .algorithm_type = NSK2HDI_CMCHANNEL_LDA_ALGORITHM_TYPE,
465         .algorithm = NSK2HDI_SPROFILE_CPCM_LSA_MDD_CBC,
466         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
467         //.capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
468         .capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV_WRITEKEY_CAPABILITY_FLAG),
469     },
470 
471     {
472         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
473         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
474         .algorithm_type = NSK2HDI_CMCHANNEL_LDA_ALGORITHM_TYPE,
475         .algorithm = NSK2HDI_SPROFILE_CPCM_LSA_MDD_RCBC,
476         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
477         //.capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
478         .capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV_WRITEKEY_CAPABILITY_FLAG),
479     },
480 
481     {
482         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
483         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
484         .algorithm_type = NSK2HDI_CMCHANNEL_LDA_ALGORITHM_TYPE,
485         .algorithm = NSK2HDI_SPROFILE_SYNAMEDIA_AES,
486         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
487         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG ,
488     },
489 
490     {
491         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
492         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
493         .algorithm_type = NSK2HDI_CMCHANNEL_LDA_ALGORITHM_TYPE,
494         .algorithm = NSK2HDI_SPROFILE_AES_ECB_CLEARTAIL,
495         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
496         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG,
497     },
498 
499     {
500         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
501         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
502         .algorithm_type = NSK2HDI_CMCHANNEL_LDA_ALGORITHM_TYPE,
503         .algorithm = NSK2HDI_SPROFILE_CIPLUS_AES,
504         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
505         //.capability = CMCHANNEL_NSK_All_CAPABILITY,
506         .capability = (NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV1_CONFIGURE_CAPABILITY_FLAG | NSK2HDI_CMCHANNEL_IV_WRITEKEY_CAPABILITY_FLAG),
507     },
508 
509     {
510         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
511         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
512         .algorithm_type = NSK2HDI_CMCHANNEL_LDA_ALGORITHM_TYPE,
513         .algorithm = NSK2HDI_SPROFILE_SCTE41_DES,
514         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
515         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG ,
516     },
517 
518     {
519         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
520         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
521         .algorithm_type = NSK2HDI_CMCHANNEL_LDA_ALGORITHM_TYPE,
522         .algorithm = NSK2HDI_SPROFILE_SCTE52_DES,
523         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
524         .capability = CMCHANNEL_NSK_All_CAPABILITY,
525     },
526 
527     {
528         .descriptor_tag = NSK2HDI_CMCHANNELGROUP_ALGORITHM_RECORD_DESC_TAG,
529         .descriptor_length = sizeof(cmchannel_group_algorithm_record_descriptor_t) - 2,
530         .algorithm_type = NSK2HDI_CMCHANNEL_LDA_ALGORITHM_TYPE,
531         .algorithm = NSK2HDI_SPROFILE_TDES_ECB_CLEARTAIL,
532         .parity_combination_bitmap = NSK2HDI_CMCHANNEL_WITH_ALL_PARITY,
533         .capability = NSK2HDI_CMCHANNEL_NSK_CAPABILITY_FLAG ,
534     },
535 
536 //-------------------------------LDA---------------------------------------//
537 //34
538 
539 };
540 
541 static M2MChGr_Capa_Desc_t m2m_capa_desc = {
542     .descriptor_tag = NSK2HDI_M2MCHANNELGROUP_CAPABILITY_DESC_TAG,
543     .descriptor_length = sizeof(M2MChGr_Capa_Desc_t) - 2,
544     .number_of_channels[3] = 0x1,
545     .user_context[0] = 0x4e,
546     .user_context[1] = 0x44,
547     .user_context[2] = 0x53,
548     .user_context[3] = 0x5f,
549     .user_context[4] = 0x44,
550     .user_context[5] = 0x52,
551     .user_context[6] = 0x4d,
552     .user_context[7] = 0x00,
553 };
554 
555 static M2MChGr_AlgoRecord_Desc_t m2m_algo[] =
556 {
557     {
558         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
559         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
560         .algorithm = NSK2HDI_SPROFILE_M2M_DES_ECB_CLR_CLR,
561         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
562     },
563 
564     {
565         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
566         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
567         .algorithm = NSK2HDI_SPROFILE_M2M_DES_CBC_SCTE52_IV1,
568         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
569     },
570 
571     {
572         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
573         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
574         .algorithm = NSK2HDI_SPROFILE_M2M_DES_CBC_SCTE52_IV2,
575         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
576     },
577 
578     {
579         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
580         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
581         .algorithm = NSK2HDI_SPROFILE_M2M_DES_CBC_CLR_CLR,
582         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
583     },
584 
585     {
586         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
587         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
588         .algorithm = NSK2HDI_SPROFILE_M2M_TDES_ECB_CLR_CLR,
589         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
590     },
591 
592     {
593         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
594         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
595         .algorithm = NSK2HDI_SPROFILE_M2M_TDES_CBC_SCTE52_IV1,
596         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
597     },
598 
599     {
600         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
601         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
602         .algorithm = NSK2HDI_SPROFILE_M2M_TDES_CBC_SCTE52_IV2,
603         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
604     },
605 
606     {
607         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
608         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
609         .algorithm = NSK2HDI_SPROFILE_M2M_TDES_CBC_CLR_CLR,
610         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
611     },
612 
613     {
614         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
615         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
616         .algorithm = NSK2HDI_SPROFILE_M2M_AES_ECB_CLR_CLR,
617         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
618     },
619 
620     {
621         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
622         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
623         .algorithm = NSK2HDI_SPROFILE_M2M_AES_CBC_CTS_IV1,
624         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
625     },
626 
627     {
628         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
629         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
630         .algorithm = NSK2HDI_SPROFILE_M2M_AES_CBC_CTS_CLR,
631         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
632     },
633 
634     {
635         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
636         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
637         .algorithm = NSK2HDI_SPROFILE_M2M_AES_CBC_SCTE52_IV1,
638         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
639     },
640 
641     {
642         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
643         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
644         .algorithm = NSK2HDI_SPROFILE_M2M_AES_CBC_SCTE52_CLR,
645         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
646     },
647 
648     {
649         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
650         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
651         .algorithm = NSK2HDI_SPROFILE_M2M_AES_CBC_CLR_CLR,
652         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
653     },
654 
655     {
656         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
657         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
658         .algorithm = NSK2HDI_SPROFILE_M2M_RC4_64,
659         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
660     },
661 
662     {
663         .descriptor_tag = NSK2HDI_M2MCHANNEL_OPERATION_DESC_TAG,
664         .descriptor_length = sizeof(M2MChGr_AlgoRecord_Desc_t) - 2,
665         .algorithm = NSK2HDI_SPROFILE_M2M_AES_CTR,
666         .capability[3] = (NSK2HDI_M2MCHANNELGROUP_NSK_CAPABILITY_FLAG | NSK2HDI_M2MCHANNELGROUP_NON_NSK_CAPABILITY_FLAG),
667     },
668 };
669 
670 
671 static DMA_Capa_Desc_t dma_capa_desc = {
672     .descriptor_tag = NSK2HDI_DMA_CAPABILITY_DESC_TAG,
673     .descriptor_length = sizeof(DMA_Capa_Desc_t) - 2,
674     .maximum_data_size[0] = 0,
675     .maximum_data_size[1] = 0,
676     .maximum_data_size[2] = 0,
677     .maximum_data_size[3] = 1,
678     .minimum_data_size[0] = 0x01,
679     .data_size_granularity[0] = 0x4,
680     .data_alignment[0] = 0x4,
681     .capability[0] = NSK2HDI_DMA_CONTIGUOUS_MEMORY_TYPE,
682 };
683 ////////////////////////////////////////////////////////////////////////////////
684 // Global variable
685 ////////////////////////////////////////////////////////////////////////////////
686 
687 
688 
689 ////////////////////////////////////////////////////////////////////////////////
690 // Extern Function
691 ////////////////////////////////////////////////////////////////////////////////
692 
693 extern MS_U32 TSP32_IdrR(TSP32 *preg);
694 extern void TSP32_IdrW(TSP32 *preg, MS_U32 value);
695 extern int ChkForNskTest(volatile unsigned int *OtpMemBase, volatile unsigned int *RSABase,
696                          volatile unsigned int *NIBase, volatile unsigned int *CCh0Base);
697 extern int HW_CompareKTvalid(unsigned int pid_no, unsigned int scb, unsigned int compare, volatile unsigned int *KTBase);
698 extern void acpu_w_pidslotmap (unsigned char indx, unsigned char wmux, unsigned char wdata, volatile unsigned int *KTBase);
699 extern void acpu_r_keyslot (unsigned char key_indx, unsigned char key_field, volatile unsigned int *KTBase);
700 
701 
702 ////////////////////////////////////////////////////////////////////////////////
703 // Function Declaration
704 ////////////////////////////////////////////////////////////////////////////////
705 
706 ////////////////////////////////////////////////////////////////////////////////
707 // Local Function
708 ////////////////////////////////////////////////////////////////////////////////
709 
710 
HAL_NSK2_ReadReg(MS_U32 u32RegAddr)711 static MS_U32 HAL_NSK2_ReadReg(MS_U32 u32RegAddr)
712 {
713     if(_gReset == FALSE)
714         return 0;
715     MS_U32 u32reg;
716     MS_U32 u32Data;
717     u32reg = u32RegAddr + _gNSK2_Addr;
718     u32Data = (*(volatile MS_U32*)(u32reg));
719 
720     HALNSK2_DBG(NSK2_DBGLV_ARRAY, "read NSK2 %x = %x\n",u32RegAddr,u32Data);
721 
722     return u32Data;
723 }
724 
HAL_NSK2_WriteReg(MS_U32 u32RegAddr,MS_U32 u32Data)725 static void HAL_NSK2_WriteReg(MS_U32 u32RegAddr,MS_U32 u32Data)
726 {
727     if(_gReset == FALSE)
728         return ;
729     MS_U32 u32reg;
730     u32reg = u32RegAddr + _gNSK2_Addr;
731     (*(volatile MS_U32*)(u32reg)) = u32Data;
732 
733     HALNSK2_DBG(NSK2_DBGLV_ARRAY, "write NSK2 %x = %x\n",u32RegAddr,u32Data);
734 }
735 
HAL_NSK2_KIW_BusyPolling(void)736 static MS_U32 HAL_NSK2_KIW_BusyPolling(void)
737 {
738     MS_U32 xiu_rdata;
739     MS_U32 cnt = 0;
740 
741     xiu_rdata = NI_REG(REG_NI_STATUS);
742     while( (xiu_rdata & NI_KIW_BUSY) && (cnt < POLLING_CNT) )
743     {
744         xiu_rdata = NI_REG(REG_NI_STATUS);
745         HALNSK2_DBG(NSK2_DBGLV_INFO," read NI (STATUS = %x)\n",xiu_rdata);
746 
747         cnt ++;
748         MsOS_DelayTask(1);
749     }
750 
751     if(cnt >= POLLING_CNT)
752     {
753         HALNSK2_DBG(NSK2_DBGLV_ERR,"KIW_BusyPolling TimeOut\n");
754         return FALSE;
755     }
756     else
757     {
758         return TRUE;
759     }
760 }
761 
HAL_NSK2_CheckBusy(void)762 static MS_U32 HAL_NSK2_CheckBusy(void)
763 {
764     //printf("_gCheckBusyFlag = %x\n",_gCheckBusyFlag);
765 	if(_gCheckBusyFlag == TRUE)
766 	{
767         MS_U32 cnt = 0;
768 
769         while( (cnt < BUSYCHECK_CNT) && (HAL_NSK2_ReadReg(REG_NSK2_ACPU_WARNING) & NSK2_ACPU_BUSY) )
770         {
771             cnt ++;
772             MsOS_DelayTaskUs(1);
773         }
774 
775         if(cnt == BUSYCHECK_CNT)
776         {
777             HALNSK2_DBG(NSK2_DBGLV_ERR, "NSK2 is still busy\n");
778             return FALSE;
779         }
780 	}
781 	else
782 	{
783 		HALNSK2_DBG(NSK2_DBGLV_DEBUG, "NSK2 does't check busy\n");
784 	}
785     return TRUE;
786 }
787 
788 
HAL_NSK2_DeadPolling(void)789 static void HAL_NSK2_DeadPolling(void)
790 {
791     MS_U32 polling_cnt = dead_polling_cnt;
792     while(polling_cnt){
793         MsOS_DelayTask(10);
794         HALNSK2_DBG(NSK2_DBGLV_ERR, "Error, Dead Polling\n");
795         polling_cnt --;
796     }
797 
798     //read ACPU Error....
799     printf("ACPU Error = %x\n", HAL_NSK2_ReadReg(REG_NSK2_ACPU_ERROR));
800 
801 }
802 
803 
HAL_NSK2_OTP_Get(MS_U32 Addr,MS_U8 Msb,MS_U8 Lsb,MS_U32 * pValue)804 void HAL_NSK2_OTP_Get(MS_U32 Addr, MS_U8 Msb, MS_U8 Lsb, MS_U32 *pValue)
805 {
806     MS_U32 u32Data;
807 
808     u32Data = OTP_REG(Addr);
809 
810     //read back first....
811     HALNSK2_DBG(NSK2_DBGLV_DEBUG, "read OTP %x = %x\n",Addr,u32Data);
812 
813     //write value next
814 
815     if( (Msb == 31) && (Lsb == 0) )
816     {
817         *pValue = u32Data;
818     }
819     else
820     {
821         *pValue = ((u32Data & BMASK(Msb:Lsb) ) >> Lsb);
822     }
823 
824 }
825 
826 ////////////////////////////////////////////////////////////////////////////////
827 // Global Function
828 ////////////////////////////////////////////////////////////////////////////////
829 
HAL_NSK2_Init(void)830 MS_U32 HAL_NSK2_Init(void)
831 {
832     MS_U32 u32Data;
833 
834 
835 //enable NSK2 clock
836 //RSA address 1 bit[1] bit[1]: PM_NSKClkEnable
837     //if(MDrv_SYS_GetChipRev() == 0x1)
838     {
839         //K3SU01
840         RSA_REG(REG_RSA_CLK_ENABLE) |= RSA_PM_NSKCLK_ENABLE;
841         MsOS_DelayTaskUs(1);
842 
843         u32Data = RSA_REG(REG_RSA_CLK_ENABLE);
844         HALNSK2_DBG(NSK2_DBGLV_DEBUG, "RSA 0x1 = %x\n",u32Data);
845     }
846 
847 #if 0
848 //disable reset NSK2
849     u32Data = NI_REG(REG_NI_NSK2_CTRL);
850     HALNSK2_DBG(NSK2_DBGLV_DEBUG, "NI 0x0 = %x\n",u32Data);
851 
852     u32Data &= (~NI_N2ROM_PD);
853     u32Data &= (~NI_N2ROM_PD);
854 
855 
856 //bit 0 set to 1...
857     NI_REG(REG_NI_NSK2_CTRL) = u32Data | NI_TS2NSK_ENABLE | NI_NSK2_CLK_ENABLE | NI_NSK2_RESET_DISABLE;
858 
859     MsOS_DelayTaskUs(1);
860     u32Data = NI_REG(REG_NI_NSK2_CTRL);
861     HALNSK2_DBG(NSK2_DBGLV_DEBUG, "NI 0x0 = %x\n",u32Data);
862 
863     HAL_NSK2_EnableInt();
864 #endif
865 
866 
867 //self test....
868 #ifdef NSK2SelfTest
869     NI_REG(REG_NI_NSK2_FREERUN) |= NI_NSK2_FREERUN_ENABLE;
870 
871 
872     MsOS_DelayTaskUs(1);
873     u32Data = NI_REG(REG_NI_NSK2_FREERUN);
874     HALNSK2_DBG(NSK2_DBGLV_DEBUG, "NI 0x1 = %x\n",u32Data);
875 #endif
876 
877 
878 
879     HALNSK2_DBG(NSK2_DBGLV_DEBUG,"finish NSK2.1 init\n");
880 
881     return TRUE;
882 }
883 
HAL_NSK2_UnlockOTPCtrl(void)884 MS_U32 HAL_NSK2_UnlockOTPCtrl(void)
885 {
886     HALNSK2_DBG(NSK2_DBGLV_INFO, "OTP control to unlock NDS secret key\n");
887     OTP_CTRL_REG(0x10) = 0x99885a5a;
888     OTP_CTRL_REG(0x11) = 0x00114433;
889     OTP_CTRL_REG(0x12) = 0x23456789;
890     OTP_CTRL_REG(0x13) = 0xabcdef01;
891 
892     return TRUE;
893 }
894 
HAL_NSK2_ColdReset(void)895 MS_U32 HAL_NSK2_ColdReset(void)
896 {
897     MS_U32 u32Data;
898 
899     HALNSK2_DBG(NSK2_DBGLV_DEBUG, "%s \n",__FUNCTION__);
900     u32Data = NI_REG(REG_NI_NSK2_CTRL);
901 
902     NI_REG(REG_NI_NSK2_CTRL) = (u32Data & (~NI_NSK2_RESET_DISABLE));
903     MsOS_DelayTaskUs(1);
904 
905     u32Data &= (~NI_N2ROM_PD);
906     u32Data &= (~NI_N2ROM_PD);
907 
908 //bit 0 set to 1...
909     NI_REG(REG_NI_NSK2_CTRL) = u32Data | NI_TS2NSK_ENABLE | NI_NSK2_CLK_ENABLE | NI_NSK2_RESET_DISABLE;
910 
911     MsOS_DelayTaskUs(1);
912 
913     u32Data = NI_REG(REG_NI_NSK2_CTRL);
914     HALNSK2_DBG(NSK2_DBGLV_DEBUG, "NI 0x0 = %x\n",u32Data);
915 
916     _gReset = TRUE;
917     _gCheckBusyFlag = TRUE;
918 
919     HAL_NSK2_EnableInt();
920     return TRUE;
921 }
922 
923 
HAL_NSK2_EndSubtest(void)924 MS_U32 HAL_NSK2_EndSubtest(void)
925 {
926     MS_U32 u32Data;
927 
928     HALNSK2_DBG(NSK2_DBGLV_DEBUG, "%s \n",__FUNCTION__);
929 
930     HAL_NSK2_DisableInt();
931 
932     u32Data = NI_REG(REG_NI_NSK2_CTRL);
933     HALNSK2_DBG(NSK2_DBGLV_DEBUG, "REG_NI_NSK2_CTRL = %x \n",u32Data);
934 
935     if(u32Data & NI_NSK2_RESET_DISABLE)
936     {
937 
938         NI_REG(REG_NI_NSK2_CTRL) = (u32Data & (~NI_NSK2_RESET_DISABLE));
939         //NI_REG(REG_NI_NSK2_CTRL) = 0;
940         //printf("wait here\n");
941         //while(1);
942         MsOS_DelayTaskUs(1);
943     }
944 
945     _gReset = FALSE;
946     _gCheckBusyFlag = FALSE;
947     return TRUE;
948 }
949 
950 
HAL_NSK2_SetBase(MS_U32 u32Base)951 void HAL_NSK2_SetBase(MS_U32 u32Base)
952 {
953     HALNSK2_DBG(NSK2_DBGLV_INFO, "u32Base = %x\n",u32Base);
954 
955     _gBasicAddr = u32Base;
956 
957     _gOTP_Addr  = _gBasicAddr + REG_OTP_BASE;
958     _gRSA_Addr  = _gBasicAddr + REG_RSA_BASE;
959     _gOTP_CTRL_Addr  = _gBasicAddr + REG_OTP_CTRL_BASE;
960     _gNSK2_Addr = _gBasicAddr + REG_NSK2_BASE;
961 
962     _gNI_Addr   = _gBasicAddr + REG_NI_BASE;
963 
964     _gKeyTable_Addr  = _gBasicAddr + REG_KEY_TABLE_BASE;
965     _gNDSJTagPwd_Addr= _gBasicAddr + REG_JTAG_PWD_BASE;
966     _gCipherCH0_Addr = _gBasicAddr + REG_CIPHER_CH0_BASE;
967     _gCryptoDMA_Addr = _gBasicAddr + REG_CRYPTO_DMA_BASE;
968     HALNSK2_DBG(NSK2_DBGLV_INFO, "%s _gNSK2_Addr : %x\n", __FUNCTION__, _gNSK2_Addr);
969 }
970 
971 
972 
973 
974 //compare the contect of a buffer in the NSK2's memory map to an expected value.
HAL_NSK2_CompareMem(MS_U32 reserved,MS_U32 StartAddr,MS_U32 CompareLens,MS_U32 CompareSim,MS_U32 ExpectResult,void * pGolden)975 MS_U32 HAL_NSK2_CompareMem(MS_U32 reserved, MS_U32 StartAddr, MS_U32 CompareLens,
976                            MS_U32 CompareSim, MS_U32 ExpectResult, void *pGolden)
977 {
978     MS_U32 u32ReadData, u32GoldenData;
979     MS_U32 u32Addr = StartAddr;
980     MS_U32 *pGoldenData = (MS_U32 *)pGolden;
981     MS_U32 u32CompLens = CompareLens;
982     MS_U32 status = TRUE;
983     HALNSK2_DBG(NSK2_DBGLV_DEBUG,"%s \n",__FUNCTION__);
984     //check lengths
985     if(u32CompLens == 0)
986     {
987         HALNSK2_DBG(NSK2_DBGLV_DEBUG,"%s CompareLens = %x\n",__FUNCTION__,u32CompLens);
988     }
989 
990     do
991     {
992         HAL_NSK2_CheckBusy();
993 
994         u32ReadData = HAL_NSK2_ReadReg(u32Addr);
995         u32GoldenData =  *pGoldenData;
996 
997         if(u32ReadData != u32GoldenData)
998         {
999             HALNSK2_DBG(NSK2_DBGLV_ERR,"%s, Addr = %x, u32ReadData = %x, u32GoldenData = %x\n",__FUNCTION__,u32Addr, u32ReadData, u32GoldenData);
1000             HAL_NSK2_DeadPolling();
1001             //return FALSE;
1002             status = FALSE;
1003         }
1004         else
1005         {
1006             HALNSK2_DBG(NSK2_DBGLV_DEBUG,"Data Correct, Addr = %x, u32GoldenData = %x\n",u32Addr, u32GoldenData);
1007         }
1008 
1009         pGoldenData ++;
1010         u32Addr += 4;
1011         u32CompLens --; //32 bit bus
1012 
1013     } while(u32CompLens > 0);
1014 
1015     HALNSK2_DBG(NSK2_DBGLV_DEBUG,"%s, successful = %x\n",__FUNCTION__,StartAddr);
1016     return status;
1017 }
1018 
HAL_NSK2_Compare(MS_U32 StartAddr,MS_U32 CompareLens,MS_U32 CompareSim,MS_U32 Mask,MS_U32 ExpectResult)1019 MS_U32 HAL_NSK2_Compare(MS_U32 StartAddr, MS_U32 CompareLens, MS_U32 CompareSim,
1020                         MS_U32 Mask, MS_U32 ExpectResult)
1021 {
1022 
1023     MS_U32 u32ReadData, u32GoldenData = ExpectResult;
1024     MS_U32 u32Addr = StartAddr;
1025 
1026     StatusCheck(HAL_NSK2_CheckBusy());
1027 
1028     u32ReadData = HAL_NSK2_ReadReg(u32Addr);
1029     HALNSK2_DBG(NSK2_DBGLV_DEBUG,"Mask = %x\n",Mask);
1030     u32ReadData &= Mask;
1031 
1032     if(u32ReadData != u32GoldenData)
1033     {
1034         HALNSK2_DBG(NSK2_DBGLV_ERR,"%s fail, Addr = %x, u32ReadData = %x, u32GoldenData = %x\n",__FUNCTION__,u32Addr, u32ReadData, u32GoldenData);
1035         HAL_NSK2_DeadPolling();
1036         return FALSE;
1037     }
1038     else
1039     {
1040         HALNSK2_DBG(NSK2_DBGLV_DEBUG,"compare data correct, Addr = %x, u32GoldenData = %x\n",u32Addr,u32GoldenData);
1041     }
1042 
1043     HALNSK2_DBG(NSK2_DBGLV_DEBUG,"%s, successful\n",__FUNCTION__);
1044     return TRUE;
1045 }
1046 
HAL_NSK2_WriteMem(MS_U32 reserved,MS_U32 StartAddr,MS_U32 WriteLens,void * pWriteData)1047 MS_U32 HAL_NSK2_WriteMem(MS_U32 reserved, MS_U32 StartAddr, MS_U32 WriteLens,
1048                          void *pWriteData)
1049 {
1050 
1051     MS_U32 *pWriteD = (MS_U32 *)pWriteData;
1052     MS_U32 u32Data;
1053     while(WriteLens > 0)
1054     {
1055         StatusCheck(HAL_NSK2_CheckBusy());
1056 
1057         u32Data = *pWriteD ;
1058 
1059         HAL_NSK2_WriteReg(StartAddr,u32Data);
1060         HALNSK2_DBG(NSK2_DBGLV_ARRAY,"WriteMem (Addr,Data) = (%x,%x)\n",StartAddr,u32Data);
1061 
1062         WriteLens --;
1063         StartAddr += 4;
1064         pWriteD ++;
1065     }
1066 
1067     StatusCheck(HAL_NSK2_CheckBusy());
1068     return TRUE;
1069 }
1070 
HAL_NSK2_WriteSFR(MS_U32 StartAddr,MS_U32 Data)1071 MS_U32 HAL_NSK2_WriteSFR(MS_U32 StartAddr, MS_U32 Data)
1072 {
1073     StatusCheck(HAL_NSK2_CheckBusy());
1074     HALNSK2_DBG(NSK2_DBGLV_ARRAY,"WriteSFR (Addr,Data) = (%x,%x)\n",StartAddr,Data);
1075     HAL_NSK2_WriteReg(StartAddr,Data);
1076     StatusCheck(HAL_NSK2_CheckBusy());
1077     return TRUE;
1078 }
1079 
HAL_NSK2_NSKBasicInitializationComplete(void)1080 MS_U32 HAL_NSK2_NSKBasicInitializationComplete(void)
1081 {
1082     //$display($time,"NS  NSKBasicInitializationComplete ");
1083     //xiu_w_ni(16'h6,4'b0001,32'h0000000F);
1084 
1085     MS_U32 data;
1086     HALNSK2_DBG(NSK2_DBGLV_INFO,"HAL_NSK2_NSKBasicInitializationComplete\n");
1087     StatusCheck(HAL_NSK2_CheckBusy());
1088 
1089     data = NI_REG(REG_NI_COMMAND);
1090     //NI_REG(REG_NI_COMMAND) = (data | NI_NSKBIComplete | NI_COMMAND_START);
1091     NI_REG(REG_NI_COMMAND) = (NI_NSKBIComplete | NI_COMMAND_START);
1092 
1093     MsOS_DelayTaskUs(1);
1094     //NI_REG(REG_NI_COMMAND) = (NI_COMMAND_START | NI_NopNop);
1095     NI_REG(REG_NI_NSK2_CLK_CSA) = NSK2_EN_CSA_VAR;
1096 
1097 
1098     return TRUE;
1099 }
1100 
HAL_NSK2_SCBTransToHW(MS_U8 ForceSCB)1101 MS_U8 HAL_NSK2_SCBTransToHW(MS_U8 ForceSCB)
1102 {
1103 	MS_U8 NewForceSCB = 0;
1104 
1105 	NewForceSCB = ForceSCB;
1106 	if(ForceSCB == 0)
1107 	{
1108 		NewForceSCB = 1;
1109 	}
1110 	else if(ForceSCB == 1)
1111 	{
1112 		NewForceSCB = 0;
1113 	}
1114 
1115 	return NewForceSCB;
1116 }
1117 
1118 
HAL_NSK2_WriteESA(MS_U8 ESASelect,MS_U8 ESASubSelect,MS_U8 pid_no)1119 MS_U32 HAL_NSK2_WriteESA(MS_U8 ESASelect, MS_U8 ESASubSelect, MS_U8 pid_no)
1120 {
1121 #if 0
1122     HALNSK2_DBG(NSK2_DBGLV_INFO,"HAL_NSK2_WriteESA pid_no = %x, ESASelect = %x, ESASubSelect = %x\n",pid_no, ESASelect, ESASubSelect);
1123     //scb = 2'b00; pid_no = 1; ESAselect = 4'h0; ESAsubselect =4'h0;
1124     //wdata = {10'b0,ESAselect[3:0],ESAsubselect[2:0],3'b0,pid_no[12:0]};
1125     //xiu_w_ni(16'h7,4'b1111,wdata[31:0]);
1126     //xiu_w_ni(16'h6,4'b1111,32'h00000003);
1127     //xiu_rdata = 32'h8; while(xiu_rdata[3]===1'b1)begin xiu_r_ni(16'hc); end
1128     StatusCheck(HAL_NSK2_CheckBusy());
1129 
1130     MS_U32 data;
1131 
1132     HALNSK2_DBG(NSK2_DBGLV_INFO,"HAL_NSK2_WriteESA pid_no = %x\n",pid_no);
1133     data = (((MS_U32)ESASelect<<NI_WriteESA_ESASel_Shift) & NI_WriteESA_ESASel_MASK) +
1134            (((MS_U32)ESASubSelect<<NI_WriteESA_ESASubSel_Shift) & NI_WriteESA_ESASubSel_MASK)  +
1135            ((MS_U32)pid_no & NI_WriteESA_PidNo);
1136 
1137 
1138     HALNSK2_DBG(NSK2_DBGLV_INFO," write NI (REG_NI_PARAMETERS = %x)\n",data);
1139     NI_REG(REG_NI_PARAMETERS) = data;
1140     NI_REG(REG_NI_COMMAND) = (NI_COMMAND_START | NI_WriteESA);
1141 
1142     StatusCheck(HAL_NSK2_KIW_BusyPolling());
1143 #endif
1144     return TRUE;
1145 }
1146 
HAL_NSK2_WriteTransportKey(MS_U8 SCB,MS_U8 ForceSCB,void * pLabel,MS_U8 pid_no)1147 MS_U32 HAL_NSK2_WriteTransportKey(MS_U8 SCB, MS_U8 ForceSCB, void *pLabel, MS_U8 pid_no)
1148 {
1149 #if 0
1150     //$display($time,"NS  WriteTransportKey 0134 00 01 IV__0");
1151     //wait_nsk_busy;
1152     //xiu_r_ni(16'hd);
1153     //if((xiu_rdata & 7)==0) begin
1154     //    scb = 2'b00; fscb = 2'b00; pid_no = 1;
1155     //    wdata = {12'b0,fscb[1:0],scb[1:0],3'b0,pid_no[12:0]};
1156     //    xiu_w_ni(16'h7,4'b1111,wdata[31:0]);
1157     //    xiu_w_ni(16'hb,4'b1111,32'h00000000);
1158     //    xiu_w_ni(16'ha,4'b1111,32'h00000000);
1159     //    xiu_w_ni(16'h9,4'b1111,32'h00000000);
1160     //    xiu_w_ni(16'h8,4'b1111,32'h00000000);
1161     //    xiu_w_ni(16'h6,4'b1111,32'h00000005);
1162     //    xiu_rdata = 32'h8; while(xiu_rdata[3]===1'b1)begin xiu_r_ni(16'hc); end
1163     //end
1164     //else $display("WriteTransportKey abnormal ignored: KteDest not zero");
1165 #define N  0xfffffff0
1166 #define N1 0xfffffff1
1167 #define N2 0xfffffff2
1168 
1169     MS_U32 data = 0;
1170     MS_U32 data2 = 0;
1171 	MS_U32 pIV[4] = {0,0,0,0};
1172 
1173 	MS_U32* pIV_copy = (MS_U32*)pLabel;
1174 
1175 	if((pLabel != NULL) && (pLabel != (MS_U32*)N) && (pLabel != (MS_U32*)N1) && (pLabel != (MS_U32*)N2))
1176 	{
1177 		memcpy(pIV,pIV_copy,16);
1178 	}
1179 
1180     HALNSK2_DBG(NSK2_DBGLV_INFO,"HAL_NSK2_WriteTransportKey pid_no = %x, SCB = %x, ForceSCB = %x\n",pid_no, SCB, ForceSCB);
1181     StatusCheck(HAL_NSK2_CheckBusy());
1182 
1183     data = NI_REG(REG_NI_KTE_STATUS);
1184     if( ( data & NI_KTE_DEST_MASK ) == 0  )
1185     {
1186 
1187 		ForceSCB = HAL_NSK2_SCBTransToHW(ForceSCB);
1188 
1189         HALNSK2_DBG(NSK2_DBGLV_INFO,"pid_no: %x\n", pid_no);
1190         data2 = pid_no + ( ( (MS_U32)SCB<<NI_WriteTKey_SCB_Shift) & NI_WriteTKey_SCB_MASK)
1191                 + ( ( (MS_U32)ForceSCB<<NI_WriteTKey_FSCB_Shift) & NI_WriteTKey_FSCB_MASK) ;
1192 
1193 
1194         NI_REG(REG_NI_PARAMETERS) = data2;
1195         NI_REG(REG_NI_IV_127_96) = pIV[0];
1196         NI_REG(REG_NI_IV_95_64) = pIV[1];
1197         NI_REG(REG_NI_IV_63_31) = pIV[2];
1198         NI_REG(REG_NI_IV_31_00) = pIV[3];
1199         NI_REG(REG_NI_COMMAND) = (NI_COMMAND_START | NI_WriteTransportKey);
1200 
1201         HALNSK2_DBG(NSK2_DBGLV_INFO,"NI 7 : %x, NI 6 = %x\n", NI_REG(REG_NI_PARAMETERS) , NI_REG(REG_NI_COMMAND));
1202 
1203         StatusCheck(HAL_NSK2_KIW_BusyPolling());
1204     }
1205     else
1206     {
1207         HALNSK2_DBG(NSK2_DBGLV_ERR,"WriteTransportKey abnormal ignored: KteDest not zero\n");
1208         return FALSE;
1209     }
1210 
1211     HAL_NSK2_ReadSwitchFromNSK2();
1212 #endif
1213     return TRUE;
1214 }
1215 
HAL_NSK2_wait_kte_valid(void)1216 MS_U32 HAL_NSK2_wait_kte_valid(void)
1217 {
1218     MS_U32 xiu_rdata = HAL_NSK2_ReadReg(REG_NSK2_KTE_VALID);
1219     MS_U32 cnt = 0;
1220     while( ( (xiu_rdata & NSK2_KTE_VALID_TRUE) == 0 ) && (cnt < POLLING_CNT) )
1221     {
1222         xiu_rdata = HAL_NSK2_ReadReg(REG_NSK2_KTE_VALID);
1223         HALNSK2_DBG(NSK2_DBGLV_INFO,"xiu_rdata = %x\n",xiu_rdata);
1224         cnt ++;
1225         MsOS_DelayTask(1);
1226     }
1227 
1228     if(cnt == POLLING_CNT)
1229     {
1230         HALNSK2_DBG(NSK2_DBGLV_ERR,"HAL_NSK2_wait_kte_valid time out\n");
1231         return FALSE;
1232     }
1233 
1234     return TRUE;
1235 }
1236 
HAL_NSK2_CompareKTE(MS_U32 reserved_1,MS_U32 reserved_2,void * pLabel)1237 MS_U32 HAL_NSK2_CompareKTE(MS_U32 reserved_1, MS_U32 reserved_2, void *pLabel)
1238 {
1239 
1240 #ifdef FPGAMode
1241     MS_U32 data;
1242     MS_U32 *pKTEGolden = (MS_U32 *)pLabel;
1243     MS_U32 KTE_Index = REG_KT_KEYS_START_FPGA;
1244     MS_U32 status = TRUE;
1245 
1246     StatusCheck(HAL_NSK2_CheckBusy());
1247     //StatusCheck(HAL_NSK2_wait_kte_valid());
1248     data = NI_REG(REG_NI_NSK2_KTE_VALID_FPGA);
1249     HALNSK2_DBG(NSK2_DBGLV_INFO,"NSK2_KTE_VALID_FPGA = %x\n",data);
1250 
1251     for(KTE_Index = REG_KT_KEYS_END_FPGA; KTE_Index<=REG_KT_KEYS_START_FPGA; KTE_Index--)
1252     {
1253         data = NI_REG(KTE_Index);
1254 
1255         if(data != *pKTEGolden)
1256         {
1257             HALNSK2_DBG(NSK2_DBGLV_ERR," %x, (%x , %x)\n",KTE_Index,data,*pKTEGolden);
1258             status = FALSE;
1259         }
1260 
1261         pKTEGolden ++;
1262     }
1263 
1264     return status;
1265 
1266 #else
1267 
1268 #endif
1269 
1270     return TRUE;
1271 }
1272 
HAL_NSK2_CompareOut(MS_U32 reserved_1,MS_U32 reserved_2,MS_U32 HighDWord,MS_U32 LowDWord)1273 MS_U32 HAL_NSK2_CompareOut(MS_U32 reserved_1, MS_U32 reserved_2, MS_U32 HighDWord, MS_U32 LowDWord)
1274 {
1275 
1276    //wait_nsk_busy;
1277     //$display($time,"NS  CompareOut 1 1 0000001555400000");
1278     //xiu_r_ni(16'd24); genout = xiu_rdata; genout = genout << 32;
1279     //xiu_r_ni(16'd23); genout = genout | {6'b0,xiu_rdata[31:0]};
1280     //$display("CompareOut read PS",genout[37:0]);
1281     //    if(genout!==38'h0000001555400000)begin
1282     //$display("CompareOut Expected=38'h0000001555400000 Read=38'hPS",genout[37:0]);
1283     //    nsk2_GeneralOut_test_fail = 1;
1284     //    #2000;
1285     //$finish;
1286     //end
1287 
1288 
1289     MS_U32 high_data,low_data;
1290     HALNSK2_DBG(NSK2_DBGLV_INFO,"HAL_NSK2_CompareOut HighDWord = %x, LowDWord = %x\n",HighDWord, LowDWord);
1291     StatusCheck(HAL_NSK2_CheckBusy());
1292     low_data = NI_REG(REG_NI_COMPARE_GENOUT_L);
1293     high_data = (NI_REG(REG_NI_COMPARE_GENOUT_H)&NI_GENOUT_H_MASK);
1294     HALNSK2_DBG(NSK2_DBGLV_INFO,"NI 24 = %x , 23 = %x\n",high_data,low_data);
1295 
1296     if( (HighDWord != high_data) || (LowDWord!= low_data) )
1297     {
1298         HAL_NSK2_DeadPolling();
1299         return FALSE;
1300     }
1301     else
1302     {
1303         HALNSK2_DBG(NSK2_DBGLV_INFO,"HAL_NSK2_CompareOut successfully\n");
1304     }
1305 
1306     return TRUE;
1307 }
1308 
HAL_NSK2_SetRNG(MS_U32 reserved_1,MS_U32 RNG_Value)1309 MS_U32 HAL_NSK2_SetRNG(MS_U32 reserved_1,MS_U32 RNG_Value)
1310 {
1311 
1312     HALNSK2_DBG(NSK2_DBGLV_INFO,"HAL_NSK2_SetRNG = %x\n",RNG_Value);
1313     NI_REG(REG_NI_SW_SET_RNG) = (RNG_Value&NI_SW_RNG_MASK);
1314     return TRUE;
1315 }
1316 
HAL_NSK2_WriteM2MKey(void * pIV,MS_U8 SubAlgo)1317 MS_U32 HAL_NSK2_WriteM2MKey(void *pIV, MS_U8 SubAlgo)
1318 {
1319 #if 0
1320     //wait_nsk_busy;
1321     //WriteM2MKey IV__1  0
1322     //$display($time,"NS  WriteM2MKey IV__1  0");
1323     //wdata = {12'b0,4'h0,16'b0};
1324     //xiu_w_ni(16'h7,4'b1111,wdata[31:0]);
1325     //xiu_w_ni(16'hb,4'b1111,32'h00010203);
1326     //xiu_w_ni(16'ha,4'b1111,32'h04050607);
1327     //xiu_w_ni(16'h9,4'b1111,32'h08090a0b);
1328     //xiu_w_ni(16'h8,4'b1111,32'h0c0d0e0f);
1329     //xiu_w_ni(16'h6,4'b1111,32'h00000007);
1330     //xiu_rdata = 32'h8; while(xiu_rdata[3]===1'b1)begin xiu_r_ni(16'hc); end
1331 
1332     HALNSK2_DBG(NSK2_DBGLV_INFO,"HAL_NSK2_WriteM2MKey, SubAlgo = %x \n", SubAlgo);
1333     HAL_NSK2_CheckBusy();
1334 
1335     MS_U32 wdata = 0;
1336     MS_U32 pWIV[4];
1337 
1338     memset(pWIV, 0x0, 4*4);
1339     if(pIV != NULL)
1340     {
1341         memcpy(pWIV,pIV,4*4);
1342     }
1343 
1344 
1345     wdata = ( ((MS_U32)SubAlgo << NI_WriteM2MKey_Shift) & NI_WriteM2MKey_MASK); //write sub algorithm....[19:16]
1346     NI_REG(REG_NI_PARAMETERS) = wdata;
1347 
1348     NI_REG(REG_NI_IV_127_96) = pWIV[0];
1349     NI_REG(REG_NI_IV_95_64)  = pWIV[1];
1350     NI_REG(REG_NI_IV_63_31)  = pWIV[2];
1351     NI_REG(REG_NI_IV_31_00)  = pWIV[3];
1352 
1353     HALNSK2_DBG(NSK2_DBGLV_INFO,"pwIV = (%x, %x, %x, %x)\n",pWIV[0],pWIV[1],pWIV[2],pWIV[3]);
1354     NI_REG(REG_NI_COMMAND) = (NI_COMMAND_START | NI_WriteM2MKey); //write M2M key and start...
1355 #endif
1356     return TRUE;
1357 }
1358 
HAL_NSK2_WriteSCPUKey(void)1359 MS_U32 HAL_NSK2_WriteSCPUKey(void)
1360 {
1361     HALNSK2_DBG(NSK2_DBGLV_INFO,"%s \n", __FUNCTION__);
1362     StatusCheck(HAL_NSK2_CheckBusy());
1363     NI_REG(REG_NI_COMMAND) = (NI_WriteSCPUKey | NI_COMMAND_START);
1364     MsOS_DelayTaskUs(1);
1365 
1366     return HAL_NSK2_ReadKTEResp();
1367 }
1368 
1369 static MS_U32 KeyNum = 0;
HAL_NSK2_WriteReservedKey(void)1370 MS_U32 HAL_NSK2_WriteReservedKey(void)
1371 {
1372     HALNSK2_DBG(NSK2_DBGLV_INFO,"%s \n", __FUNCTION__);
1373     StatusCheck(HAL_NSK2_CheckBusy());
1374     NI_REG(REG_NI_COMMAND) = (NI_WriteReservedKey | NI_COMMAND_START);
1375     MsOS_DelayTaskUs(1);
1376 
1377     printf("write key = %x, %x\n", NI_REG(REG_NI_COMPARE_GENOUT_L), NI_REG(REG_NI_COMPARE_GENOUT_H));
1378     KeyNum = NI_REG(REG_NI_COMPARE_GENOUT_L)>>17;
1379 
1380     return HAL_NSK2_ReadKTEResp();
1381 }
1382 
HAL_NSK2_GetReserveKeyNum(void)1383 MS_U32 HAL_NSK2_GetReserveKeyNum(void)
1384 {
1385     HALNSK2_DBG(NSK2_DBGLV_INFO,"%s KeyNum = %x\n", __FUNCTION__,KeyNum);
1386     return KeyNum;
1387 }
1388 
HAL_NSK2_DriveKteAck(void)1389 MS_U32 HAL_NSK2_DriveKteAck(void)
1390 {
1391     //DriveKteAck
1392     //$display($time,"NS  DriveKteAck");
1393     //xiu_w_ni(16'h6,4'b1111,32'h0000000B);
1394 
1395     StatusCheck(HAL_NSK2_CheckBusy());
1396     HALNSK2_DBG(NSK2_DBGLV_INFO,"%s \n", __FUNCTION__);
1397 
1398     NI_REG(REG_NI_COMMAND) = (NI_COMMAND_START | NI_DriveAck);
1399     MsOS_DelayTaskUs(1);
1400     NI_REG(REG_NI_COMMAND) = (NI_COMMAND_START | NI_NopNop);
1401     StatusCheck(HAL_NSK2_CheckBusy());
1402     return TRUE;
1403 }
1404 
HAL_NSK2_SetJTagPswd(void)1405 MS_U32 HAL_NSK2_SetJTagPswd(void)
1406 {
1407 
1408 #if 0
1409 #define JTagPwd0Addr 0x64
1410 #define InputPwd0Addr 0x4
1411     MS_U32 JTagPwd0[4];
1412 
1413     NDSJTagPwd_REG(3) = 0x0;
1414     NDSJTagPwd_REG(2) = 0x0;
1415     NDSJTagPwd_REG(1) = 0x0;
1416     NDSJTagPwd_REG(0) = 0x1;
1417 
1418     NDSJTagPwd_REG(0x14) = 0x1;
1419 
1420     JTagPwd0[0] = KeyTable_REG(JTagPwd0Addr);
1421     JTagPwd0[1] = KeyTable_REG((JTagPwd0Addr+1));
1422     JTagPwd0[2] = KeyTable_REG((JTagPwd0Addr+2));
1423     JTagPwd0[3] = KeyTable_REG((JTagPwd0Addr+3));
1424 
1425     HALNSK2_DBG(0,"JTagPwd0 = %x, %x, %x, %x\n",JTagPwd0[0],JTagPwd0[1],JTagPwd0[2],JTagPwd0[3]);
1426 
1427     NDSJTagPwd_REG((InputPwd0Addr+7)) = (MS_U16) ((JTagPwd0[3]>>16)&0xffff);
1428     NDSJTagPwd_REG((InputPwd0Addr+6)) = (MS_U16) (JTagPwd0[3]&0xffff);
1429     NDSJTagPwd_REG((InputPwd0Addr+5)) = (MS_U16) ((JTagPwd0[2]>>16)&0xffff);
1430     NDSJTagPwd_REG((InputPwd0Addr+4)) = (MS_U16) (JTagPwd0[2]&0xffff);
1431     NDSJTagPwd_REG((InputPwd0Addr+3)) = (MS_U16) ((JTagPwd0[1]>>16)&0xffff);
1432     NDSJTagPwd_REG((InputPwd0Addr+2)) = (MS_U16) (JTagPwd0[1]&0xffff);
1433     NDSJTagPwd_REG((InputPwd0Addr+1)) = (MS_U16) ((JTagPwd0[0]>>16)&0xffff);
1434     NDSJTagPwd_REG((InputPwd0Addr+0)) = (MS_U16) (JTagPwd0[0]&0xffff);
1435 
1436     NDSJTagPwd_REG(0x14) = 0x7;
1437 #else
1438     MS_U32 jtag_status;
1439     jtag_status = KeyTable_REG(88);
1440     //88 bit 0 and 1 = 1
1441 
1442     HALNSK2_DBG(NSK2_DBGLV_INFO,"KeyTable 88 jtag_status = %x\n",jtag_status);
1443 #endif
1444 
1445     return TRUE;
1446 }
1447 
1448 //MS_BOOL HAL_CA_OTP_GetCfg(MS_U32 u32Idx, MS_U32 *pu32Value);
1449 
HAL_NSK2_CheckPubOTPConfig(void * pCheck)1450 MS_BOOL HAL_NSK2_CheckPubOTPConfig(void *pCheck)
1451 {
1452 #if 0
1453 OTP bits	OTP name	         function
1454 [127:64]	V_PubOtpUniqueID	 Unique ID, 0x3da8~0x3daf
1455 [63:48]	    V_PubOtpGP	         General Purpose Field (bit-by-bit lock),3b08~3b09
1456 [47:40]	    V_PubOtpMinConfVer	 Minimum Configuration Version,3b14
1457 [39:36]	    V_PubOtpRSAIndex	 RSA Index, 3b10
1458 [35:32]	    V_PubOtpBID	         BlackBox ID, 0x3b0c
1459 [31:16]	    V_PubOtpVID	         Version ID, 0x3b04
1460 [15:0]	    V_PubOtpOID	         Owner ID, 0x3b00
1461 #endif
1462 
1463     MS_U32 *pDataArray;
1464     MS_U32 OTP_PubOtpOID,OTP_PubOtpVID,OTP_PubOtpBID,OTP_PubOtpRsaIndex,OTP_PubOtpMinConfVer ;
1465     MS_U32 OTP_PubOtpGP,OTP_PubOtpUniqueID[2];
1466 
1467     MS_U32 CHK_PubOtpOID,CHK_PubOtpVID,CHK_PubOtpBID,CHK_PubOtpRsaIndex,CHK_PubOtpMinConfVer ;
1468     MS_U32 CHK_PubOtpGP,CHK_PubOtpUniqueID[2];
1469 
1470     MS_BOOL status = TRUE;
1471     if(pCheck == NULL)
1472     {
1473         HALNSK2_DBG(NSK2_DBGLV_ERR,"%d, %s, pCheck = NULL\n",__LINE__,__FUNCTION__);
1474         return FALSE;
1475     }
1476     pDataArray = (MS_U32 *)pCheck;
1477 
1478     HAL_NSK2_OTP_Get(0x3da8,31,0, &OTP_PubOtpUniqueID[0]);
1479     HAL_NSK2_OTP_Get(0x3dac,31,0, &OTP_PubOtpUniqueID[1]);
1480 
1481     CHK_PubOtpUniqueID[1] = pDataArray[0];
1482     CHK_PubOtpUniqueID[0] = pDataArray[1];
1483 
1484     printf("uniqueID = (%x%x, %x%x)\n",CHK_PubOtpUniqueID[1],CHK_PubOtpUniqueID[0],OTP_PubOtpUniqueID[1],OTP_PubOtpUniqueID[0]);
1485 
1486     if( (CHK_PubOtpUniqueID[1] != OTP_PubOtpUniqueID[1]) || (CHK_PubOtpUniqueID[0] != OTP_PubOtpUniqueID[0]))
1487     {
1488         HALNSK2_DBG(NSK2_DBGLV_ERR,"%d, %s, UniqueID WRONG\n",__LINE__,__FUNCTION__);
1489         status = FALSE;
1490     }
1491 
1492     HAL_NSK2_OTP_Get(0x3b08,15,0, &OTP_PubOtpGP);
1493     CHK_PubOtpGP = (pDataArray[2]>>16)&0xffff;
1494 
1495     if(OTP_PubOtpGP != CHK_PubOtpGP)
1496     {
1497         HALNSK2_DBG(NSK2_DBGLV_ERR,"%d, %s, PubOtpGP WRONG\n",__LINE__,__FUNCTION__);
1498         printf("OtpGP = (%x, %x)\n",CHK_PubOtpGP,OTP_PubOtpGP);
1499         status = FALSE;
1500     }
1501 
1502     HAL_NSK2_OTP_Get(0x3b14,7,0, &OTP_PubOtpMinConfVer);
1503     CHK_PubOtpMinConfVer = (pDataArray[2]>>8)&0xff;
1504 
1505     if(OTP_PubOtpMinConfVer != CHK_PubOtpMinConfVer)
1506     {
1507         HALNSK2_DBG(NSK2_DBGLV_ERR,"%d, %s, PubOtpMinConfVer WRONG\n",__LINE__,__FUNCTION__);
1508         printf("OtpMinConfVer = (%x, %x)\n",CHK_PubOtpMinConfVer,OTP_PubOtpMinConfVer);
1509         status = FALSE;
1510     }
1511 
1512     HAL_NSK2_OTP_Get(0x3b10,3,0, &OTP_PubOtpRsaIndex);
1513     CHK_PubOtpRsaIndex = (pDataArray[2]>>4)&0xf;
1514 
1515     if(OTP_PubOtpRsaIndex != CHK_PubOtpRsaIndex)
1516     {
1517         HALNSK2_DBG(NSK2_DBGLV_ERR,"%d, %s, PubOtpRsaIndex WRONG\n",__LINE__,__FUNCTION__);
1518         printf("OtpRsaIndex = (%x, %x)\n",CHK_PubOtpRsaIndex,OTP_PubOtpRsaIndex);
1519         status = FALSE;
1520     }
1521 
1522     HAL_NSK2_OTP_Get(0x3b0C,3,0, &OTP_PubOtpBID);
1523     CHK_PubOtpBID = (pDataArray[2])&0xf;
1524 
1525     if(OTP_PubOtpBID != CHK_PubOtpBID)
1526     {
1527         HALNSK2_DBG(NSK2_DBGLV_ERR,"%d, %s, PubOtpBID WRONG\n",__LINE__,__FUNCTION__);
1528         printf("OtpBID = (%x, %x)\n",CHK_PubOtpBID,OTP_PubOtpBID);
1529         status = FALSE;
1530     }
1531 
1532     HAL_NSK2_OTP_Get(0x3b04,15,0, &OTP_PubOtpVID);
1533     CHK_PubOtpVID = (pDataArray[3]>>16)&0xffff;
1534 
1535     if(OTP_PubOtpVID != CHK_PubOtpVID)
1536     {
1537         HALNSK2_DBG(NSK2_DBGLV_ERR,"%d, %s, PubOtpVID WRONG\n",__LINE__,__FUNCTION__);
1538         printf("OtpVID = (%x, %x)\n",CHK_PubOtpVID,CHK_PubOtpVID);
1539         status = FALSE;
1540     }
1541 
1542     HAL_NSK2_OTP_Get(0x3b00,15,0, &OTP_PubOtpOID);
1543     CHK_PubOtpOID = (pDataArray[3])&0xffff;
1544 
1545     if(OTP_PubOtpOID != CHK_PubOtpOID)
1546     {
1547         HALNSK2_DBG(NSK2_DBGLV_ERR,"%d, %s, PubOtpOID WRONG\n",__LINE__,__FUNCTION__);
1548         printf("OtpOID = (%x, %x)\n",CHK_PubOtpOID,OTP_PubOtpOID);
1549         status = FALSE;
1550     }
1551 
1552     MS_U32 KeyValid;
1553     HAL_NSK2_OTP_Get(0x3b1c,31,24, &KeyValid);
1554     printf("KeyValid = %x\n",KeyValid);
1555 
1556     MS_U32 CheckSum[4];
1557     HAL_NSK2_OTP_Get(0x3c30,31,0, &CheckSum[0]);
1558     HAL_NSK2_OTP_Get(0x3c34,31,0, &CheckSum[1]);
1559     HAL_NSK2_OTP_Get(0x3c38,31,0, &CheckSum[2]);
1560     HAL_NSK2_OTP_Get(0x3c3c,31,0, &CheckSum[3]);
1561     printf("CheckSum = %x, %x, %x, %x\n",CheckSum[0],CheckSum[1],CheckSum[2],CheckSum[3]);
1562     return status;
1563 }
1564 
HAL_NSK2_ReadDataTrans(MS_U32 read_data,MS_U8 * data)1565 static void HAL_NSK2_ReadDataTrans(MS_U32 read_data, MS_U8 *data)
1566 {
1567     data[3] = (MS_U8)(read_data & 0xff);
1568     data[2] = (MS_U8)((read_data>>8) & 0xff);
1569     data[1] = (MS_U8)((read_data>>16) & 0xff);
1570     data[0] = (MS_U8)((read_data>>24) & 0xff);
1571 }
1572 
HAL_NSK2_WriteDataTrans(MS_U8 * data)1573 static MS_U32 HAL_NSK2_WriteDataTrans(MS_U8 *data)
1574 {
1575     MS_U32 write_data = 0;
1576 
1577     write_data = (MS_U32)data[3] + ((MS_U32)data[2]<<8) + ((MS_U32)data[1]<<16) + ((MS_U32)data[0]<<24) ;
1578     return write_data;
1579 }
1580 
HAL_NSK2_ReadData(MS_U32 addr_offset,MS_U32 data_size,MS_U8 * data)1581 MS_U32 HAL_NSK2_ReadData(MS_U32 addr_offset, MS_U32 data_size, MS_U8 *data)
1582 {
1583     MS_U32 read_data, read_data_size;
1584     MS_U8  *read_ptr;
1585 
1586     if(data_size < 4)
1587     {
1588         return FALSE;
1589     }
1590 
1591     read_data_size = data_size;
1592     read_ptr = data;
1593 
1594     while(read_data_size >= 4)
1595     {
1596         StatusCheck(HAL_NSK2_CheckBusy());
1597 
1598         read_data = HAL_NSK2_ReadReg(addr_offset);
1599         HAL_NSK2_ReadDataTrans(read_data,read_ptr);
1600 
1601         addr_offset += 4;
1602         read_ptr += 4;
1603         read_data_size -= 4;
1604     }
1605 
1606     return TRUE;
1607 }
1608 
HAL_NSK2_WriteData(MS_U32 addr_offset,MS_U32 data_size,MS_U8 * data)1609 MS_U32 HAL_NSK2_WriteData(MS_U32 addr_offset, MS_U32 data_size, MS_U8 *data)
1610 {
1611     MS_U32 write_data, write_data_size;
1612     MS_U8  *write_ptr;
1613 
1614     if(data_size < 4)
1615     {
1616         return FALSE;
1617     }
1618 
1619     write_data_size = data_size;
1620     write_ptr = data;
1621 
1622     while(write_data_size >= 4)
1623     {
1624         StatusCheck(HAL_NSK2_CheckBusy());
1625 
1626         write_data = HAL_NSK2_WriteDataTrans(write_ptr);
1627         HAL_NSK2_WriteReg(addr_offset,write_data);
1628 
1629         addr_offset += 4;
1630         write_ptr   += 4;
1631         write_data_size -= 4;
1632     }
1633 
1634 
1635     return TRUE;
1636 }
1637 
HAL_NSK2_ReadData8(MS_U32 addr_offset,MS_U32 data_size,MS_U8 * data)1638 MS_U32 HAL_NSK2_ReadData8(MS_U32 addr_offset, MS_U32 data_size, MS_U8 *data)
1639 {
1640     MS_U32 read_data, read_data_size;
1641     MS_U8  *read_ptr;
1642 
1643     if(data_size < 4)
1644     {
1645         return FALSE;
1646     }
1647 
1648     read_data_size = data_size;
1649     read_ptr = data;
1650 
1651     while(read_data_size >= 4)
1652     {
1653         StatusCheck(HAL_NSK2_CheckBusy());
1654 
1655         read_data = HAL_NSK2_ReadReg(addr_offset);
1656         HAL_NSK2_ReadDataTrans(read_data,read_ptr);
1657 
1658         //HALNSK2_DBG(0,"addr = %x, read_data = %x\n",addr_offset,read_data);
1659         addr_offset += 4;
1660         read_ptr += 4;
1661         read_data_size -= 4;
1662     }
1663 
1664     return TRUE;
1665 }
1666 
HAL_NSK2_WriteData8(MS_U32 addr_offset,MS_U32 data_size,MS_U8 * data)1667 MS_U32 HAL_NSK2_WriteData8(MS_U32 addr_offset, MS_U32 data_size, MS_U8 *data)
1668 {
1669     MS_U32 write_data, write_data_size;
1670     MS_U8  *write_ptr;
1671 
1672     if(data_size < 4)
1673     {
1674         return FALSE;
1675     }
1676 
1677     write_data_size = data_size;
1678     write_ptr = data;
1679 
1680     while(write_data_size >= 4)
1681     {
1682         StatusCheck(HAL_NSK2_CheckBusy());
1683 
1684         write_data = HAL_NSK2_WriteDataTrans(write_ptr);
1685         HAL_NSK2_WriteReg(addr_offset,write_data);
1686         //HALNSK2_DBG(0,"addr = %x, write_data = %x\n",addr_offset, write_data);
1687         addr_offset += 4;
1688         write_ptr   += 4;
1689         write_data_size -= 4;
1690     }
1691 
1692     return TRUE;
1693 }
1694 
1695 
HAL_NSK2_ReadData32(MS_U32 addr_offset,MS_U32 data_size,MS_U32 * data)1696 MS_U32 HAL_NSK2_ReadData32(MS_U32 addr_offset, MS_U32 data_size, MS_U32 *data)
1697 {
1698     MS_U32 read_data, read_data_size;
1699     MS_U32 *read_ptr;
1700     //MS_U32 test_read_data;
1701 
1702     if(data_size < 1)
1703     {
1704         return FALSE;
1705     }
1706 
1707     read_data_size = data_size;
1708     read_ptr = data;
1709 
1710     while(read_data_size >= 1)
1711     {
1712         StatusCheck(HAL_NSK2_CheckBusy());
1713 
1714         read_data = HAL_NSK2_ReadReg(addr_offset);
1715         *read_ptr = read_data;
1716 
1717         //HALNSK2_DBG(0,"addr = %x, read_data = %x\n",addr_offset,read_data);
1718         addr_offset += 4;
1719         read_ptr ++;
1720         read_data_size --;
1721     }
1722 
1723     return TRUE;
1724 }
1725 
HAL_NSK2_WriteData32(MS_U32 addr_offset,MS_U32 data_size,MS_U32 * data)1726 MS_U32 HAL_NSK2_WriteData32(MS_U32 addr_offset, MS_U32 data_size, MS_U32 *data)
1727 {
1728     MS_U32 write_data, write_data_size;
1729     MS_U32 *write_ptr;
1730 
1731     if(data_size < 1)
1732     {
1733         return FALSE;
1734     }
1735 
1736     write_data_size = data_size;
1737     write_ptr = data;
1738 
1739     while(write_data_size >= 1)
1740     {
1741         StatusCheck(HAL_NSK2_CheckBusy());
1742 
1743         write_data = *write_ptr;
1744         HAL_NSK2_WriteReg(addr_offset,write_data);
1745         //HALNSK2_DBG(0,"addr = %x, write_data = %x\n",addr_offset, write_data);
1746         addr_offset += 4;
1747         write_ptr   ++;
1748         write_data_size --;
1749     }
1750 
1751 
1752     return TRUE;
1753 }
1754 
HAL_NSK2_EnableInt(void)1755 MS_U32 HAL_NSK2_EnableInt(void)
1756 {
1757     MS_U32 u32IntReg = 0;
1758 /*
1759 #define REG_NSK2_ACPU_INT       0xFC08
1760     #define NSK2_INT_CMD_EXIT           __BIT0
1761     #define NSK2_INT_ASYNC_EVENT        __BIT1
1762     #define NSK2_INT_ILLEGAL_CMD        __BIT2
1763     #define NSK2_INT_ILLEGAL_ACCESS     __BIT3
1764     #define NSK2_INT_RESET              __BIT4
1765     #define NSK2_INT_HANG               __BIT5
1766     #define NSK2_INT_KTE_VALID          __BIT6
1767     #define NSK2_INT_MASK_CLEAR         __BIT31
1768 */
1769 
1770     u32IntReg = (NSK2_INT_CMD_EXIT | NSK2_INT_ASYNC_EVENT | NSK2_INT_ILLEGAL_CMD | \
1771                 NSK2_INT_RESET | NSK2_INT_HANG | NSK2_INT_KTE_VALID | NSK2_INT_MASK_CLEAR);
1772 
1773     HAL_NSK2_WriteReg(REG_NSK2_ACPU_INT,u32IntReg);
1774     return TRUE;
1775 }
1776 
HAL_NSK2_DisableInt(void)1777 MS_U32 HAL_NSK2_DisableInt(void)
1778 {
1779     MS_U32 u32IntReg = 0;
1780 
1781     HAL_NSK2_WriteReg(REG_NSK2_ACPU_INT,u32IntReg);
1782     return TRUE;
1783 }
1784 
1785 
HAL_NSK2_GetIntStatus(void)1786 MS_U32 HAL_NSK2_GetIntStatus(void)
1787 {
1788     MS_U32 u32IntValue;
1789     u32IntValue = HAL_NSK2_ReadReg(REG_NSK2_ACPU_INT);
1790 
1791     //HALNSK2_DBG(NSK2_DBGLV_DEBUG,"Int status = %x\n",u32IntValue);
1792     return u32IntValue;
1793 }
1794 
HAL_NSK2_ClearInt(MS_U32 u32IntValue)1795 MS_U32 HAL_NSK2_ClearInt(MS_U32 u32IntValue)
1796 {
1797     //HALNSK2_DBG(NSK2_DBGLV_DEBUG,"Clear Int = %x\n",u32IntValue);
1798     HAL_NSK2_WriteReg(REG_NSK2_ACPU_INT,u32IntValue);
1799     return TRUE;
1800 }
1801 
1802 
HAL_NSK2_WriteControl(MS_U32 control)1803 MS_U32 HAL_NSK2_WriteControl(MS_U32 control)
1804 {
1805     HAL_NSK2_WriteReg(REG_NSK2_ACPU_CTRL_BLOCK, control);
1806     return TRUE;
1807 }
1808 
1809 
HAL_NSK2_WriteCommand(MS_U32 command)1810 MS_U32 HAL_NSK2_WriteCommand(MS_U32 command)
1811 {
1812     HAL_NSK2_WriteReg(REG_NSK2_ACPU_CMD, command);
1813     return TRUE;
1814 }
1815 
1816 
HAL_NSK2_GetMaxXConn(void)1817 MS_U32 HAL_NSK2_GetMaxXConn(void)
1818 {
1819     return MaximumXConnection;
1820 }
1821 
1822 
HAL_NSK2_CMChannelNum(void)1823 MS_U32 HAL_NSK2_CMChannelNum(void)
1824 {
1825     return 1;
1826 }
1827 
HAL_NSK2_GetOTPFieldValue(MS_U8 u8Tag,MS_U8 * pLength,MS_U32 * pRetValue)1828 MS_U32 HAL_NSK2_GetOTPFieldValue(MS_U8 u8Tag, MS_U8 *pLength, MS_U32 *pRetValue)
1829 {
1830 	MS_U32 u32tmp1 = 0;
1831 	MS_U32 u32tmp2 = 0;
1832 
1833 	switch (u8Tag){
1834 
1835 	    case ContentProtectionEnable: //			0x3E30
1836 			// TODO: check it
1837 
1838 			HAL_NSK2_OTP_Get(0xf8c*4,  16,  16, &u32tmp1);
1839 			HAL_NSK2_OTP_Get(0xf8c*4, 7, 4, &u32tmp2);
1840 
1841 			*pRetValue = ( u32tmp1 << 2 ) | u32tmp2;
1842 			*pLength = 1;
1843 			break;
1844 
1845 	    case U_OTP_SBoot_0:		//Keres: U_OTP_Sboot. 	0x3C74
1846 			HAL_NSK2_OTP_Get(0xf1d*4, 3, 0, pRetValue);
1847 			*pLength = 1;
1848 			break;
1849 
1850 	    case U_OTP_ena_NSK2: //			0x3E94
1851 			HAL_NSK2_OTP_Get(0xfa5*4, 11, 8, pRetValue);
1852 			*pLength = 1;
1853 			break;
1854 
1855 	    case U_OTP_ena_ACPUUseNSK2: //			0x3E7C
1856 			HAL_NSK2_OTP_Get(0xf9f*4, 3, 0, pRetValue);
1857 			*pLength = 1;
1858 			break;
1859 
1860 	    case U_OTP_ena_DBUSUseNSK2://			0x3E7C
1861 			HAL_NSK2_OTP_Get(0xf9f*4, 7, 4, pRetValue);
1862 			*pLength = 1;
1863 			break;
1864 
1865 	    case U_OTP_ena_ForceTenSec://			0x3E7C
1866 			HAL_NSK2_OTP_Get(0xf9f*4, 11, 8, pRetValue);
1867 			*pLength = 1;
1868 			break;
1869 
1870 	    case U_OTP_ena_SCCheck://			0x3E7C
1871 			HAL_NSK2_OTP_Get(0xf9f*4, 15, 12, pRetValue);
1872 			*pLength = 1;
1873 			break;
1874 
1875 	    case U_OTP_ena_SWRN://			0x3E7C
1876 			HAL_NSK2_OTP_Get(0xf9f*4, 23, 20, pRetValue);
1877 			*pLength = 1;
1878 			break;
1879 
1880 	    case U_OTP_ena_TestRCFreq://			0x3E7C
1881 			HAL_NSK2_OTP_Get(0xf9f*4, 19, 16, pRetValue);
1882 			*pLength = 1;
1883 			break;
1884 
1885 	    case U_OTP_VenderConstSel://				0x38FC
1886 			HAL_NSK2_OTP_Get(0xe3f*4, 2, 0, pRetValue);
1887 			*pLength = 1;
1888 			break;
1889 
1890 	    case U_OTP_RANDOM_0://			0x3C28
1891 			HAL_NSK2_OTP_Get(0xf0a*4, 13, 12, pRetValue);
1892 			*pLength = 1;
1893 			break;
1894 
1895 	    case U_OTP_NOISE_0://			0x3C28
1896 			HAL_NSK2_OTP_Get(0xf0a*4, 19, 18, pRetValue);
1897 			*pLength = 1;
1898 			break;
1899 
1900 	    case U_OTP_NDS_Parity_ChkEn_0://			0x3C28
1901 			HAL_NSK2_OTP_Get(0xf0a*4, 25, 24, pRetValue);
1902 			*pLength = 1;
1903 			break;
1904 
1905 	    case U_OTP_OTPWritePWDProtect_0://			0x3E28
1906 			HAL_NSK2_OTP_Get(0xf8a*4, 5, 2, pRetValue);
1907 			*pLength = 1;
1908 			break;
1909 
1910         case U_OTP_concurrency_configuration:    //return as same as 4A
1911             //HAL_NSK2_OTP_Get(0xf8c*4, 15, 14, pRetValue);
1912 			HAL_NSK2_OTP_Get(0xf0a*4, 13, 12, pRetValue);	//			0x3C28
1913 			*pLength = 1;
1914             break;
1915 
1916 
1917         case U_OTP_nds_fc_disable:  //			0x39AC
1918             HAL_NSK2_OTP_Get(0xe6b*4, 0, 0, pRetValue);
1919 			*pLength = 1;
1920             break;
1921 
1922 		/*HERE 50,51 missing. Need to check */
1923 		/*Added manually*/
1924 		case 0x50: //			0x3C28
1925             HAL_NSK2_OTP_Get(0xf0a*4, 25, 24, pRetValue);
1926 			*pLength = 1;
1927             break;
1928 		case 0x51:  //			0x3E28
1929             HAL_NSK2_OTP_Get(0xf8a*4, 5, 2, pRetValue);
1930 			*pLength = 1;
1931             break;
1932 		/*******************************/
1933 
1934 	    case U_OTP_ena_EMMFilter: //			0x39A8
1935 			HAL_NSK2_OTP_Get(0xe6a*4, 11, 8, pRetValue);
1936 			*pLength = 1;
1937 			break;
1938 	    case U_OTP_allow_NSKCW2CryptoDMA://			0x3E2C
1939 			HAL_NSK2_OTP_Get(0xf8b*4, 27, 24, pRetValue);
1940 			*pLength = 1;
1941 			break;
1942 
1943 
1944 	    case U_OTP_ena_ACPU2DMA://			0x3C80
1945 			HAL_NSK2_OTP_Get(0xf20*4, 3, 0, pRetValue);
1946 			*pLength = 1;
1947 			break;
1948 
1949 	    case U_OTP_ena_DMA_DESBasedCipher://			0x3C80
1950 			HAL_NSK2_OTP_Get(0xf20*4, 7, 4, pRetValue);
1951 			*pLength = 1;
1952 			break;
1953 
1954 		#if 0
1955 	    case U_OTP_ena_DMA_GetKeyFromKL:						//3 MISSING FROM FUSEMAP. ASK YUCHIA
1956 			//HAL_NSK2_OTP_Get(0xf6b*4, 15,12 , pRetValue);
1957 			*pRetValue = 0;
1958 			*pLength = 1;
1959 			break;
1960 		#endif
1961 
1962 	    case U_OTP_allow_ACPU2KT://			0x3E2C
1963 			HAL_NSK2_OTP_Get(0xf8b*4, 3, 0, pRetValue);
1964 			*pLength = 1;
1965 			break;
1966 
1967 	    case U_OTP_allow_ACPUWrNSKKey2KT://			0x3E2C
1968 			HAL_NSK2_OTP_Get(0xf8b*4, 19, 16, pRetValue);
1969 			*pLength = 1;
1970 			break;
1971 
1972 	    case U_OTP_allow_NSK2KT://			0x3E2C
1973 			HAL_NSK2_OTP_Get(0xf8b*4, 7, 4, pRetValue);
1974 			*pLength = 1;
1975 			break;
1976 
1977 	    case U_OTP_ESAAlgo_invalidate://			0x3E30
1978 			HAL_NSK2_OTP_Get(0xf8c*4, 3, 0, pRetValue);
1979 			*pLength = 1;
1980 			break;
1981 
1982 	    case U_OTP_NDS_ContentProtect_sel://		0x3E30
1983 			HAL_NSK2_OTP_Get(0xf8c*4, 16, 16, pRetValue);
1984 			*pLength = 1;
1985 			break;
1986 
1987 	    case U_OTP_allow_CSA2Var: //			0x3E50
1988 			HAL_NSK2_OTP_Get(0xf94*4, 23, 20, pRetValue);
1989 			*pLength = 1;
1990 			break;
1991 
1992 	    case U_OTP_allow_CSA2Var_nonNSK: //			0x3E50
1993 			HAL_NSK2_OTP_Get(0xf94*4, 27, 24, pRetValue);
1994 			*pLength = 1;
1995 			break;
1996 
1997 	    case U_OTP_allow_CSA3NonNskVariant: //			0x3E50
1998 			HAL_NSK2_OTP_Get(0xf94*4, 19, 16, pRetValue);
1999 			*pLength = 1;
2000 			break;
2001 
2002 	    case U_OTP_allow_DVBCSA2ComfCipher://			0x3E50
2003 			HAL_NSK2_OTP_Get(0xf94*4, 3, 0, pRetValue);
2004 			*pLength = 1;
2005 			break;
2006 
2007 	    case U_OTP_allow_DVBCSA3Var://			0x3E50
2008 			HAL_NSK2_OTP_Get(0xf94*4, 15, 12, pRetValue);
2009 			*pLength = 1;
2010 			break;
2011 
2012 	    case U_OTP_allow_Multi2BasedCipher://			0x3E4C
2013 			HAL_NSK2_OTP_Get(0xf93*4, 19, 16, pRetValue);
2014 			*pLength = 1;
2015 			break;
2016 
2017 	    case U_OTP_Multi2SysKey://fe8~fef
2018 
2019 
2020         	#if 1
2021             HAL_NSK2_OTP_Get(0xf96*4, 31, 0, pRetValue);
2022             *pLength = 1;
2023             *pRetValue >>= 24;
2024 
2025         	#else
2026             HAL_NSK2_OTP_Get(0xfe8*4, 31, 0, &pRetValue[0]);
2027 			HAL_NSK2_OTP_Get(0xfe9*4, 31, 0, &pRetValue[1]);
2028 			HAL_NSK2_OTP_Get(0xfea*4, 31, 0, &pRetValue[2]);
2029 			HAL_NSK2_OTP_Get(0xfeb*4, 31, 0, &pRetValue[3]);
2030 
2031 			HAL_NSK2_OTP_Get(0xfec*4, 31, 0, &pRetValue[4]);
2032 			HAL_NSK2_OTP_Get(0xfed*4, 31, 0, &pRetValue[5]);
2033 			HAL_NSK2_OTP_Get(0xfee*4, 31, 0, &pRetValue[6]);
2034 			HAL_NSK2_OTP_Get(0xfef*4, 31, 0, &pRetValue[7]);
2035 			*pLength = 8;
2036 	        #endif
2037 
2038 			break;
2039 
2040 	    case U_OTP_SWMulti2SysKey://			0x3E54
2041 			// TODO: check it
2042 			HAL_NSK2_OTP_Get(0xf95*4, 23, 20, pRetValue);
2043 			*pLength = 1;
2044 			break;
2045 
2046 	    case U_OTP_ModifyXRC_Override: //			0x3E54
2047 			HAL_NSK2_OTP_Get(0xf95*4, 30, 30, pRetValue);
2048 			*pLength = 1;
2049 			break;
2050 
2051 	    case U_OTP_Permutation_Override://			0x3E54
2052 			HAL_NSK2_OTP_Get(0xf95*4, 29, 24, pRetValue);
2053 			*pLength = 1;
2054 			break;
2055 		#if 0
2056 	    case U_OTP_ena_TS2TSO: 						//3 MISSING FROM FUSEMAP. ASK YUCHIA
2057 			//HAL_NSK2_OTP_Get(0xf79*4, 13, 10, pRetValue);
2058 			*pRetValue = 0;
2059 			*pLength = 1;
2060 			break;
2061 		#endif
2062 	    case U_OTP_ena_TS2TSO_0: //			0x39A8
2063 			HAL_NSK2_OTP_Get(0xe6a*4, 15, 12, pRetValue);
2064 			*pLength = 1;
2065 			break;
2066 
2067 	    case U_OTP_ena_TS2TSO_1://			0x39A8
2068 			HAL_NSK2_OTP_Get(0xe6a*4, 19, 16, pRetValue);
2069 			*pLength = 1;
2070 			break;
2071 
2072 	    case U_OTP_ContentProEn_all1: //			0x3E30
2073 			HAL_NSK2_OTP_Get(0xf8c*4, 7, 4, pRetValue);
2074 			*pLength = 1;
2075 			break;
2076 
2077 	    case U_OTP_ena_LSACPCM: //			0x3E4C
2078 			// TODO: check it
2079 			HAL_NSK2_OTP_Get(0xf93*4, 3, 0, pRetValue);
2080 			*pLength = 1;
2081 			break;
2082 
2083 	    case U_OTP_EJTAG_MODE://			0x3C78
2084 			HAL_NSK2_OTP_Get(0xf1e*4, 20, 15, pRetValue);
2085 			*pLength = 1;
2086 			break;
2087 
2088 	    case U_OTP_DIG_JTAGMode://		0x3C78
2089 			HAL_NSK2_OTP_Get(0xf1e*4, 22, 21, pRetValue);
2090 			*pLength = 1;
2091 
2092 			break;
2093 	    case U_OTP_SBJTAGMode://			0x3C74
2094 			HAL_NSK2_OTP_Get(0xf1d*4, 11, 8, pRetValue);
2095 			*pLength = 1;
2096 			break;
2097 		#if 0
2098 	    case U_OTP_SBI2CMode: 				//3 MISSING FROM FUSEMAP. ASK YUCHIA
2099 			//HAL_NSK2_OTP_Get(0xf73*4, 13, 8, pRetValue);
2100 			*pRetValue = 0;
2101 			*pLength = 1;
2102 			break;
2103 		#endif
2104 	    case U_OTP_I2CMode: //			0x3C78
2105 			HAL_NSK2_OTP_Get(0xf1e*4, 14, 9, pRetValue);
2106 			*pLength = 1;
2107 
2108 			break;
2109 	    case U_OTP_SCANMode://			0x3C78
2110 			HAL_NSK2_OTP_Get(0xf1e*4, 8, 0, pRetValue);
2111 			*pLength = 1;
2112 			break;
2113 
2114 	    case U_OTP_ena_USBSlaveMode://			0x3C78
2115 			HAL_NSK2_OTP_Get(0xf1e*4, 31, 28, pRetValue);
2116 			*pLength = 1;
2117 			break;
2118 
2119 	    case U_OTP_Disable_TestInOut: //			0x3C74
2120 			HAL_NSK2_OTP_Get(0xf1d*4, 15, 14, pRetValue);
2121 			*pLength = 1;
2122 			break;
2123 
2124 	    case U_OTP_ena_NDS_JTAG_PWD:	//			0x3E80		CHECK!!!
2125 			HAL_NSK2_OTP_Get(0xfa0*4, 19, 18, pRetValue);
2126 			*pLength = 1;
2127 			break;
2128 
2129 	    case U_OTP_SBoot_1:		//			as same as  0x41
2130 			// TODO: check it
2131 			//HAL_NSK2_OTP_Get(0xf1b*4, 13, 8, pRetValue);
2132 			HAL_NSK2_OTP_Get(0xf1d*4, 3, 0, pRetValue);
2133 			*pLength = 1;
2134 			break;
2135 
2136 		default:
2137             HALNSK2_DBG(NSK2_DBGLV_ERR,"no such tag\n");
2138 			*pRetValue = 0;
2139 			*pLength = 0;
2140             return FALSE;
2141 
2142 
2143 	}
2144 
2145     HALNSK2_DBG(NSK2_DBGLV_INFO,"Get otp tag ok\n");
2146     return TRUE;
2147 }
2148 
2149 
2150 typedef struct
2151 {
2152     MS_U8   u8Tag;
2153     MS_U8   u8Length;
2154     MS_U32  Offset;
2155     MS_U32  MSB;
2156     MS_U32  LSB;
2157 } ASST_t;
2158 
2159 
2160 static ASST_t KanoAsst[] =
2161 {
2162     //the first tag is the same called pub otp, we should implement one function to obtain this,
2163     //becasue this the same as HW test, we can check at HW Test also.
2164     {0x20,  9,  0x3DA8,  63,   0}, //U_OTP_v_pubOtpUniqueID1
2165     {0x21, 16,  0x3BC0, 127,   0}, //Bulk data 1
2166     {0x22, 16,  0x3BD0, 127,   0}, //Bulk data 2
2167     {0x23, 16,  0x3BE0, 127,   0}, //Bulk data 3
2168     {0x24, 16,  0x3BF0, 127,   0}, //Bulk data 4
2169 
2170 
2171     {0x40,  1,  0x3D24,  11,   8}, //U_OTP_ena_NSK2
2172     {0x41,  1,  0x3B24,   3,   0}, //U_OTP_ena_ACPUUseNSK2
2173     {0x42,  1,  0x3B24,   7,   4}, //U_OTP_ena_DBUSUseNSK2
2174     {0x43,  1,  0x3B24,  11,   8}, //U_OTP_ena_ForceOneMilSec
2175     {0x44,  1,  0x3B24,  15,  12}, //U_OTP_ena_SCCheck, U_OTP_allow_SCCheck
2176     {0x45,  1,  0x3B24,  23,  20}, //U_OTP_ena_SWRN
2177     {0x46,  1,  0x3B24,  19,  16}, //U_OTP_ena_TestRCFreq
2178     {0x47,  1,  0x3B18,   2,   0}, //U_OTP_venderConstSel
2179 
2180     {0x48,  1,  0x3B1F,   7,   0}, //U_OTP_NDSKeyValid
2181     //{0x49,  1,  0x3E8C,  15,   8}, //U_OTP_NDSSecMode
2182     {0x4A,  1,  0x3C50,   1,   0}, //U_OTP_NDS_ESCK_obfuscation
2183 
2184     {0x4B,  1,  0x3CC0,  13,  12}, //U_OTP_RANDOM, U_OTP_allow_RANDOM double chekc with yuchia.
2185     {0x4C,  1,  0x3B2C,  11,  10}, //U_OTP_NDS_Parity_ChkEn, U_OTP_allow_NDS_Parity_chk
2186     {0x4D,  1,  0x3B24,  31,  28}, //U_OTP_OTPWritePWDProtect
2187     {0x4E,  1,  0x3C28,   9,   8}, //U_OTP_forbid_DbusWriteOTP
2188     {0x4F,  1,  0x3C28,  11,  10}, //U_OTP_forbid_DbusReadOTP
2189     {0x50,  1,  0x3C28,   5,   4}, //U_OTP_forbid_SEPWriteOTP
2190     {0x51,  1,  0x3C28,   7,   6}, //U_OTP_forbid_SEPReadOTP
2191     {0x52,  1,  0x3C28,   1,   0}, //U_OTP_forbid_MCUWriteOTP
2192     {0x53,  1,  0x3C28,   3,   2}, //U_OTP_forbid_MCUReadOTP
2193     {0x54,  1,  0x3C28,  23,  22}, //U_OTP_allow_NDS_Rd55AA
2194     {0x55,  1,  0x3E80,  23,  20}, //U_OTP_allow_illegal_chk
2195     {0x56,  1,  0x3E80,  27,  24}, //U_OTP_allow_parity_fail_issue_rst
2196     {0x57,  1,  0x3C4C,  24,  24}, //U_OTP_SKIP_0
2197     {0x58,  1,  0x3C4C,  25,  25}, //U_OTP_SKIP_1
2198     {0x59,  1,  0x3C28,  21,  20}, //U_OTP_allow_OTP_BgCRC
2199     {0x5A,  1,  0x3E2C,  27,  24}, //U_OTP_allow_NSKCW2CryptoDMA, U_OTP_ena_NSKCW2CryptoDMA
2200     {0x5B,  1,  0x3C80,   3,   0}, //U_OTP_ena_ACPU2DMA
2201     {0x5C,  1,  0x3C80,   7,   4}, //U_OTP_ena_DMA_DESBasedCipher
2202     {0x5D,  1,  0x3C80,  10,  10}, //U_OTP_NDSM2MSWIV, U_OTP_forbid_NDSM2MSWIV
2203     {0x5E,  1,  0x3C80,   9,   8}, //U_OTP_ena_AESMAC_MaxRate
2204     {0x5F,  1,  0x3E2C,   3,   0}, //U_OTP_allow_ACPU2KT, U_OTP_ena_ACPU2KT
2205     {0x60,  1,  0x3E2C,  19,  16}, //U_OTP_allow_ACPUWrNSKKey2KT, U_OTP_ena_ACPUWrNSKKey2KT
2206     {0x61,  1,  0x3E2C,   7,   4}, //U_OTP_allow_NSK2KT
2207     {0x62,  1,  0x3E30,   3,   0}, //U_OTP_ESAAlgo_invalidate, U_OTP_ena_ESAAlgo_invalidate
2208     {0x63,  1,  0x3E30,  16,  16}, //U_OTP_NDS_ContentProtect_sel
2209     {0x64,  1,  0x3E50,  23,  20}, //U_OTP_allow_CSA2Var, U_OTP_ena_DVBCSA2Var
2210     {0x65,  1,  0x3E50,  27,  24}, //U_OTP_allow_CSA2Var_nonNSK, U_OTP_ena_DVBCSA2Var_nonNSK
2211     {0x66,  1,  0x3E50,  19,  16}, //U_OTP_allow_CSA3NonNskVariant, U_OTP_ena_DVBCSA3NonNskVariant
2212     {0x67,  1,  0x3E50,   3,   0}, //U_OTP_allow_DVBCSA2ComfCipher, U_OTP_ena_DVBCSA2ConfCipher
2213     {0x68,  1,  0x3E50,  15,  12}, //U_OTP_allow_DVBCSA3Var, U_OTP_ena_DVBCSA3Var
2214     {0x69,  1,  0x3E4C,  19,  16}, //U_OTP_allow_Multi2BasedCipher, U_OTP_ena_Multi2BasedCipher
2215     {0x6A,  1,  0x3E54,  23,  20}, //U_OTP_SWMulti2SysKey, U_OTP_ena_SWMulti2SysKey
2216     {0x6B,  1,  0x3E54,  30,  30}, //ModifyXrc_Override, U_OTP_ModifyXRC_Override
2217     {0x6C,  1,  0x3E54,  29,  24}, //Permutation_Override, U_OTP_Permutation_Override
2218     {0x6D,  1,  0x39A8,  15,  12}, //U_OTP_ena_TS2TSO_0
2219     {0x6E,  1,  0x39A8,  19,  16}, //U_OTP_ena_TS2TSO_1
2220     {0x6F,  1,  0x3E30,   7,   4}, //U_OTP_ContentProEn_all1
2221     {0x70,  1,  0x3E4C,   3,   0}, //U_OTP_ena_LSACPCM
2222     {0x71,  1,  0x3E50,  31,  28}, //U_OTP_dis_NonSecRangeEncrypt
2223     {0x72,  1,  0x3C78,  21,  16}, //U_OTP_EJTAG_MODE
2224     {0x73,  1,  0x3C78,  23,  22}, //U_OTP_DIG_JTAGMode
2225     {0x74,  1,  0x3C74,  11,   8}, //U_OTP_SBJTAGMode
2226     {0x75,  1,  0x3C78,  14,   9}, //U_OTP_I2CMode
2227     {0x76,  2,  0x3C78,   8,   0}, //U_OTP_SCANMode
2228     {0x77,  1,  0x3C78,  31,  28}, //U_OTP_ena_USBSlaveMode, U_OTP_forbid_USBSlaveMode ????
2229     {0x78,  1,  0x3C74,  15,  14}, //U_OTP_Dis_TestInOut, U_OTP_forbid_TestInOut
2230     {0x79,  1,  0x3E80,  19,  18}, //U_OTP_ena_NDS_JTAG_PWD, U_OTP_allow_NSK2_EJTAG_Mode  ???
2231     {0x7A,  1,  0x3C6C,  13,   8}, //U_OTP_BootMode
2232     {0x7B,  1,  0x3C74,   3,   0}, //U_OTP_SBoot
2233     {0x7C,  1,  0x39A0,   3,   0}, //U_OTP_ena_PVR_secure_protect_0
2234     {0x7D,  1,  0x399C,   7,   4}, //U_OTP_ena_PVRS2NS
2235     {0x7E,  1,  0x39AC,   0,   0}, //U_OTP_nds_fc_disable
2236     {0x7F,  4,  0x3990,   31,   0}, //U_OTP_MSID
2237 };
2238 
2239 
endian_change(MS_U8 * ptr,MS_U32 bytes)2240 void endian_change(MS_U8* ptr, MS_U32 bytes)
2241 {
2242 
2243 	MS_U32 u32halve;
2244 	MS_U32 u32tmp;
2245 	MS_U32 i;
2246 
2247 	u32halve = bytes/2;
2248 	for(i=0; i<u32halve; i++)
2249 	{
2250 		u32tmp = ptr[i];
2251 		ptr[i] = ptr[bytes-i-1];
2252 		ptr[bytes-i-1] = u32tmp;
2253 	}
2254 }
2255 
HAL_NSK2_GetOTPProperties(MS_U32 * desc_size,MS_U8 * desc)2256 MS_U32 HAL_NSK2_GetOTPProperties(MS_U32 *desc_size, MS_U8 *desc)
2257 {
2258     MS_U32 NumOfTag = sizeof(KanoAsst)/sizeof(ASST_t);
2259     MS_U32 ret_size = 0, i, j;
2260     MS_U8 *pDesc = (MS_U8 *)desc;
2261     MS_U32 OTPValue;
2262     MS_U8  RunLens;
2263     MS_U32 RunOffset;
2264 
2265     ret_size = 0;
2266     for( i=0; i<NumOfTag; i++)
2267     {
2268         ret_size += (KanoAsst[i].u8Length + 2);
2269     }
2270 
2271     *desc_size = ret_size;
2272 
2273     //printf("length of OTP Tag = %lx\n",ret_size);
2274     if(desc == NULL)
2275     {
2276 
2277         return TRUE;
2278     }
2279 
2280     for( i=0; i<NumOfTag; i++)
2281     {
2282         *pDesc++ = KanoAsst[i].u8Tag;
2283         *pDesc++ = KanoAsst[i].u8Length;
2284 
2285         if(0x20 == KanoAsst[i].u8Tag) //pubOTP...special case....
2286         {
2287         #if 1
2288             *pDesc++ = 0;
2289             //4 Chip ID
2290             MS_U8 PubOTP[8];
2291             for(j=0;j<8;j+=4)
2292             {
2293                 MS_U32 u32Tmp;
2294                 u32Tmp = MDrv_CA_OTP_Read(0x3EA0 + j);
2295                 memcpy(&PubOTP[j], &u32Tmp, 4);
2296             }
2297             endian_change(PubOTP, 8);
2298 
2299             memcpy(pDesc,PubOTP,8);
2300             pDesc += 8;
2301         #else
2302         extern void endian_change(MS_U8* ptr, MS_U32 bytes);
2303             MS_U8 PubOTP[16];
2304             HAL_NSK2_GetPubOTP(PubOTP);
2305             endian_change(PubOTP, 16);
2306             memcpy(pDesc,PubOTP,16);
2307             pDesc += 16;
2308         #endif
2309         }
2310         else
2311         {
2312             RunLens = KanoAsst[i].u8Length;
2313             RunOffset = KanoAsst[i].Offset;
2314             //printf("Offset = %lx, length = %x\n",RunOffset, RunLens);
2315             if(KanoAsst[i].u8Length <= 4)
2316             {
2317                 HAL_NSK2_OTP_Get(KanoAsst[i].Offset, KanoAsst[i].MSB, KanoAsst[i].LSB, &OTPValue);
2318                 if(1 == RunLens)
2319                     *pDesc++ = (MS_U8)(OTPValue&0xff);
2320                 else if(2 == RunLens)
2321                 {
2322                     *pDesc++ = (MS_U8)((OTPValue>>8)&0xff);
2323                     *pDesc++ = (MS_U8)(OTPValue&0xff);
2324                 }
2325                 else if(4 == RunLens)
2326                 {
2327                     *pDesc++ = (MS_U8)((OTPValue>>24)&0xff);
2328                     *pDesc++ = (MS_U8)((OTPValue>>16)&0xff);
2329                     *pDesc++ = (MS_U8)((OTPValue>>8)&0xff);
2330                     *pDesc++ = (MS_U8)(OTPValue&0xff);
2331                 }
2332             }
2333             else //length > 4, tmp solution
2334             {
2335                 //printf("length = %x\n",RunLens);
2336                 MS_U8 BulkData[16];
2337                 for( j=0; j<RunLens; j+=4 )
2338                 {
2339                     HAL_NSK2_OTP_Get(RunOffset + j, 31, 0, &OTPValue);
2340                     //printf("run offset = %lx, Value = %lx\n", (RunOffset + j),OTPValue);
2341                     memcpy(&BulkData[j],&OTPValue,4);
2342                 }
2343                 endian_change(BulkData, 16);
2344                 memcpy(pDesc,BulkData,16);
2345                 pDesc += 16;
2346 
2347                 //printf("endian change\n");
2348                 //endian_change(desc, RunLens);
2349             }
2350         }
2351     }
2352 
2353 #if 0
2354     MS_U32 size = *desc_size;
2355 
2356     for(i=0;i<size;i++)
2357     {
2358         printf(" (%ld, %x) \n", i , desc[i]);
2359     }
2360 #endif
2361     return TRUE;
2362 }
2363 
2364 
2365 
HAL_NSK2_SetDbgLevel(MS_U32 u32Level)2366 void HAL_NSK2_SetDbgLevel(MS_U32 u32Level)
2367 {
2368     _g32NSK2HalDbgLv = u32Level;
2369     HALNSK2_DBG(NSK2_DBGLV_INFO, "%s level: %x\n", __FUNCTION__, u32Level);
2370     return;
2371 }
2372 
HAL_NSK2_SetPollingCnt(MS_U32 u32Cnt)2373 void HAL_NSK2_SetPollingCnt(MS_U32 u32Cnt)
2374 {
2375     dead_polling_cnt = u32Cnt;
2376 }
2377 
2378 #if 0
2379 void HAL_NSK2_BurstLen(MS_U32 u32PVREng, MS_U32 u32BurstMode)
2380 {
2381     HAL_PVR_BurstLen(u32PVREng, u32BurstMode);
2382 }
2383 #endif
2384 
HAL_NSK2_ClockTest(MS_U32 testnum)2385 void HAL_NSK2_ClockTest(MS_U32 testnum)
2386 {
2387 
2388     MS_U32 u32Data;
2389     switch(testnum)
2390     {
2391     case 0:
2392         RSA_REG(REG_RSA_CLK_ENABLE) |= RSA_PM_NSKCLK_ENABLE;
2393         MsOS_DelayTaskUs(1);
2394 
2395         u32Data = RSA_REG(REG_RSA_CLK_ENABLE);
2396         HALNSK2_DBG(NSK2_DBGLV_DEBUG, "RSA REG_RSA_CLK_ENABLE = %x\n",u32Data);
2397 
2398 
2399         u32Data = NI_REG(REG_NI_NSK2_CTRL);
2400         HALNSK2_DBG(NSK2_DBGLV_DEBUG, "NI REG_NI_NSK2_CTRL = %x\n",u32Data);
2401 
2402         //bit 0 set to 1...
2403         NI_REG(REG_NI_NSK2_CTRL) = u32Data | NI_NSK2_RESET_DISABLE | NI_NSK2_CLK_ENABLE;
2404 
2405         MsOS_DelayTaskUs(1);
2406         u32Data = NI_REG(REG_NI_NSK2_CTRL);
2407         HALNSK2_DBG(NSK2_DBGLV_DEBUG, "NI REG_NI_NSK2_CTRL = %x\n",u32Data);
2408         break;
2409 
2410 
2411     case 1:
2412         RSA_REG(REG_RSA_CLK_ENABLE) |= RSA_PM_NSKCLK_ENABLE;
2413         MsOS_DelayTaskUs(1);
2414 
2415         u32Data = RSA_REG(REG_RSA_CLK_ENABLE);
2416         HALNSK2_DBG(NSK2_DBGLV_DEBUG, "RSA REG_RSA_CLK_ENABLE = %x\n",u32Data);
2417 
2418 
2419         u32Data = NI_REG(REG_NI_NSK2_CTRL);
2420         HALNSK2_DBG(NSK2_DBGLV_DEBUG, "NI REG_NI_NSK2_CTRL = %x\n",u32Data);
2421 
2422         //disable nsk2 clock
2423         NI_REG(REG_NI_NSK2_CTRL) = u32Data & ~(NI_NSK2_CLK_ENABLE) ;
2424         MsOS_DelayTask(1);
2425         u32Data = NI_REG(REG_NI_NSK2_CTRL);
2426         HALNSK2_DBG(NSK2_DBGLV_DEBUG, "NI REG_NI_NSK2_CTRL = %x\n",u32Data);
2427 
2428         break;
2429 
2430     case 2:
2431         RSA_REG(REG_RSA_CLK_ENABLE) &= (~RSA_PM_NSKCLK_ENABLE);
2432         MsOS_DelayTaskUs(1);
2433 
2434         u32Data = RSA_REG(REG_RSA_CLK_ENABLE);
2435         HALNSK2_DBG(NSK2_DBGLV_DEBUG, "RSA REG_RSA_CLK_ENABLE = %x\n",u32Data);
2436 
2437 
2438         u32Data = NI_REG(REG_NI_NSK2_CTRL);
2439         HALNSK2_DBG(NSK2_DBGLV_DEBUG, "NI REG_NI_NSK2_CTRL = %x\n",u32Data);
2440 
2441         //bit 0 set to 1...
2442         NI_REG(REG_NI_NSK2_CTRL) = u32Data | NI_NSK2_RESET_DISABLE | NI_NSK2_CLK_ENABLE;
2443 
2444         MsOS_DelayTaskUs(1);
2445         u32Data = NI_REG(REG_NI_NSK2_CTRL);
2446         HALNSK2_DBG(NSK2_DBGLV_DEBUG, "NI REG_NI_NSK2_CTRL = %x\n",u32Data);
2447         break;
2448 
2449     case 3:
2450         RSA_REG(REG_RSA_CLK_ENABLE) &= (~RSA_PM_NSKCLK_ENABLE);
2451         MsOS_DelayTaskUs(1);
2452 
2453         u32Data = RSA_REG(REG_RSA_CLK_ENABLE);
2454         HALNSK2_DBG(NSK2_DBGLV_DEBUG, "RSA REG_RSA_CLK_ENABLE = %x\n",u32Data);
2455 
2456         u32Data = NI_REG(REG_NI_NSK2_CTRL);
2457         HALNSK2_DBG(NSK2_DBGLV_DEBUG, "NI REG_NI_NSK2_CTRL = %x\n",u32Data);
2458 
2459         //disable nsk2 clock
2460         NI_REG(REG_NI_NSK2_CTRL) = u32Data & ~(NI_NSK2_CLK_ENABLE) ;
2461         MsOS_DelayTask(1);
2462         u32Data = NI_REG(REG_NI_NSK2_CTRL);
2463         HALNSK2_DBG(NSK2_DBGLV_DEBUG, "NI REG_NI_NSK2_CTRL = %x\n",u32Data);
2464         break;
2465     }
2466 }
2467 
HAL_NSK2_GetRNGThroughPut(void * pRngData,MS_U32 u32DataSize,MS_BOOL bDump)2468 void HAL_NSK2_GetRNGThroughPut(void *pRngData, MS_U32 u32DataSize, MS_BOOL bDump)
2469 {
2470 	MS_U32 u32StartTime;
2471     MS_U32 *pRNG_Data = (MS_U32 *)pRngData;
2472     MS_U32 valid = 0;
2473 	MS_U32 i = 0;
2474 
2475     NI_REG(REG_NI_NSK2_CTRL) = NI_REG(REG_NI_NSK2_CTRL) & (~NI_NSK2_RESET_DISABLE);
2476     NI_REG(REG_NI_NSK2_FREERUN) = NI_REG(REG_NI_NSK2_FREERUN) & (~ (NI_NSK2_RANDOM_FREERUN | NI_NSK2_RANDOM_ONEBYONE) );
2477 
2478     u32StartTime = MsOS_GetSystemTime();
2479 
2480 	for(i=0; i< u32DataSize; i++)
2481 	{
2482 		do
2483 		{
2484 			valid = NI_REG(REG_NI_NSK2_TRNG_VALID) & NI_NSK2_TRNG_VALID_MASK; //trng_sw_read_valid_nsk ;
2485 		}while(valid != 1);
2486 
2487 		pRNG_Data[i] = NI_REG(REG_NI_NSK2_TRNG_DATA);//trng_sw_read_data_nsk;
2488 		NI_REG(REG_NI_NSK2_FREERUN) = NI_REG(REG_NI_NSK2_FREERUN) | NI_NSK2_RANDOM_ONEBYONE;  //lfsr_get_go_nsk = 1 ;
2489 	}
2490 	MS_U32 u32EndTime = MsOS_GetSystemTime();
2491 
2492 	HALNSK2_DBG(NSK2_DBGLV_ERR,  "1M bit data size, total Time = %1d ms\n", (MS_U32)(u32EndTime - u32StartTime));
2493 
2494 	if(bDump)
2495 	{
2496 		for(i = 0 ; i < u32DataSize ; i ++)
2497 		{
2498 			HALNSK2_DBG(NSK2_DBGLV_ERR, "%08x\n", (unsigned int)(pRNG_Data[i]));
2499 		}
2500 	}
2501 }
2502 
HAL_NSK2_RunFree(MS_BOOL bRunFree)2503 void HAL_NSK2_RunFree(MS_BOOL bRunFree)
2504 {
2505     HALNSK2_DBG(NSK2_DBGLV_DEBUG, "bRunFree = %d\n", bRunFree);
2506 
2507 	if(bRunFree)
2508 	{
2509 		_gCheckBusyFlag = FALSE;
2510 	}
2511 	else
2512 	{
2513 		_gCheckBusyFlag = TRUE;
2514 	}
2515 }
2516 
2517 
HAL_NSK2_PushSlowClock(MS_BOOL HaltClk,MS_U32 NumOfMs)2518 MS_U32 HAL_NSK2_PushSlowClock ( MS_BOOL HaltClk, MS_U32 NumOfMs)
2519 {
2520     //HALNSK2_DBG(NSK2_DBGLV_DEBUG, "HaltClk = %d NumofTenSecond = %d\n", HaltClk, NumofTenSecond);
2521 
2522     StatusCheck(HAL_NSK2_CheckBusy());
2523 	MS_U32 u32Data = NI_REG(REG_NI_NSK2_CTRL);
2524     MS_U32 i = 0;
2525 
2526 	if(HaltClk == TRUE)//close clk
2527 	{
2528 		NI_REG(REG_NI_NSK2_CTRL) = u32Data & (~NI_NSK2_CLK_ENABLE) ;
2529         _gCheckBusyFlag = FALSE;
2530 	}
2531 	else //open clk
2532 	{
2533 		NI_REG(REG_NI_NSK2_CTRL) = u32Data | NI_NSK2_CLK_ENABLE ;
2534         _gCheckBusyFlag = TRUE;
2535         MsOS_DelayTaskUs(10);
2536 	}
2537 
2538     //printf("REG_NI_NSK2_CTRL = %x\n",NI_REG(REG_NI_NSK2_CTRL));
2539 
2540 #if 0
2541     u32Data = NI_REG(REG_NI_NSK2_CLK_CSA);
2542     printf("REG_NI_NSK2_CLK_CSA = %x\n",u32Data);
2543 #else
2544     u32Data = 0;
2545 #endif
2546 
2547     if(NumOfMs == 0)
2548         return TRUE;
2549 
2550 	for(i = 0 ; i < NumOfMs ; i++)
2551 	{
2552 	    //u32Data = NI_REG(REG_NI_NSK2_CLK_CSA);
2553         //printf("REG_NI_NSK2_CLK_CSA = %x\n",u32Data);
2554 		NI_REG(REG_NI_NSK2_CLK_CSA) = u32Data | NSK2_PUSH_SLOW_CLK;
2555         MsOS_DelayTaskUs_Poll(1);
2556 	}
2557 
2558     return TRUE;
2559 }
2560 
2561 
2562 
HAL_NSK2_GetCMProperties(MS_U32 * desc_size,MS_U8 * desc)2563 MS_U32 HAL_NSK2_GetCMProperties(MS_U32 *desc_size, MS_U8 *desc)
2564 {
2565     MS_U32 i;
2566     if(desc == NULL)
2567     {
2568         *desc_size = sizeof(cmchannel_group_capability_descriptor_t) + sizeof(cm_algo) /*sizeof(cmchannel_group_algorithm_record_descriptor_t)*CMChannelDescSize*/ ;
2569         HALNSK2_DBG(NSK2_DBGLV_INFO,"HAL_NSK2_GetCMProperties return desc_size = %x\n",*desc_size);
2570         return TRUE;
2571     }
2572 
2573     for(i=0;i<32;i++)
2574     {
2575         cm_capb.switch_combination_bitmap[i] = 0xFF;
2576     }
2577 
2578     *desc_size = sizeof(cmchannel_group_capability_descriptor_t) + sizeof(cm_algo);
2579 
2580     memcpy(desc,&cm_capb,sizeof(cmchannel_group_capability_descriptor_t));
2581     memcpy(desc+sizeof(cmchannel_group_capability_descriptor_t), &cm_algo[0] , sizeof(cm_algo) /*sizeof(cmchannel_group_algorithm_record_descriptor_t)*CMChannelDescSize*/ );
2582 
2583     HALNSK2_DBG(NSK2_DBGLV_INFO,"\nHAL_NSK2_GetCMProperties return *desc_size = %x,desc = %x\n",*desc_size,(MS_U32)desc);
2584 
2585     return TRUE;
2586 }
2587 
HAL_NSK2_GetM2MProperties(MS_U32 * desc_size,MS_U8 * desc)2588 MS_U32 HAL_NSK2_GetM2MProperties(MS_U32 *desc_size, MS_U8 *desc)
2589 {
2590     if(desc == NULL)
2591     {
2592         *desc_size = sizeof(m2m_capa_desc) + sizeof(m2m_algo);
2593         HALNSK2_DBG(NSK2_DBGLV_INFO,"HAL_NSK2_GetM2MProperties #1 return desc_size = %x\n",*desc_size);
2594         return TRUE;
2595     }
2596 
2597     *desc_size = sizeof(m2m_capa_desc) + sizeof(m2m_algo);
2598 
2599     memcpy(desc, &m2m_capa_desc, sizeof(m2m_capa_desc));
2600     memcpy(desc+sizeof(m2m_capa_desc), &m2m_algo[0], sizeof(m2m_algo));
2601 
2602     HALNSK2_DBG(NSK2_DBGLV_INFO,"HAL_NSK2_GetM2MProperties #2 return desc_size = %x\n",*desc_size);
2603     return TRUE;
2604 }
2605 
HAL_NSK2_GetDMAProperties(MS_U32 * desc_size,MS_U8 * desc)2606 MS_U32 HAL_NSK2_GetDMAProperties(MS_U32 *desc_size, MS_U8 *desc)
2607 {
2608     if(desc == NULL)
2609     {
2610         *desc_size = sizeof(dma_capa_desc);
2611         HALNSK2_DBG(NSK2_DBGLV_INFO,"HAL_NSK2_GetDMAProperties return desc_size = %x\n",*desc_size);
2612         return TRUE;
2613     }
2614 
2615     *desc_size = sizeof(dma_capa_desc);
2616 
2617     memcpy(desc, &dma_capa_desc, *desc_size);
2618 
2619     return TRUE;
2620 }
2621 
2622 //---------------Debug Information----------------------------//
2623 //------------------------------------------------------------//
2624 
HAL_NSK2_ReadTSPInfo(MS_U32 pid_no)2625 void HAL_NSK2_ReadTSPInfo(MS_U32 pid_no)
2626 {
2627     MS_U32 pid_data;
2628     MS_U32 FltPid, TS_SRC, dscmb_key_en, prim, pid_pair;
2629 
2630     FltPid = TS_SRC = dscmb_key_en = prim = pid_pair = 0;
2631     REG_PidFlt *pPidFlt = PPIDFLT0(pid_no);
2632 
2633     pid_data = TSP32_IdrR(pPidFlt);
2634 
2635     HALNSK2_DBG(NSK2_DBGLV_INFO,"pid_data = %x\n",pid_data);
2636 
2637     FltPid = (pid_data & 0x1fff);
2638     TS_SRC = ((pid_data>>13) & 0x7);
2639     dscmb_key_en = ((pid_data>>16) & 0x1);
2640     prim = ((pid_data>>17) & 0x1);
2641     pid_pair = ((pid_data>>18) & 0xf);
2642 
2643     if(dscmb_key_en)
2644     {
2645         HALNSK2_DBG(NSK2_DBGLV_INFO,"(%d) = (FltPid=%x, TS_SRC=%d, prim=%d, pid_pair=%d\n",pid_no,FltPid,TS_SRC,prim,pid_pair);
2646     }
2647 }
2648 
HAL_NSK2_ReadTSPDstInfo(MS_U32 pid_no)2649 void HAL_NSK2_ReadTSPDstInfo(MS_U32 pid_no)
2650 {
2651     MS_U32 pid_data;
2652     REG_PidFlt *pPidFlt = PPIDFLT1(pid_no);
2653 
2654     pid_data = TSP32_IdrR(pPidFlt);
2655 
2656     HALNSK2_DBG(NSK2_DBGLV_INFO,"dst_data = %x\n",pid_data);
2657 }
2658 
HAL_NSK2_AllTSPPidFilter(void)2659 void HAL_NSK2_AllTSPPidFilter(void)
2660 {
2661     MS_U32 i;
2662     for(i=0;i<0x100;i++)
2663     {
2664         HAL_NSK2_ReadTSPInfo(i);
2665     }
2666 
2667     for(i=0;i<0x100;i++)
2668     {
2669         HAL_NSK2_ReadTSPDstInfo(i);
2670     }
2671 }
2672 
HAL_NSK2_ChangePidFilter(MS_U32 pid_no,MS_U32 Data)2673 void HAL_NSK2_ChangePidFilter(MS_U32 pid_no, MS_U32 Data)
2674 {
2675     REG_PidFlt *pPidFlt = PPIDFLT0(pid_no);
2676     TSP32_IdrW(pPidFlt,Data);
2677 }
2678 
2679 
2680 
HAL_NSK2_ReadSwitchFromNSK2(void)2681 MS_U32 HAL_NSK2_ReadSwitchFromNSK2(void)
2682 {
2683 
2684 #if 0
2685 2.	N2_KteValid=1. NI bank offset 13 bit[3].
2686 3.	N2_KteDest=0. NI bank offset 13 bit[2:0].
2687 4.	Read the NSK bank offset 0xfc40-0xfc48 to read the NSK driven switch value. (see NSK-ICD-253 page21).
2688 In the read 96 bits, you can find:
2689 Bit[55] AU
2690 Bit[54] BU
2691 Bit[53] DU
2692 Bit[52] EU
2693 Bit[51] AL
2694 Bit[50] BL
2695 Bit[49] DL
2696 Bit[48] EL
2697 Bit[47:44] LocalSelectD
2698 Bit[43:40] LocalSelectS
2699 Bit[39:36] ESA select
2700 Bit[35:33] ESA subselect
2701 Please print out these fields and send the log to me.
2702 #endif
2703 
2704 #ifdef ReadSwitchInfoNSK2
2705     MS_U32 NI13 = NI_REG(13);
2706     HALNSK2_DBG(0,"NI13 = %x\n",NI13);
2707 
2708     MS_U32 NSK2Debug[3];
2709     NSK2Debug[0] = HAL_NSK2_ReadReg(0xFC40);
2710     NSK2Debug[1] = HAL_NSK2_ReadReg(0xFC44);
2711     NSK2Debug[2] = HAL_NSK2_ReadReg(0xFC48);
2712 
2713     HALNSK2_DBG(NSK2_DBGLV_DEBUG,"NSK2Debug = (%x,%x,%x)\n",NSK2Debug[0],NSK2Debug[1],NSK2Debug[2]);
2714     HALNSK2_DBG(NSK2_DBGLV_DEBUG,"AU=%x,BU=%x,DU=%x,EU=%x \n",(NSK2Debug[1]>>23)&0x1,(NSK2Debug[1]>>22)&0x1,(NSK2Debug[1]>>21)&0x1,(NSK2Debug[1]>>20)&0x1);
2715     HALNSK2_DBG(NSK2_DBGLV_DEBUG,"AL=%x,BL=%x,DL=%x,EL=%x \n",(NSK2Debug[1]>>19)&0x1,(NSK2Debug[1]>>18)&0x1,(NSK2Debug[1]>>17)&0x1,(NSK2Debug[1]>>16)&0x1);
2716     HALNSK2_DBG(NSK2_DBGLV_DEBUG,"LocalSelectD = %x, LocalSelectS = %x\n",(NSK2Debug[1]>>12)&0xf,(NSK2Debug[1]>>8)&0xf);
2717     HALNSK2_DBG(NSK2_DBGLV_DEBUG,"ESA select = %x, ESA subselect = %x\n",(NSK2Debug[1]>>4)&0xf,(NSK2Debug[1]>>0)&0xf);
2718 #endif
2719     return TRUE;
2720 }
2721 
2722 /* Temporary, since RSA sec_range drv is non-ready*/
HAL_NSK2_RSA_SetSecureRange(MS_U32 u32SecSet,MS_U32 u32SecStart,MS_U32 u32SecEnd)2723 MS_BOOL HAL_NSK2_RSA_SetSecureRange(MS_U32 u32SecSet, MS_U32 u32SecStart, MS_U32 u32SecEnd)
2724 {
2725     if(u32SecSet > REG_RSA_SECRANGE_SET  || u32SecEnd <= u32SecStart)
2726         return FALSE;
2727 
2728     *(volatile MS_U32*) (_gBasicAddr + REG_RSA_SECRANGE_START(u32SecSet)) = REG_RSA_SECRANGE_ENABLE | ( u32SecStart & REG_RSA_SECRANGE_MASK);
2729     *(volatile MS_U32*) (_gBasicAddr + REG_RSA_SECRANGE_END(u32SecSet))   = REG_RSA_SECRANGE_ENABLE | ( u32SecEnd   & REG_RSA_SECRANGE_MASK);
2730 
2731     return TRUE;
2732 }
2733 
2734 //=====================================
2735 //======   NSK2.1 new functions  ======
2736 //=====================================
2737 
2738 
HAL_NSK2_ReadAllOTP(void)2739 void HAL_NSK2_ReadAllOTP(void)
2740 {
2741     MS_U32 u32RetValue, addr;
2742 
2743     for( addr=0 ; addr<0x4000; addr+=4)
2744     {
2745         HAL_NSK2_OTP_Get(addr, 31, 0, &u32RetValue);
2746         //if( (addr&0xf) == 0)
2747         //    printf("\n");
2748 
2749         if(u32RetValue != 0)
2750         {
2751             printf("addr = %x, value = %x \n",addr, u32RetValue);
2752         }
2753     }
2754 }
2755 
2756 /* D:\Chip\Kano\acpu.bin (2015/2/2 �W�� 10:59:28)
2757    StartOffset: 00000000, EndOffset: 00003FFF, Length: 00004000 */
2758 
2759 unsigned char rawData1[16384] = {
2760 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2761 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2762 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2763 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2764 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2765 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2766 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2767 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2768 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2769 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2770 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2771 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2772 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2773 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2774 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2775 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2776 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2777 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2778 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2779 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2780 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2781 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2782 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2783 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2784 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2785 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2786 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2787 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2788 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2789 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2790 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2791 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2792 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2793 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2794 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2795 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2796 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2797 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2798 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2799 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2800 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2801 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2802 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2803 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2804 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2805 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2806 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2807 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2808 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2809 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2810 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2811 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2812 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2813 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2814 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2815 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2816 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2817 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2818 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2819 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2820 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2821 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2822 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2823 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2824 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2825 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2826 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2827 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2828 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2829 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2830 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2831 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2832 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2833 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2834 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2835 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2836 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2837 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2838 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2839 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2840 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2841 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2842 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2843 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2844 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2845 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2846 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2847 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2848 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2849 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2850 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2851 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2852 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2853 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2854 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2855 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2856 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2857 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2858 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2859 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2860 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2861 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2862 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2863 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2864 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2865 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2866 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2867 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2868 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2869 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2870 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2871 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2872 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2873 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2874 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2875 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2876 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2877 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2878 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2879 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2880 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2881 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2882 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2883 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2884 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2885 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2886 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2887 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2888 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2889 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2890 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2891 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2892 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2893 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2894 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2895 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2896 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2897 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2898 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2899 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2900 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2901 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2902 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2903 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2904 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2905 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2906 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2907 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2908 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2909 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2910 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2911 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2912 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2913 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2914 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2915 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2916 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2917 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2918 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2919 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2920 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2921 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2922 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2923 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2924 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2925 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2926 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2927 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2928 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2929 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2930 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2931 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2932 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2933 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2934 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2935 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2936 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2937 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2938 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2939 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2940 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2941 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2942 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2943 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2944 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2945 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2946 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2947 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2948 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2949 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2950 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2951 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2952 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2953 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2954 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2955 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2956 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2957 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2958 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2959 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2960 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2961 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2962 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2963 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2964 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2965 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2966 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2967 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2968 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2969 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2970 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2971 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2972 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2973 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2974 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2975 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2976 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2977 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2978 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2979 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2980 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2981 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2982 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2983 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2984 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2985 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2986 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2987 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2988 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2989 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2990 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2991 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2992 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2993 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2994 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2995 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2996 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2997 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2998 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2999 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3000 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3001 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3002 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3003 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3004 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3005 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3006 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3007 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3008 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3009 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3010 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3011 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3012 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3013 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3014 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3015 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3016 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3017 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3018 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3019 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3020 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3021 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3022 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3023 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3024 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3025 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3026 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3027 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3028 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3029 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3030 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3031 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3032 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3033 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3034 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3035 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3036 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3037 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3038 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3039 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3040 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3041 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3042 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3043 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3044 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3045 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3046 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3047 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3048 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3049 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3050 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3051 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3052 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3053 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3054 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3055 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3056 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3057 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3058 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3059 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3060 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3061 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3062 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3063 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3064 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3065 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3066 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3067 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3068 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3069 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3070 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3071 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3072 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3073 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3074 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3075 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3076 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3077 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3078 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3079 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3080 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3081 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3082 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3083 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3084 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3085 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3086 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3087 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3088 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3089 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3090 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3091 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3092 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3093 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3094 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3095 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3096 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3097 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3098 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3099 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3100 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3101 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3102 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3103 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3104 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3105 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3106 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3107 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3108 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3109 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3110 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3111 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3112 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3113 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3114 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3115 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3116 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3117 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3118 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3119 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3120 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3121 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3122 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3123 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3124 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3125 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3126 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3127 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3128 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3129 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3130 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3131 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3132 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3133 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3134 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3135 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3136 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3137 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3138 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3139 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3140 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3141 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3142 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3143 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3144 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3145 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3146 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3147 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3148 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3149 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3150 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3151 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3152 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3153 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3154 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3155 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3156 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3157 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3158 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3159 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3160 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3161 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3162 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3163 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3164 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3165 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3166 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3167 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3168 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3169 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3170 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3171 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3172 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3173 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3174 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3175 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3176 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3177 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3178 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3179 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3180 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3181 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3182 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3183 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3184 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3185 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3186 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3187 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3188 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3189 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3190 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3191 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3192 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3193 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3194 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3195 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3196 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3197 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3198 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3199 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3200 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3201 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3202 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3203 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3204 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3205 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3206 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3207 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3208 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3209 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3210 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3211 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3212 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3213 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3214 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3215 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3216 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3217 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3218 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3219 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3220 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3221 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3222 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3223 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3224 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3225 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3226 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3227 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3228 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3229 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3230 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3231 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3232 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3233 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3234 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3235 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3236 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3237 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3238 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3239 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3240 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3241 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3242 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3243 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3244 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3245 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3246 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3247 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3248 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3249 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3250 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3251 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3252 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3253 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3254 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3255 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3256 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3257 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3258 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3259 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3260 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3261 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3262 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3263 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3264 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3265 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3266 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3267 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3268 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3269 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3270 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3271 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3272 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3273 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3274 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3275 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3276 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3277 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3278 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3279 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3280 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3281 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3282 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3283 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3284 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3285 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3286 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3287 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3288 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3289 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3290 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3291 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3292 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3293 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3294 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3295 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3296 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3297 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3298 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3299 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3300 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3301 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3302 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3303 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3304 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3305 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3306 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3307 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3308 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3309 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3310 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3311 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3312 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3313 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3314 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3315 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3316 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3317 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3318 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3319 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3320 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3321 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3322 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3323 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3324 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3325 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3326 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3327 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3328 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3329 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3330 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3331 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3332 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3333 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3334 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3335 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3336 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3337 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3338 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3339 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3340 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3341 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3342 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3343 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3344 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3345 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3346 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3347 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3348 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3349 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3350 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3351 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3352 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3353 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3354 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3355 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3356 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3357 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3358 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3359 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3360 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3361 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3362 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3363 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3364 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3365 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3366 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3367 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3368 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3369 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3370 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3371 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3372 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3373 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3374 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3375 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3376 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3377 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3378 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3379 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3380 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3381 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3382 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3383 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3384 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3385 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3386 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3387 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3388 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3389 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3390 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3391 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3392 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3393 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3394 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3395 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3396 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3397 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3398 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3399 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3400 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3401 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3402 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3403 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3404 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3405 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3406 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3407 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3408 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3409 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3410 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3411 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3412 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3413 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3414 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3415 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3416 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3417 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3418 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3419 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3420 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3421 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3422 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3423 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3424 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3425 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3426 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3427 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3428 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3429 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3430 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3431 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3432 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3433 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3434 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3435 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3436 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3437 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3438 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3439 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3440 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3441 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3442 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3443 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3444 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3445 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3446 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3447 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3448 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3449 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3450 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3451 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3452 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3453 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3454 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3455 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3456 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3457 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3458 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3459 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3460 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3461 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3462 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3463 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3464 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3465 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3466 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3467 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3468 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3469 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3470 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3471 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3472 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3473 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3474 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3475 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3476 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3477 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3478 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3479 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3480 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3481 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3482 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3483 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3484 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3485 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3486 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3487 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3488 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3489 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3490 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3491 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3492 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3493 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3494 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3495 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3496 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3497 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3498 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3499 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3500 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3501 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3502 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3503 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3504 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3505 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3506 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3507 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3508 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3509 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3510 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3511 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3512 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3513 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3514 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3515 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3516 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3517 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3518 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3519 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3520 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3521 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3522 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3523 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3524 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3525 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3526 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3527 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3528 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3529 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3530 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3531 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3532 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3533 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3534 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3535 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3536 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3537 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3538 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3539 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3540 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3541 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3542 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3543 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3544 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3545 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3546 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3547 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3548 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3549 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3550 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3551 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3552 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3553 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3554 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3555 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3556 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3557 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3558 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3559 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3560 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3561 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3562 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3563 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3564 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3565 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3566 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3567 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3568 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3569 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3570 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3571 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3572 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3573 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3574 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3575 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3576 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3577 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3578 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3579 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3580 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3581 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3582 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3583 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3584 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3585 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3586 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3587 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3588 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3589 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3590 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3591 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3592 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3593 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3594 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3595 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3596 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3597 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3598 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3599 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3600 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3601 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3602 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3603 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3604 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3605 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3606 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3607 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3608 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3609 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3610 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3611 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3612 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3613 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3614 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3615 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3616 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3617 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3618 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3619 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3620 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3621 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3622 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3623 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3624 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3625 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3626 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3627 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3628 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3629 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3630 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3631 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3632 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3633 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3634 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3635 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3636 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3637 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3638 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3639 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3640 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3641 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3642 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3643 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3644 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3645 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3646 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3647 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3648 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3649 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3650 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3651 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3652 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3653 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3654 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3655 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3656 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3657 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3658 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3659 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3660 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3661 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3662 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3663 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3664 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3665 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3666 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3667 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3668 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3669 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3670 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3671 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3672 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3673 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3674 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3675 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3676 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3677 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3678 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3679 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3680 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3681 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3682 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3683 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3684 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3685 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3686 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3687 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3688 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3689 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3690 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3691 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3692 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3693 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3694 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3695 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3696 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3697 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3698 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3699 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3700 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3701 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3702 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3703 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3704 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3705 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3706 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3707 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3708 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3709 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3710 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3711 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3712 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3713 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3714 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3715 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3716 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3717 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3718 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3719 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3720 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3721 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3722 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3723 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3724 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3725 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3726 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3727 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3728 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3729 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3730 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3731 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3732 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3733 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3734 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3735 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3736 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3737 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3738 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3739 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3740 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3741 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3742 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3743 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3744 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3745 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3746 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3747 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3748 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3749 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3750 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3751 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3752 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3753 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3754 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3755 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3756 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3757 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3758 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3759 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3760 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3761 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3762 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3763 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3764 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3765 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3766 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3767 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3768 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3769 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3770 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3771 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3772 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3773 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3774 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3775 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3776 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3777 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3778 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3779 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3780 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3781 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3782 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3783 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3784 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3785 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3786 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3787 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3788 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3789 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3790 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3791 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3792 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3793 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3794 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3795 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3796 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3797 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3798 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3799 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3800 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3801 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3802 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3803 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3804 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3805 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3806 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3807 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3808 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3809 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3810 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3811 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3812 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3813 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3814 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3815 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3816 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3817 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3818 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3819 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3820 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3821 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3822 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3823 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3824 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3825 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3826 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3827 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3828 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3829 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3830 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3831 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3832 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3833 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3834 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3835 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3836 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3837 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3838 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3839 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3840 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3841 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3842 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3843 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3844 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3845 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3846 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3847 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3848 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3849 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3850 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3851 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3852 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3853 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3854 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3855 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3856 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3857 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3858 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3859 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3860 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3861 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3862 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3863 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3864 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3865 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3866 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3867 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3868 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3869 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3870 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3871 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3872 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3873 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3874 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3875 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3876 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3877 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3878 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3879 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3880 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3881 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3882 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3883 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3884 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3885 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3886 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3887 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3888 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3889 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3890 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3891 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3892 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3893 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3894 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3895 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3896 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3897 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3898 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3899 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3900 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3901 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3902 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3903 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3904 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3905 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3906 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3907 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3908 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3909 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3910 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3911 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3912 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3913 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3914 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3915 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3916 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3917 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3918 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3919 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3920 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3921 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3922 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3923 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3924 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3925 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3926 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3927 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3928 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3929 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3930 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3931 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3932 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3933 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3934 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3935 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3936 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3937 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3938 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3939 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3940 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3941 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3942 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3943 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3944 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3945 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3946 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3947 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3948 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3949 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3950 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3951 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3952 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3953 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3954 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3955 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3956 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3957 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3958 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3959 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3960 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3961 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3962 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3963 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3964 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3965 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3966 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3967 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3968 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3969 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3970 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3971 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3972 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3973 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3974 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3975 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3976 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3977 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3978 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3979 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3980 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3981 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3982 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3983 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3984 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3985 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3986 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3987 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3988 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3989 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3990 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3991 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3992 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3993 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3994 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3995 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3996 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3997 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3998 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
3999 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4000 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4001 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4002 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4003 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4004 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4005 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4006 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4007 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4008 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4009 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4010 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4011 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4012 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4013 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4014 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4015 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4016 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4017 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4018 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4019 	0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
4020 	0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4021 	0xDB, 0xB6, 0x6D, 0x00, 0x00, 0xFF, 0x00, 0x00, 0x11, 0x00, 0x02, 0x01,
4022 	0x40, 0x01, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4023 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4024 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4025 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4026 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4027 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4028 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4029 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4030 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4031 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4032 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4033 	0x00, 0x00, 0x00, 0x00, 0x01, 0xEF, 0xCD, 0xAB, 0x89, 0x67, 0x45, 0x23,
4034 	0x01, 0xEF, 0xCD, 0xAB, 0x89, 0x67, 0x45, 0x23, 0x12, 0xF0, 0xDE, 0xBC,
4035 	0x9A, 0x78, 0x56, 0x34, 0x12, 0xF0, 0xDE, 0xBC, 0x9A, 0x78, 0x56, 0x34,
4036 	0x10, 0x32, 0x54, 0x76, 0x98, 0xBA, 0xDC, 0xFE, 0x10, 0x32, 0x54, 0x76,
4037 	0x98, 0xBA, 0xDC, 0xFE, 0xEF, 0xCD, 0xAB, 0x89, 0x67, 0x45, 0x23, 0x01,
4038 	0xEF, 0xCD, 0xAB, 0x89, 0x67, 0x45, 0x23, 0x01, 0xF0, 0xDE, 0xBC, 0x9A,
4039 	0x78, 0x56, 0x34, 0x12, 0xF0, 0xDE, 0xBC, 0x9A, 0x78, 0x56, 0x34, 0x12,
4040 	0x33, 0x33, 0x33, 0x33, 0xCC, 0xCC, 0xCC, 0xCC, 0x55, 0x55, 0x55, 0x55,
4041 	0xAA, 0xAA, 0xAA, 0xAA, 0xEE, 0xEE, 0x77, 0x77, 0x66, 0x66, 0x99, 0x99,
4042 	0x33, 0x33, 0xCC, 0xCC, 0xAA, 0xAA, 0x55, 0x55, 0x78, 0x56, 0x34, 0x12,
4043 	0x78, 0x56, 0x34, 0x12, 0x78, 0x56, 0x34, 0x12, 0x78, 0x56, 0x34, 0x12,
4044 	0xFD, 0x00, 0x69, 0x00, 0x7A, 0x00, 0x6E, 0x00, 0x44, 0x00, 0xDA, 0x00,
4045 	0xB2, 0x00, 0x14, 0x00, 0x1C, 0x3C, 0xEC, 0x0F, 0x5A, 0x7A, 0x03, 0x67,
4046 	0x43, 0xEF, 0xFC, 0xAE, 0xDC, 0xC8, 0x3A, 0xD2, 0x00, 0x00, 0x00, 0x00,
4047 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
4048 	0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4049 	0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11,
4050 	0x11, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4051 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4052 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4053 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4054 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4055 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4056 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4057 	0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4058 	0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4059 	0xA1, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4060 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4061 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4062 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4063 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4064 	0x00, 0x00, 0x00, 0x00, 0x11, 0x51, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00,
4065 	0x50, 0x4F, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4066 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x23, 0x01, 0x01, 0x00,
4067 	0x11, 0x11, 0x01, 0x11, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00,
4068 	0x11, 0x11, 0x11, 0x11, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
4069 	0x11, 0x11, 0x01, 0x00, 0x11, 0x11, 0x00, 0x00, 0x11, 0x11, 0x01, 0x00,
4070 	0x11, 0x02, 0x00, 0x00, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00,
4071 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4072 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4073 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4074 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4075 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4076 	0x12, 0x20, 0x21, 0x09, 0x06, 0xD0, 0x78, 0x86, 0x00, 0x00, 0x00, 0x00,
4077 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4078 	0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
4079 	0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4080 	0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
4081 	0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4082 	0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00,
4083 	0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4084 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4085 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4086 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xB0,
4087 	0x09, 0x01, 0x00, 0xFE, 0x41, 0xFE, 0x0A, 0x00, 0xFD, 0x00, 0xA0, 0xFF,
4088 	0x00, 0x00, 0x40, 0xB0, 0x09, 0x02, 0x00, 0xFD, 0x81, 0xFD, 0x0A, 0x00,
4089 	0xED, 0x00, 0xE7, 0xFF, 0x00, 0x00, 0x40, 0xA0, 0x09, 0x03, 0x00, 0xFF,
4090 	0xC0, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xE7, 0xFF, 0x00, 0x00, 0x40, 0x80,
4091 	0x09, 0x04, 0x00, 0xFF, 0xC0, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xE7, 0xFF,
4092 	0x00, 0x00, 0x40, 0xB2, 0x09, 0x05, 0x00, 0xFF, 0xC0, 0xFF, 0x00, 0x00,
4093 	0xFF, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x40, 0x90, 0x09, 0x06, 0x00, 0xFF,
4094 	0xC0, 0xFF, 0x00, 0x00, 0xFF, 0x00, 0xF7, 0xFF, 0x00, 0x00, 0x40, 0xB0,
4095 	0x09, 0x07, 0x00, 0xFD, 0xC5, 0xFD, 0x00, 0x00, 0xEF, 0x00, 0xF7, 0xFF,
4096 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4097 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4098 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4099 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4100 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4101 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4102 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4103 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4104 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4105 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4106 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xCD, 0x07, 0x2C, 0xD8,
4107 	0xBE, 0x6F, 0x9F, 0x62, 0xAC, 0x4C, 0x09, 0xC2, 0x82, 0x06, 0xE7, 0xE3,
4108 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4109 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4110 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4111 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4112 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4113 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4114 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4115 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4116 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4117 	0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4118 	0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4119 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4120 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4121 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4122 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4123 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4124 	0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
4125 	0x55, 0xAA, 0x00, 0x00
4126 };
4127 
4128 static MS_U32 OTPConfig[0x4000];
4129 
HAL_NSK2_WriteAllOTP(MS_U32 index)4130 void HAL_NSK2_WriteAllOTP(MS_U32 index)
4131 {
4132     memset(OTPConfig,0x0,0x4000);
4133 
4134     if(index == 1)
4135     {
4136         memcpy(OTPConfig, rawData1, 0x4000);
4137     }
4138 
4139     MS_U32 addr;
4140 
4141     printf("start to write OTP\n");
4142     for( addr=0 ; addr<0x4000; addr+=4)
4143     {
4144         if(OTPConfig[addr/4] != 0)
4145         {
4146             printf("addr = %x, value = %x\n", addr, OTPConfig[addr/4]);
4147             OTP_REG(addr) = OTPConfig[addr/4];
4148         }
4149     }
4150 
4151     printf("finish HAL_NSK2_WriteAllOTP\n");
4152 }
4153 
4154 
HAL_NSK2_ReadKTEResp(void)4155 MS_U32 HAL_NSK2_ReadKTEResp(void)
4156 {
4157     StatusCheck(HAL_NSK2_CheckBusy());
4158 
4159     MS_U32 u32KTEResp;
4160     u32KTEResp = NI_REG(REG_NI_NSK2_KTE_RESP);
4161 
4162     printf("KTE_RESP = %x\n",u32KTEResp);
4163 
4164     return u32KTEResp;
4165 }
4166 
HAL_NSK2_GetPubOTP(MS_U8 * pPubOTP)4167 MS_BOOL HAL_NSK2_GetPubOTP(MS_U8 *pPubOTP)
4168 {
4169 #if 0
4170 Table 7 Public OTP Bits
4171 Bit 	Name 	Description
4172 127:64 	U_OTP_v_pubOtpUniqueID1 	OTP unique ID.
4173 This field is unique chip data that can be shared with other non-NDS modules.
4174 63:48 	U_OTP_v_PubOtpGP 	        General purpose OTP field.
4175 47:40 	U_OTP_v_PubOtpMinConfVer 	OTPpublic minimum configuration version.
4176 39:36 	U_OTP_v_PubOtpRsaIndex   	OTP public RSA index
4177 35:32 	U_OTP_v_PubOtpBID       	OTP public BlackBox ID
4178 31:16 	U_OTP_v_PubOtpVID        	OTP public version ID
4179 15:0 	U_OTP_v_PubOtpOID       	OTP public owner ID
4180 #endif
4181 
4182 //U_OTP_v_pubOtpUniqueID1           0x3DA8  63  0
4183 //U_OTP_v_PubOtpGP                  0x3B08  15  0
4184 //U_OTP_v_PubOtpMinConfVer          0x3B14   7  0
4185 //U_OTP_v_PubOtpRsaIndex            0x3B10   3  0
4186 //U_OTP_v_PubOtpBID                 0x3B0C   3  0
4187 //U_OTP_v_PubOtpVID                 0x3B04  15  0
4188 //U_OTP_v_PubOtpOID                 0x3B00  15  0
4189 
4190     MS_U8 *pRunPubOTP = (MS_U8 *)pPubOTP;
4191     MS_U32 ReadValue,ReadValue2;
4192 
4193     HAL_NSK2_OTP_Get(0x3B00, 15, 0, &ReadValue);
4194     printf("U_OTP_v_PubOtpOID = %x\n",ReadValue);
4195     memcpy(pRunPubOTP,&ReadValue,2);
4196     pRunPubOTP += 2;
4197 
4198     HAL_NSK2_OTP_Get(0x3B04, 15, 0, &ReadValue);
4199     printf("U_OTP_v_PubOtpVID = %x\n",ReadValue);
4200     memcpy(pRunPubOTP,&ReadValue,2);
4201     pRunPubOTP += 2;
4202 
4203     HAL_NSK2_OTP_Get(0x3B0C, 3, 0, &ReadValue);
4204     printf("U_OTP_v_PubOtpBID = %x\n",ReadValue);
4205     HAL_NSK2_OTP_Get(0x3B10, 3, 0, &ReadValue2);
4206     printf("U_OTP_v_PubOtpRsaIndex = %x\n",ReadValue2);
4207     *pRunPubOTP = (MS_U8)(ReadValue&0xF) + (MS_U8)((ReadValue2&0xF)<<4);
4208     pRunPubOTP ++;
4209 
4210     HAL_NSK2_OTP_Get(0x3B14, 7, 0, &ReadValue);
4211     printf("U_OTP_v_PubOtpMinConfVer = %x\n",ReadValue);
4212     memcpy(pRunPubOTP,&ReadValue,1);
4213     pRunPubOTP ++;
4214 
4215     HAL_NSK2_OTP_Get(0x3B08, 15, 0, &ReadValue);
4216     printf("U_OTP_v_PubOtpGP = %x\n",ReadValue);
4217     memcpy(pRunPubOTP,&ReadValue,2);
4218     pRunPubOTP += 2;
4219 
4220     HAL_NSK2_OTP_Get(0x3DA8, 31, 0, &ReadValue);
4221     printf("U_OTP_v_pubOtpUniqueID1 = %x\n",ReadValue);
4222     memcpy(pRunPubOTP,&ReadValue,4);
4223     pRunPubOTP += 4;
4224 
4225     HAL_NSK2_OTP_Get(0x3DAC, 31, 0, &ReadValue);
4226     memcpy(pRunPubOTP,&ReadValue,4);
4227     pRunPubOTP += 4;
4228 
4229     return TRUE;
4230 }
4231 
HAL_NSK21_InvalidCmChannel(MS_U16 PidSlot)4232 MS_U32 HAL_NSK21_InvalidCmChannel(MS_U16 PidSlot)
4233 {
4234     HALNSK2_DBG(NSK2_DBGLV_INFO,"%s PidSlot = %x\n", __FUNCTION__,PidSlot);
4235 
4236     MS_U32 u32PidSlot = 0;
4237     StatusCheck(HAL_NSK2_CheckBusy());
4238 
4239     u32PidSlot = (((MS_U32)PidSlot<<NI_WriteTKey_PidNo_Shift)&NI_WriteTransportKey_PidNo);
4240     NI_REG(REG_NI_COMMAND) = (NI_COMMAND_START | NI_InvalidateCmChannel | u32PidSlot);
4241 
4242     return TRUE;
4243 }
4244 
4245 typedef enum
4246 {
4247     NSK21_DVBCSA2 = 0,
4248     NSK21_DVBCSA2_CONF,
4249     NSK21_DVBCSA3,
4250     NSK21_CPCM_LSA_MDI_CBC,
4251     NSK21_CPCM_LSA_MDI_RCBC,
4252     NSK21_CPCM_LSA_MDD_CBC,  //5
4253     NSK21_CPCM_LSA_MDD_RCBC,
4254     NSK21_SYNAMEDIA_AES,
4255     NSK21_AES_ECB_CLR,
4256     NSK21_CIPLUS_AES,
4257     NSK21_SCTE41_DES, //10
4258     NSK21_SCTE52_DES,
4259     NSK21_TDES_ECB_CLR,
4260     NSK21_MULTI2_TS,
4261     NSK21_TDES_ECB_CTS,
4262     NSK21_DES_ECB_CTS, //15
4263     NSK21_IDSA_AES,
4264 }NSK21_CMChAlgo_e;
4265 
HAL_NSK21_CfgCmChannel(MS_U16 PidSlot,MS_U16 LocalDAlgo,MS_U16 ESAAlgo,MS_U16 LocalSAlgo,MS_U16 SysKeyIndex)4266 MS_U32 HAL_NSK21_CfgCmChannel(MS_U16 PidSlot, MS_U16 LocalDAlgo, MS_U16  ESAAlgo, MS_U16 LocalSAlgo, MS_U16 SysKeyIndex)
4267 {
4268     HALNSK2_DBG(NSK2_DBGLV_INFO,"HAL_NSK2_CfgCmChannel PidSlot = %x, LocalDAlgo = %x, ESAAlgo = %x, LocalSAlgo = %x, SysKeyIndex = %x\n",PidSlot, LocalDAlgo, ESAAlgo, LocalSAlgo, SysKeyIndex);
4269     StatusCheck(HAL_NSK2_CheckBusy());
4270     MS_U32 algorithms = 0, u32PidSlot = 0;
4271 
4272 #if 1 //tmp solution...
4273     algorithms = ((LocalDAlgo - 100) & NI_KIW_LSAD_ALGO_MASK) +
4274                  (((ESAAlgo - 100) << NI_KIW_ESA_ALGO_SHIFT) & NI_KIW_ESA_ALGO_MASK) +
4275                  (((LocalSAlgo - 100) << NI_KIW_LSAS_ALGO_SHIFT) & NI_KIW_LSAS_ALGO_MASK) ;
4276 #else
4277     algorithms = (LocalDAlgo & NI_KIW_LSAD_ALGO_MASK) +
4278                  ((ESAAlgo << NI_KIW_ESA_ALGO_SHIFT) & NI_KIW_ESA_ALGO_MASK) +
4279                  ((LocalSAlgo << NI_KIW_LSAS_ALGO_SHIFT) & NI_KIW_LSAS_ALGO_MASK) ;
4280 #endif
4281 
4282     HALNSK2_DBG(NSK2_DBGLV_INFO,"algorithms = %x\n",algorithms);
4283     NI_REG(REG_NI_DSCMB_ALGO) = algorithms;
4284 
4285     u32PidSlot = (((MS_U32)PidSlot<<NI_WriteTKey_PidNo_Shift)&NI_WriteTransportKey_PidNo);
4286     NI_REG(REG_NI_COMMAND) = (NI_COMMAND_START | NI_ConfigureCmChannel | u32PidSlot);
4287     MsOS_DelayTaskUs(1);
4288     HALNSK2_DBG(NSK2_DBGLV_INFO,"REG_NI_DSCMB_ALGO = %x\n",NI_REG(REG_NI_DSCMB_ALGO));
4289 
4290     return TRUE;
4291 }
4292 
HAL_NSK21_WriteTransportKey(MS_U8 SCB,MS_U8 ForceSCB,void * pLocalDIV1,void * pLocalDIV2,void * pESAIV1,void * pESAIV2,void * pLocalSIV1,void * pLocalSIV2,MS_U16 PidSlot)4293 MS_U32 HAL_NSK21_WriteTransportKey(MS_U8 SCB, MS_U8 ForceSCB, void *pLocalDIV1, void *pLocalDIV2,
4294                                    void *pESAIV1, void *pESAIV2, void *pLocalSIV1, void *pLocalSIV2, MS_U16 PidSlot )
4295 {
4296     HALNSK2_DBG(NSK2_DBGLV_INFO,"HAL_NSK21_WriteTransportKey PidSlot = %x, SCB = %x, ForceSCB = %x\n", PidSlot, SCB, ForceSCB);
4297 
4298     MS_U32 data,data2;
4299     //check NULL pointer or not....
4300 
4301     StatusCheck(HAL_NSK2_CheckBusy());
4302 
4303     data = NI_REG(REG_NI_KTE_STATUS);
4304     if( ( data & NI_KTE_DEST_MASK ) == 0  )
4305     {
4306 
4307 		ForceSCB = HAL_NSK2_SCBTransToHW(ForceSCB);
4308 
4309         HALNSK2_DBG(NSK2_DBGLV_INFO,"PidSlot: %x\n", PidSlot);
4310         data2 = (((MS_U32)PidSlot<<NI_WriteTKey_PidNo_Shift)&NI_WriteTransportKey_PidNo) +
4311                 (((MS_U32)SCB<<NI_WriteTKey_SCB_Shift) & NI_WriteTKey_SCB_MASK)
4312                 + ( ( (MS_U32)ForceSCB<<NI_WriteTKey_FSCB_Shift) & NI_WriteTKey_FSCB_MASK) ;
4313 
4314     #if 0
4315         NI_REG(REG_NI_COMMAND) = (NI_COMMAND_START | NI_WriteTransportKey | data2 | NI_OTP_ACK_NSK2 | NI_ERR_INVALID_SLOT);
4316     #else
4317         NI_REG(REG_NI_COMMAND) = (NI_COMMAND_START | NI_WriteTransportKey | data2);
4318     #endif
4319         HALNSK2_DBG(NSK2_DBGLV_INFO,"NI 6 = %x\n", NI_REG(REG_NI_COMMAND));
4320 
4321         StatusCheck(HAL_NSK2_KIW_BusyPolling());
4322     }
4323     else
4324     {
4325         HALNSK2_DBG(NSK2_DBGLV_ERR,"WriteTransportKey abnormal ignored: KteDest not zero\n");
4326         return HAL_NSK2_ReadKTEResp();
4327     }
4328 
4329     return HAL_NSK2_ReadKTEResp();
4330 }
4331 
HAL_NSK21_WriteM2MKey(MS_U32 M2MAlgo)4332 MS_U32 HAL_NSK21_WriteM2MKey(MS_U32 M2MAlgo)
4333 {
4334     HALNSK2_DBG(NSK2_DBGLV_INFO,"%s M2MAlgo = %x\n",__FUNCTION__,M2MAlgo);
4335 
4336     MS_U32 algorithms;
4337 
4338     StatusCheck(HAL_NSK2_CheckBusy());
4339 
4340     algorithms = (M2MAlgo & NI_KIW_LSAD_ALGO_MASK) +
4341                  ((M2MAlgo << NI_KIW_LSAS_ALGO_SHIFT) & NI_KIW_LSAS_ALGO_MASK) ;
4342 
4343     HALNSK2_DBG(NSK2_DBGLV_INFO,"algorithms = %x\n",algorithms);
4344     NI_REG(REG_NI_DSCMB_ALGO) = algorithms;
4345     NI_REG(REG_NI_COMMAND) = (NI_COMMAND_START | NI_WriteM2MKey);
4346 
4347     MsOS_DelayTaskUs(1);
4348 
4349     return HAL_NSK2_ReadKTEResp();
4350 }
4351 
HAL_NSK21_ModifyGenIn(MS_U32 MaskVal,MS_U32 XorVal)4352 MS_U32 HAL_NSK21_ModifyGenIn(MS_U32 MaskVal,MS_U32 XorVal)
4353 {
4354     MS_U32 GenIn = 0, WriteGenIn = 0;
4355 
4356     StatusCheck(HAL_NSK2_CheckBusy());
4357 
4358     GenIn = NI_REG(REG_NI_NSK2_REG_GENIN);
4359 
4360     HALNSK2_DBG(NSK2_DBGLV_INFO,"%s GenIn = %x\n",__FUNCTION__,GenIn);
4361 
4362     GenIn = (GenIn&MaskVal);
4363 
4364     HALNSK2_DBG(NSK2_DBGLV_INFO,"%s GenIn = %x, XorVal = %x\n",__FUNCTION__,GenIn,XorVal);
4365 
4366     WriteGenIn = GenIn^XorVal;
4367     printf("WriteGenIn = %x\n",WriteGenIn);
4368 
4369 #ifdef TestGenIn
4370     NI_REG(REG_NI_NSK21_GENIN) = WriteGenIn;
4371     MsOS_DelayTaskUs(10);
4372 #else
4373 
4374     NI_REG(REG_NI_NSK21_GENIN) = (WriteGenIn & BMASK(9:0));
4375 
4376     NI_REG(REG_NI_NSK21_CONCURR_PROT_EN) = ((WriteGenIn>>10) & BMASK(1:0));
4377     NI_REG(REG_NI_NSK21_CONCURR_SET) = ((WriteGenIn>>12) & BMASK(0:0));
4378     NI_REG(REG_NI_NSK21_GEN_SHOT) = ((WriteGenIn>>14) & BMASK(3:0));
4379 
4380     MsOS_DelayTaskUs(10);
4381 
4382     HALNSK2_DBG(NSK2_DBGLV_INFO,"CONCURR_PROT_EN = %x, CONCURR_SET = %x, GEN_SHOT = %x\n", NI_REG(REG_NI_NSK21_CONCURR_PROT_EN), NI_REG(REG_NI_NSK21_CONCURR_SET), NI_REG(REG_NI_NSK21_GEN_SHOT));
4383 #endif
4384     GenIn = NI_REG(REG_NI_NSK2_REG_GENIN);
4385 
4386     HALNSK2_DBG(NSK2_DBGLV_INFO,"%s GenIn = %x\n",__FUNCTION__,GenIn);
4387 
4388     if(GenIn == WriteGenIn)
4389         return TRUE;
4390     else
4391         return FALSE;
4392 
4393 }
4394 
HAL_NSK21_GetGenIn(void)4395 MS_U32 HAL_NSK21_GetGenIn(void)
4396 {
4397     return NI_REG(REG_NI_NSK2_REG_GENIN);
4398 }
4399 
HAL_NSK21_ReadNIReg(MS_U32 offset)4400 MS_U32 HAL_NSK21_ReadNIReg(MS_U32 offset)
4401 {
4402     return NI_REG(offset);
4403 }
4404 
HAL_NSK21_WriteNIReg(MS_U32 offset,MS_U32 Value)4405 void HAL_NSK21_WriteNIReg(MS_U32 offset, MS_U32 Value)
4406 {
4407     NI_REG(offset) = Value;
4408 }
4409 
HAL_NSK21_WriteJTagKey(MS_U32 OverrideOid,MS_U32 Select)4410 MS_U32 HAL_NSK21_WriteJTagKey(MS_U32 OverrideOid, MS_U32 Select)
4411 {
4412     HALNSK2_DBG(NSK2_DBGLV_INFO,"%s OverrideOid = %x, Select = %x\n",__FUNCTION__,OverrideOid,Select);
4413 
4414     MS_U32 functionality;
4415 
4416     StatusCheck(HAL_NSK2_CheckBusy());
4417 
4418     functionality =  (Select << NI_WriteTKey_PidNo_Shift) & NI_WriteTransportKey_PidNo ;
4419 
4420     HALNSK2_DBG(NSK2_DBGLV_INFO,"functionality = %x\n",functionality);
4421     NI_REG(REG_NI_COMMAND) = (NI_COMMAND_START | NI_WriteJTAGKey | functionality);
4422 
4423     MsOS_DelayTaskUs(1);
4424 
4425     return HAL_NSK2_ReadKTEResp();
4426 }
4427 
HAL_NSK21_IncrementNvCounter(void)4428 MS_U32 HAL_NSK21_IncrementNvCounter(void)
4429 {
4430     HALNSK2_DBG(NSK2_DBGLV_INFO,"%s \n",__FUNCTION__);
4431 
4432     StatusCheck(HAL_NSK2_CheckBusy());
4433 
4434     NI_REG(REG_NI_COMMAND) = (NI_COMMAND_START | NI_IncrementNvCounter);
4435     MsOS_DelayTaskUs(1);
4436 
4437     return HAL_NSK2_ReadKTEResp();
4438 }
4439 
HAL_NSK2_WriteOtpKey(void)4440 MS_U32 HAL_NSK2_WriteOtpKey(void)
4441 {
4442     HALNSK2_DBG(NSK2_DBGLV_INFO,"%s \n",__FUNCTION__);
4443     StatusCheck(HAL_NSK2_CheckBusy());
4444 
4445     NI_REG(REG_NI_COMMAND) = (NI_COMMAND_START | NI_WriteOTPKey);
4446     MsOS_DelayTaskUs(1);
4447 
4448     return HAL_NSK2_ReadKTEResp();
4449 }
4450 
4451