Adrian Bonislawski
55d7954898
rimage: make .static_log_entries optional section
...
Thats because this section is optional in FW, it will be created only with TRACE enabled
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-11-12 09:24:08 -08:00
Janusz Jankowski
ccce0999ba
rimage: ignore sections not used by bootloader
...
In case of multiple modules, rimage should not expect these sections
in bootloader module: .bss, .static_log_entries .fw_ready.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:23:56 -08:00
Janusz Jankowski
865f31152a
rimage: fix possible strcpy and sprintf overflows
...
It's for preventing possible buffer overflow.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:23:52 -08:00
Janusz Jankowski
b737019a6f
cmake: add spdx license identifier
...
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Janusz Jankowski
a44fb2c3d8
rimage: change license to bsd
...
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Janusz Jankowski
bcf7e66f7d
rimage: add spdx identifier for elf.h
...
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Janusz Jankowski
9ce99db72e
include: split uapi headers into more directories
...
Some of interface headers are not needed by kernel,
but are needed by user-space applications, so we can split them
into multiple directories that indicate their purpose.
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Daniel Baluta
a38e40057f
rimage: Add support for imx8
...
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-11-12 09:18:03 -08:00
Janusz Jankowski
91d1b29dc9
uapi: replace sof_man_get_module with SOF_MAN_MODULE_OFFSET
...
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Janusz Jankowski
167282bbbe
rimage: add option to set imr type
...
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-11-12 09:18:03 -08:00
Diana Ungureanu
30b456826a
rimage: manifest: Remove braces for single statement blocks
...
Braces are unnecessary for single statement blocks.
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-11-12 09:18:03 -08:00
Diana Ungureanu
bb795aeb20
rimage: Align block comments on each line
...
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-11-12 09:18:03 -08:00
Diana Ungureanu
d4949bf42f
rimage: file_simple: Remove unnecessary spaces after cast
...
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-11-12 09:18:03 -08:00
Diana Ungureanu
8902341a34
rimage: file_simple: Move open brace to next line
...
Open brace '{' following function declaration get_mem_zone_type
goes on the next line.
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-11-12 09:18:03 -08:00
Diana Ungureanu
2861df6cad
rimage: Remove multiple blank lines
...
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-11-12 09:18:03 -08:00
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