summaryrefstree
path: root/kernel/include/linux/spu-verify.h
blob: 3fac19d8d5584c7d154b1b765518e35b4fdea677 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/*
 * spu-verify.h
 *
 * Author: JJungs-lee <jhs2.lee@samsung.com>
 *
 */
#ifndef _SPU_VERIFY_H_
#define _SPU_VERIFY_H_

#include <linux/string.h>

/* TAG NAME */
#define TSP_TAG 		"TSP"
#define MFC_TAG 		"MFC"
#define WACOM_TAG 		"WACOM"
#define PDIC_TAG 		"PDIC"
#define SENSORHUB_TAG 	"SENSORHUB"

/* METADATA LEN */
#define DIGEST_LEN 		32
#define SIGN_LEN 		512

/* TAG LEN */
#define TAG_LEN(FW)			strlen(FW##_TAG)

/* TOTAL METADATA SIZE */
#define SPU_METADATA_SIZE(FW) 	( (TAG_LEN(FW)) + (DIGEST_LEN) + (SIGN_LEN) )

extern long spu_firmware_signature_verify(const char* fw_name, const u8* fw_data, const long fw_size);

#endif //end _SPU_VERIFY_H_