• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2022 Huawei Technologies Co., Ltd.
3  * Decription: check compatibility between tzdriver and teeos.
4  *
5  * This software is licensed under the terms of the GNU General Public
6  * License version 2, as published by the Free Software Foundation, and
7  * may be copied, distributed, and modified under those terms.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  */
14 #ifndef TEE_COMPAT_CHECK_H
15 #define TEE_COMPAT_CHECK_H
16 
17 #include <linux/types.h>
18 
19 /*
20  * this version number MAJOR.MINOR is used
21  * to identify the compatibility of tzdriver and teeos
22  */
23 #define TEEOS_COMPAT_LEVEL_MAJOR 2
24 #define TEEOS_COMPAT_LEVEL_MINOR 0
25 
26 #define VER_CHECK_MAGIC_NUM 0x5A5A5A5A
27 #define COMPAT_LEVEL_BUF_LEN 12
28 
29 int32_t check_teeos_compat_level(const uint32_t *buffer, uint32_t size);
30 #endif
31