Commit Graph

43 Commits

Author SHA1 Message Date
Karol Trzcinski f606940480 rimage: Return error code when problem with file opening
When some error occur during fopen routine, then errno should be
returned instead of success code.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
2020-02-27 18:04:55 +02:00
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
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 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
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 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
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
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 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 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
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
Janusz Jankowski 5afec83728 rimage: use fopen binary mode 2019-01-30 08:05:36 +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
Liam Girdwood cadfc6aca2 rimage: Add support for Sue creek
WiP.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-12-22 14:30:49 +00:00
Liam Girdwood 801272e242 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>
2018-12-22 14:30:49 +00:00
Liam Girdwood 2ba01165b9 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>
2018-11-09 21:19:11 +00:00
Zhu Yingjiang 5912e40fe3 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>
2018-11-08 18:53:29 +08:00
Zhu Yingjiang 7e0a9d8b6f 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>
2018-11-05 18:36:02 +08:00
Zhu Yingjiang 5d6a43c278 rimage: manifest: add manifest APIs
add the 1.5 manifest operation APIs

Signed-off-by: Zhu Yingjiang <yingjiang.zhu@linux.intel.com>
2018-11-05 18:36:02 +08:00
Zhu Yingjiang f89a4a5418 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>
2018-11-05 16:19:49 +08:00
Zhu Yingjiang 0a829ea0bb 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>
2018-10-18 14:38:12 +08:00
Zhu Yingjiang e539fa0965 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>
2018-10-18 10:02:38 +08:00
Liam Girdwood 99473f3200 rimage: add initial support for sue creek.
Build tested.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-10-01 20:03:06 +01:00
Janusz Jankowski 054a218e83 autoconf: optional implicit-fallthrough
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2018-09-11 12:13:17 +02:00
Janusz Jankowski c0f156b2ba 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>
2018-08-31 19:52:48 +02:00
Tomasz Lauda ac7b0c227a 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>
2018-06-04 13:54:25 +01:00
Marcin Maka 45e9bc422a Removing unneeded XTOS sections from boot_ldr and main fw.
Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2018-05-24 12:38:56 +02:00
Liam Girdwood 7db25d8924 rimage: add support to build and sign runtime modules
Currently rimage only supports building ELF images with know TEXT, DATA
and BSS addresses. This patch adds support to build runtime relocatable
modules that can be loaded linked into the base SOF FW at runtime.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-12 21:49:19 +01:00
Liam Girdwood 301418d94d rimage: fix formatting and alignment of manifest section printf
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-04-12 16:40:31 +01:00
Liam Girdwood 08f857088c cnl: core: Add support for xcc
xcc has more strict rules than gcc:
- Add missing sections to linker scripts
- Fix compile warnings
- Extend memory enabling timeout to infinite (too small delay for xcc)

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>

# Conflicts:
#	src/platform/apollolake/platform.c
#	src/platform/cannonlake/platform.c
2018-03-30 14:44:17 +01:00
Liam Girdwood f65131645f rimage: manifest: Move text offset into non immutable ROM structure.
text_offset was added to an immutable ROM structure that would break
some tools and cause instability. Fix this by creating a new structure
for rimage manifest data that can be modified without breaking the ROM
ABI.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-03-19 08:34:52 +00:00
Pan Xiuli 3943df6f45 rimage: read the fixup text size form ELF
The actual text size will change and the hard code base_fw_text_size_fixup
could not fit the changing size. We should get the fixup size from the
module info just from the memory mapping.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-03-02 09:06:30 +00:00
Liam Girdwood 041423bfe3 rimage: validate manifest segments
make sure no manifest segments collide with each other and fail if they
do.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-27 16:35:10 +00:00
Pan Xiuli d5b8df4211 rimage: add unsigned firmware support
Add unsigned firmware support, that can directly use the FW or sign it
with other tools.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-02-23 08:23:56 +00:00
Liam Girdwood 05ef4343d1 rimage: import rimage image creation and signing tool
rimage is being moved from tools repo to sof repo since there is now a
cyclic dependency between both repos and sof needs rimage for it's
build.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2018-02-13 20:29:40 +00:00