2 #include <asm/arch/common.h>
6 #define panic(x...) do{}while(0)
7 #define printf(x...) do{}while(0)
11 //#ifdef CONFIG_NAND_SPL
12 #define dump_all_buffer(x...) do{}while(0)
14 void dump_all_buffer(unsigned char *buf, unsigned long len)
16 unsigned long row, col;
18 unsigned long total_row, remain_col;
19 unsigned long flag = 1;
22 remain_col = len - total_row * 16;
24 for (row = 0; row < total_row; row ++) {
26 printf("%08xh: ", offset);
27 for (col = 0; col < 16; col ++)
28 printf("%02x ", buf[offset + col]);
36 printf("%08xh: ", offset);
37 for (col = 0; col < remain_col; col ++)
38 printf("%02x ", buf[offset + col]);
48 #define MD5NUM_SZ (16)
59 #define VLR_MAGIC (0x524c56ff)
69 uint32_t *g_TraceValue;
70 uint8_t *efuse_harsh_data;
71 uint8_t *soft_harsh_data;
72 int (*CheckSecureBootEnable)(void);
73 int (*HarshVerify)(uint32_t *, uint32_t);
74 void (*RSA_ModPower)(uint32_t *p, uint32_t *m, uint32_t *r2, uint32_t e);
75 void (*MD5Init)(unsigned int *g_data_prt);
76 void (*MD5Final)(unsigned int *input, unsigned int inputLen, unsigned int *g_data_ptr);
79 const uint32_t __harsh_func_hack[] ={
96 #define MAKE_DWORD(a,b,c,d) (uint32_t)(((uint32_t)(a)<<24) | (uint32_t)(b)<<16 | ((uint32_t)(c)<<8) | ((uint32_t)(d)))
98 void RSA_Decrypt(unsigned char *p, unsigned char *m, unsigned char *r2, unsigned char *e)
103 int secureboot_enabled(void)
107 unsigned int md5_buf[20] = {0};
108 int harshVerify(uint8_t *data, uint32_t data_len, uint8_t *data_hash, uint8_t *data_key)
113 void secure_check(uint8_t *data, uint32_t data_len, uint8_t *data_hash, uint8_t *data_key)
118 #ifndef CONFIG_NAND_SPL
119 int cal_md5(void *data, uint32_t orig_len, void *harsh_data)