|
@@ -77,35 +77,56 @@ BladeStatus_T gBladeStatus[BLADE_NUMBERS] = {
|
|
|
static int tmp_fd;
|
|
|
void main(void)
|
|
|
{
|
|
|
-// if(0 != cm_Auth_Encrp_Init(1, 1, TRUE))
|
|
|
-// {
|
|
|
-// printf("Initialize AT88SC0104C failed!\n");
|
|
|
-// sleep(1);
|
|
|
-// return;
|
|
|
-// }
|
|
|
-// printf("cm_Auth_Encrp_Init ok\n");
|
|
|
|
|
|
-// #if 0
|
|
|
-// if(0 != cm_Auth_Encrp_Personal(1, 1))
|
|
|
-// {
|
|
|
-// printf("Personal AT88SC0104C failed!\n");
|
|
|
-// sleep(1);
|
|
|
-// return ;
|
|
|
-// }
|
|
|
-// #endif
|
|
|
+ unsigned char license[128]={0};
|
|
|
+ int i = 0;
|
|
|
+ for (i = 0; i<128; i++){
|
|
|
+ license[i] = i;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ InternalFlash_WriteBuf(license, 128);
|
|
|
+
|
|
|
+ unsigned char * pfls = 0;
|
|
|
+ unsigned int addrs = 0x08060000;
|
|
|
+
|
|
|
+ for (i = 0; i<128; i++){
|
|
|
+
|
|
|
+ pfls = (unsigned char*)addrs;
|
|
|
+
|
|
|
+ printf("%x:%x \n", addrs, *pfls);
|
|
|
+ addrs++;
|
|
|
+ }
|
|
|
|
|
|
-// if(0 != test_cryptomem())
|
|
|
-// {
|
|
|
-// while(1)
|
|
|
-// {
|
|
|
-// printf("Illegal Board!\n");
|
|
|
-// sleep(3);
|
|
|
-// }
|
|
|
-// }
|
|
|
|
|
|
- //检查软件授权
|
|
|
- if(CheckLicense() != 0)
|
|
|
- exit(0);
|
|
|
+ printf("\n\n");
|
|
|
+
|
|
|
+
|
|
|
+ if(0 != cm_Auth_Encrp_Init(1, 1, TRUE))
|
|
|
+ {
|
|
|
+ printf("Initialize AT88SC0104C failed!\n");
|
|
|
+ sleep(1);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ printf("cm_Auth_Encrp_Init ok\n");
|
|
|
+
|
|
|
+#if 0
|
|
|
+ if(0 != cm_Auth_Encrp_Personal(1, 1))
|
|
|
+ {
|
|
|
+ printf("Personal AT88SC0104C failed!\n");
|
|
|
+ sleep(1);
|
|
|
+ return ;
|
|
|
+ }
|
|
|
+#endif
|
|
|
+
|
|
|
+ if(0 != test_cryptomem())
|
|
|
+ {
|
|
|
+ while(1)
|
|
|
+ {
|
|
|
+ printf("Illegal Board!\n");
|
|
|
+ sleep(3);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
PlatformInit();
|
|
|
Init_IPMI_FRU_SDR_SEL();
|