Merge tag 'v3.10.67' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / mach / mt_sec_hal_tee.h
1 /*
2 * Copyright (C) 2012 MediaTek, Inc.
3 *
4 * This software is licensed under the terms of the GNU General Public
5 * License version 2, as published by the Free Software Foundation, and
6 * may be copied, distributed, and modified under those terms.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 */
14
15 #ifndef __MT_SEC_HAL_TEE_H__
16 #define __MT_SEC_HAL_TEE_H__
17
18 typedef enum {
19 HACC_USER1 = 0,
20 HACC_USER2,
21 HACC_USER3,
22 HACC_USER4
23 } HACC_USER;
24
25 int masp_hal_get_uuid(unsigned int *uuid);
26 int masp_hal_sbc_enabled(void);
27 int masp_hal_get_sbc_checksum(unsigned int *pChecksum);
28 unsigned char masp_hal_secure_algo_init(void);
29 unsigned char masp_hal_secure_algo_deinit(void);
30 void masp_hal_secure_algo(unsigned char Direction, unsigned int ContentAddr,
31 unsigned int ContentLen, unsigned char *CustomSeed,
32 unsigned char *ResText);
33 unsigned int masp_hal_sp_hacc_init(unsigned char *sec_seed, unsigned int size);
34 unsigned int masp_hal_sp_hacc_blk_sz(void);
35 unsigned char *masp_hal_sp_hacc_enc(unsigned char *buf, unsigned int size, unsigned char bAC,
36 HACC_USER user, unsigned char bDoLock);
37 unsigned char *masp_hal_sp_hacc_dec(unsigned char *buf, unsigned int size, unsigned char bAC,
38 HACC_USER user, unsigned char bDoLock);
39
40 #endif /* !__MT_SEC_HAL_H__ */