tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / cpu / armv7 / sc8825 / sec_boot.c
1 #include <common.h>
2 #include <asm/arch/common.h>
3 #include <malloc.h>
4
5 #ifdef CONFIG_NAND_SPL
6 #define panic(x...) do{}while(0)
7 #define printf(x...) do{}while(0)
8 #endif
9 int test_rsa(void);
10 #if 1
11 //#ifdef CONFIG_NAND_SPL 
12 #define dump_all_buffer(x...) do{}while(0)
13 #else
14 void dump_all_buffer(unsigned char *buf, unsigned long len)
15 {
16     unsigned long row, col;
17     unsigned int offset;
18     unsigned long total_row, remain_col;
19     unsigned long flag = 1;
20
21     total_row = len / 16;
22     remain_col = len - total_row * 16;
23     offset = 0;
24     for (row = 0; row < total_row; row ++) {
25         if (flag == 1) {
26             printf("%08xh: ", offset);
27             for (col = 0; col < 16; col ++)
28                 printf("%02x ", buf[offset + col]);
29             printf("\n");
30         }
31         offset += 16;
32     }
33
34     if (remain_col > 0) {
35         if (flag == 1) {
36             printf("%08xh: ", offset);
37             for (col = 0; col < remain_col; col ++)
38                 printf("%02x ", buf[offset + col]);
39             printf("\n");
40         }
41     }
42
43     printf("\n");
44 }
45
46 #endif
47
48 int secureboot_enabled(void)
49 {
50         return 0;
51 }
52 int harshVerify(uint8_t *data, uint32_t data_len, uint8_t *data_hash, uint8_t *data_key)
53 {
54         return 1;
55 }
56
57 void secure_check(uint8_t *data, uint32_t data_len, uint8_t *data_hash, uint8_t *data_key)
58 {
59         return;
60 }
61
62 #ifndef CONFIG_NAND_SPL
63 int cal_md5(void *data, uint32_t orig_len, void *harsh_data)
64 {
65         return 0;
66 }
67 #endif
68