Diana Ungureanu
f9556455f1
rimage: elf: Break down multiple assignment
...
Multiple assignment should be avoided.
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-11-12 09:18:03 -08:00
Diana Ungureanu
a97804f9e9
rimage: Split lines over 80 characters
...
Change long lines so they don't exceed 80 characters.
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-11-12 09:18:03 -08:00
Diana Ungureanu
7a802599ab
rimage: Remove blank lines before/after braces
...
Blank lines aren't necessary after/before open or closed
braces.
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-11-12 09:18:03 -08:00
Diana Ungureanu
97ec5bac80
rimage: Remove explicit comparisons to NULL in the rimage/*.c files
...
Comparisons to NULL are now implicit as the checkpatch.pl requires.
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-11-12 09:18:03 -08:00
Diana Ungureanu
842b860367
rimage: Fix code alignment and indentation issues
...
This was reported by checkpatch.pl and makes code
easier to read.
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-11-12 09:18:03 -08:00
Adrian Bonislawski
57d567c2e5
rimage: make a "Module reading" view similar to "Module writing" view
...
Size column in both cases instread of Bytes and Size
Hex view in both cases instead of Dec and Hex
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Daniel Baluta
42aca3d129
rimage: Describe memory as an array of zones
...
Use new block types added to describe memory for
a platform as an array of zones. The block type
will be an index into the array.
A memory zone is described by (base, size, host_offset).
With this map we can now easily find for a given section
in which memory zone it belongs.
Because we have 10 zones reserved this patch will allocate
extra 12 * 10 = 120 bytes that are not used yet.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-11-12 09:18:03 -08:00
Daniel Baluta
b65618612b
rimage: Refine sof fw blk type
...
Change the name of the enums to reflect the type
of memory where the given block will be loaded.
DATA section is mapped to DRAM, TEXT section is mapped to
SRAM. No ABI breakage.
We also reserve several slots for future use.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-11-12 09:18:03 -08:00
Guennadi Liakhovetski
b05f9bd3ff
sue: use rimage for image building
...
Fix bugs in Sue Creek support for rimage:
- use a correct manifest offset
- place the image higher into RAM to avoid overwriting itself when
copying the SOF proper.
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Janusz Jankowski
24259d7967
rimage: use fopen binary mode
2019-11-12 09:18:03 -08:00
Janusz Jankowski
13f74da979
rimage: use time_t for localtime
...
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Janusz Jankowski
e771e65125
rimage: cast size_t to correct format types
...
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Janusz Jankowski
93c5742171
rimage: fix for gcc8.1 -Wstringop-truncation
...
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Janusz Jankowski
552fc49e0f
rimage: use local elf.h
...
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Janusz Jankowski
c80037bbab
rimage: elf.h: use stdint
2019-11-12 09:18:03 -08:00
Janusz Jankowski
5c7e400a40
rimage: import elf.h
...
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Daniel Baluta
139c3b4c88
rimage: Fix file_format.h include guard
...
This is most likely due to copy/paste.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-11-12 09:18:03 -08:00
Daniel Baluta
cf665a03ec
rimage: Use fw.h instead of duplicating the code
...
This is very useful when updating one of the types in UAPI
because with the current implementation one needs to be careful
to also update file_format.h
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-11-12 09:18:03 -08:00
Janusz Jankowski
cd6f24a015
buildsystem: remove autotools from sof
...
This commit doesn't touch tools buildsystem.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Janusz Jankowski
4e3ead0096
cmake: add rimage build
...
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Janusz Jankowski
93b0d29571
rimage: remove config.h dependency
...
man_* files don't need it
pkcs can use PEM_KEY_PREFIX from passed in defines
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Bard liao
52b17106c9
rimage: make block divisible by 4
...
Add pandding to each block if the block size is not divisible by 4.
Which can avoid unaligned memory accesses.
Signed-off-by: Bard liao <yung-chuan.liao@linux.intel.com>
2019-11-12 09:18:03 -08:00
Liam Girdwood
90d75018d3
rimage: Add support for Sue creek
...
WiP.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-11-12 09:18:03 -08:00
Liam Girdwood
6847abad74
rimage: make sure cavs1.5 manifest uses correct file offsets.
...
cavs1.5 manifest file structure and offsets are different than cavs
version 1.8
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-11-12 09:18:03 -08:00
Tomasz Lauda
2a7f0c0de4
rimage: fix possible buffer overflow
...
Fixes possible buffer overflow with strcpy.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-12 09:18:03 -08:00
Liam Girdwood
f5711ff689
uapi: split ipc.h and abi.h into small files.
...
Split the larger ABI files into smaller more manageable chunks. Also
split by end user into IPC and user space ABIs.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-11-12 09:18:03 -08:00
Zhu Yingjiang
864cc7ef4d
change the 1.8 and 1.5 header defines
...
add comments and change the 1.5 1.8 header defines
Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-11-12 09:18:03 -08:00
Zhu Yingjiang
5674674a48
rimage: add build scripts to build 1.5 image
...
add to build scripts and Makefiles to build firmware binary
for kbl and skl
Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-11-12 09:18:03 -08:00
Zhu Yingjiang
ccdfa7972d
rimage: add 1.5 rimage package API
...
add API for making 1.5 rimage binary
Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-11-12 09:18:03 -08:00
Zhu Yingjiang
641fab27c7
rimage: add 1.5 rimage defines
...
add 1.5 rimage defines for skl and kbl
Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-11-12 09:18:03 -08:00
Zhu Yingjiang
91b917916f
rimage: manifest: add manifest APIs
...
add the 1.5 manifest operation APIs
Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-11-12 09:18:03 -08:00
Zhu Yingjiang
75533a65b5
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>
2019-11-12 09:18:03 -08:00
Zhu Yingjiang
fb5e8ac792
rimage: manifest: rename old manifest to 1.8
...
rename old API and comments print info to 1.8, as for add
1.5 manifest.
Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-11-12 09:18:03 -08:00
ArturX Kloniecki
f76b24ba0a
rimage: debugability: include fw_version in .ldc file
...
Extract fw_version from fw_ready section of elf and include it in
header of .ldc file to allow verification by sof-logger.
Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
2019-11-12 09:18:03 -08:00
Zhu Yingjiang
dd81092b6e
rimage: add firmware 1.5 manifest binary descryptor
...
add the 1.5 version manifest, for skylake and kabylake
Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-11-12 09:18:03 -08:00
Zhu Yingjiang
75b6586f99
rimage: add firmware 1.5 manifest header
...
add manifest for skylake/kabylake, version 1.5
Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-11-12 09:18:03 -08:00
Zhu Yingjiang
2d9af17a90
rimage: modify the API to version 1.8
...
change the define to 1.8
modify the API name to 1.8
Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-11-12 09:18:03 -08:00
Zhu Yingjiang
4582729422
rimage: rename the old css_header and fw_image_manifest
...
rename css_header to css_header_v1_8
rename fw_image_manifest to fw_image_manifest_v1_8
Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2019-11-12 09:18:03 -08:00
Liam Girdwood
15d5a9545b
rimage: add initial support for sue creek.
...
Build tested.
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-11-12 09:18:03 -08:00
ArturX Kloniecki
202c655364
debugability: rimage: extract .static_log_entries from elf
...
.static_log_entries section is extracted to logs dictionary
to remove xtensa toolchain dependency from logs parser.
Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
2019-11-12 09:18:03 -08:00
Janusz Jankowski
fd628ec368
autoconf: optional implicit-fallthrough
...
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Janusz Jankowski
4e9ef23474
icl: initial support
...
Added icelake platform to platforms.
Updated rimage to support icelake.
Updated autoconf and automake files.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:01 -08:00
Zhang Keqiao
513c47fd8c
rimage: adding an include for all gcc version build
...
Signed-off-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
2019-11-12 09:17:43 -08:00
Pan Xiuli
c91c6f98c6
rimage: fix function returns address of local variable bug
...
path may return out the function from rimage->key_name.
Switch the usage for local variable to avoid this bug.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-11-12 09:17:43 -08:00
Tomasz Lauda
81eba29a2f
rimage: add support for automatic MEU signing
...
This patch allows rimage to sign FW binaries using MEU tool.
Paths to MEU and private key have to be provided during config step.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-12 09:17:43 -08:00
Tomasz Lauda
d99e6d53c1
rimage: add correct FW version to binary
...
Now correct FW version is included into binary.
Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
2019-11-12 09:17:43 -08:00
Marcin Maka
220a74308d
Removing unneeded XTOS sections from boot_ldr and main fw.
...
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2019-11-12 09:17:43 -08:00
Pan Xiuli
82f6bfba4e
rimage: openssl: add compatibility for openssl 1.1.0
...
Add compatibility support for openssl 1.0.2 support alongsid with
openssl 1.1.0
References:
https://wiki.openssl.org/index.php/OpenSSL_1.1.0_Changes
Compatibility Layer
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-11-12 09:17:43 -08:00
Pan Xiuli
82f6d74ee3
rimage: add error handler for localtime call
...
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-11-12 09:17:43 -08:00
Pan Xiuli
3530b55759
rimage: fix wrong error message
...
If keyname can not be open, error message should output keyname insert
of tmp path.
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-11-12 09:17:43 -08:00