Commit Graph

92 Commits

Author SHA1 Message Date
Pan Xiuli e8b67b5bc5 rimage: add support for jsl
JSL should have almost same config as ICL, but they should
have different fw name.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-10-30 17:46:11 +01:00
Pan Xiuli 947238ded8 rimage: keys: add new 3k key
New platforms like TigerLake will need 3k RSA key for signing.
Generate new keys for SOF public key.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2019-10-15 13:09:54 +02:00
Janusz Jankowski dec18e3f74 rimage: update tgl
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-10-01 16:19:33 +01:00
Janusz Jankowski 86a4e62446 rimage: manifest v2.5 for MEU
Add function writing manifest v2.5 for MEU.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-10-01 16:19:33 +01:00
Janusz Jankowski 92fa1858c8 rimage: image manifest v2.5
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-10-01 16:19:33 +01:00
Janusz Jankowski e2743bc397 rimage: add SHA384 hashing
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-10-01 16:19:33 +01:00
Janusz Jankowski 72b6521c87 rimage: rename module_sha functions
These functions are generic and can be used for other SHA algorithms.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-10-01 16:19:33 +01:00
Janusz Jankowski 71c8b502a0 rimage: rename ri_hash
We are going to have more hashing function,
so they should be named after hashing algorithms.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-10-01 16:19:33 +01:00
Janusz Jankowski a3af6df17a manifest: add v2.5 definitions
New version of manifest introduced with TGL platform
uses SHA384 for component hash.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-10-01 16:19:33 +01:00
Janusz Jankowski 3dbeefac49 rimage: tgl machine definition
Add support for tgl platform in rimage tool.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Janusz Jankowski 2db4679820 rimage: xcc module offset option
This argument is needed in case of platforms that have different
modules padding in xcc binaries.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-08-27 13:45:16 +02:00
Adrian Bonislawski a82b44043f rimage: change error to warning if section not found
Thats because this function is used also to find optional sections so it will be decided later (outside of this func) if this is actually error

Signed-off-by: Adrian Bonislawski <adrian.bonislawski@linux.intel.com>
2019-06-23 22:55:32 +01:00
Adrian Bonislawski 6c908797c6 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-06-23 22:55:32 +01:00
Janusz Jankowski 1dd7a0724b 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-06-11 09:05:26 +02:00
Janusz Jankowski b755fe92b7 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-06-07 09:53:24 +02:00
Janusz Jankowski c6064624f6 cmake: add spdx license identifier
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-02 16:38:17 +01:00
Janusz Jankowski 107537b56b rimage: change license to bsd
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-02 16:38:17 +01:00
Janusz Jankowski 525493fbaa rimage: add spdx identifier for elf.h
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-06-02 16:38:17 +01:00
Janusz Jankowski e39ed5ebf4 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-05-31 20:10:45 +01:00
Daniel Baluta b456a35d2f rimage: Add support for imx8
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2019-05-29 12:05:09 +01:00
Janusz Jankowski 291525d271 uapi: replace sof_man_get_module with SOF_MAN_MODULE_OFFSET
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-05-17 17:04:59 +02:00
Janusz Jankowski 1edb31d2d6 rimage: add option to set imr type
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-04-11 19:07:16 +02:00
Diana Ungureanu f5af31f8ef 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-03-14 10:29:17 +00:00
Diana Ungureanu bdf5346cc6 rimage: Align block comments on each line
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu d32f1f7794 rimage: file_simple: Remove unnecessary spaces after cast
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu 1db2173489 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-03-14 10:29:17 +00:00
Diana Ungureanu 1951548a78 rimage: Remove multiple blank lines
Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu 806af330d0 rimage: elf: Break down multiple assignment
Multiple assignment should be avoided.

Signed-off-by: Diana Ungureanu <diana-gabriela.ungureanu@nxp.com>
2019-03-14 10:29:17 +00:00
Diana Ungureanu 894c332997 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-03-14 10:29:17 +00:00
Diana Ungureanu a90cee2378 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-03-14 10:29:17 +00:00
Diana Ungureanu 5032a493e9 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-03-14 10:29:17 +00:00
Diana Ungureanu a953d95878 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-03-14 10:29:17 +00:00
Adrian Bonislawski ef8b2d6ddf 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-03-06 15:00:59 +00:00
Daniel Baluta de7173fbc3 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-02-05 12:19:01 +00:00
Daniel Baluta 3d3e6f8cdb 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-02-05 12:19:01 +00:00
Guennadi Liakhovetski c9553af9cb 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-02-01 16:47:21 +00:00
Marcin Maka 7fb720a172
Merge pull request #914 from jajanusz/windows-build
cmake: build on windows
2019-01-31 14:29:52 +01:00
Janusz Jankowski 5afec83728 rimage: use fopen binary mode 2019-01-30 08:05:36 +01:00
Janusz Jankowski 0cb4457cad rimage: use time_t for localtime
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-30 07:53:06 +01:00
Janusz Jankowski a8d33b2d36 rimage: cast size_t to correct format types
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-30 07:47:10 +01:00
Janusz Jankowski 05912c5639 rimage: fix for gcc8.1 -Wstringop-truncation
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-30 07:33:30 +01:00
Janusz Jankowski c82f759420 rimage: use local elf.h
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-30 06:52:35 +01:00
Janusz Jankowski ad3d864ca0 rimage: elf.h: use stdint 2019-01-30 06:47:41 +01:00
Janusz Jankowski 46a38ce4f1 rimage: import elf.h
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-30 06:43:09 +01:00
Daniel Baluta a40e1fd009 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-01-29 12:15:51 +00:00
Daniel Baluta f4900e7dcd 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-01-29 12:15:51 +00:00
Janusz Jankowski d91be6da67 buildsystem: remove autotools from sof
This commit doesn't touch tools buildsystem.

Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 0beb84b828 cmake: add rimage build
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-22 15:35:35 +00:00
Janusz Jankowski 9af711c761 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-01-22 15:35:35 +00:00
Bard liao fa2fc61fe6 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>
2018-12-26 11:37:02 +00:00