Skip to content

Commit dc17f28

Browse files
committed
rimage: manifest: add 1.5 manifest define
add 1.5 manifest structure define, macro define, KBL and SKL 1.5 manifest defines Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
1 parent f89a4a5 commit dc17f28

3 files changed

Lines changed: 64 additions & 2 deletions

File tree

rimage/css.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
struct image;
2020

21+
#define MAN_CSS_LT_MODULE_TYPE 0x00000006
2122
#define MAN_CSS_MOD_TYPE 4
2223
#define MAN_CSS_HDR_SIZE 161 /* in words */
2324
#define MAN_CSS_HDR_VERSION 0x10000
@@ -29,6 +30,8 @@ struct image;
2930
#define MAN_CSS_EXP_SIZE (MAN_RSA_KEY_EXPONENT_LEN >> 2)
3031
#define MAN_CSS_MAN_SIZE_V1_8 \
3132
(sizeof(struct fw_image_manifest_v1_8) >> 2)
33+
#define MAN_CSS_MAN_SIZE_V1_5 \
34+
(sizeof(struct fw_image_manifest_v1_5) >> 2)
3235

3336
/*
3437
* RSA Key and Crypto

rimage/man_kbl.c

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
/*
2+
* Copyright (c) 2017, Intel Corporation.
3+
*
4+
* This program is free software; you can redistribute it and/or modify it
5+
* under the terms and conditions of the GNU General Public License,
6+
* version 2, as published by the Free Software Foundation.
7+
*
8+
* This program is distributed in the hope it will be useful, but WITHOUT
9+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11+
* more details.
12+
*/
13+
14+
#include "css.h"
15+
#include "cse.h"
16+
#include "plat_auth.h"
17+
#include "manifest.h"
18+
#include <config.h>
19+
#include <version.h>
20+
21+
#define KBL_HARDWARE_BUFFER_BASE 0xBE500000
22+
#define KBL_HARDWARE_BUFFER_LEN 0x4A000
23+
24+
/* manifest template */
25+
struct fw_image_manifest_v1_5 kbl_manifest = {
26+
.css_header = {
27+
.module_type = MAN_CSS_LT_MODULE_TYPE,
28+
.header_len = MAN_CSS_HDR_SIZE,
29+
.header_version = MAN_CSS_HDR_VERSION,
30+
.module_vendor = MAN_CSS_MOD_VENDOR,
31+
.size = 0x800,
32+
.key_size = MAN_CSS_KEY_SIZE,
33+
.modulus_size = MAN_CSS_MOD_SIZE,
34+
.exponent_size = MAN_CSS_EXP_SIZE,
35+
},
36+
37+
.desc = {
38+
.header = {
39+
.header_id = SOF_MAN_FW_HDR_ID,
40+
.header_len = sizeof(struct sof_man_fw_header),
41+
.name = SOF_MAN_FW_HDR_NAME,
42+
/* size in pages from $CPD */
43+
.preload_page_count = 0,
44+
.fw_image_flags = SOF_MAN_FW_HDR_FLAGS,
45+
.feature_mask = SOF_MAN_FW_HDR_FEATURES,
46+
.major_version = SOF_MAJOR,
47+
.minor_version = SOF_MINOR,
48+
.hotfix_version = 0,
49+
.build_version = SOF_BUILD,
50+
.load_offset = 0,
51+
.hw_buf_base_addr = KBL_HARDWARE_BUFFER_BASE,
52+
.hw_buf_length = KBL_HARDWARE_BUFFER_LEN
53+
},
54+
},
55+
};

rimage/manifest.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,14 @@ struct fw_image_manifest_v1_8 {
9191
extern struct fw_image_manifest_v1_8 apl_manifest;
9292
extern struct fw_image_manifest_v1_8 cnl_manifest;
9393

94+
/*
95+
* Firmware manifest header V1.5 used on SKL and KBL
96+
*/
9497
struct fw_image_manifest_v1_5 {
95-
struct css_header_v1_5 header;
96-
struct sof_man_fw_desc adsp_fw_bin_desc;
98+
struct css_header_v1_5 css_header;
99+
struct sof_man_fw_desc desc;
97100
} __attribute__((packed));
98101

99102
extern struct fw_image_manifest_v1_5 skl_manifest;
103+
extern struct fw_image_manifest_v1_5 kbl_manifest;
100104
#endif

0 commit comments

Comments
 (0)