Commit Graph

190 Commits

Author SHA1 Message Date
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
Liam Girdwood 8aedb1c3e7 rimage: openssl: fix build for openssl 1.1.0
Openssl 1.1.0 is latest stable version with minor API differences.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-11-12 09:17:43 -08:00
Yan Wang b199485177 FIX: Remove unused variable.
The variable "i" shouldn't be used.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
2019-11-12 09:17:43 -08:00
Liam Girdwood 8d8de881f9 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>
2019-11-12 09:17:43 -08:00
Liam Girdwood 0f3b39954b rimage: fix formatting and alignment of manifest section printf
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-11-12 09:17:43 -08:00
Liam Girdwood 269a477b63 rimage: display ELF section names.
Display the name of each ELF section to aid build and debug.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-11-12 09:17:43 -08:00
Liam Girdwood 273f73fc5c 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
2019-11-12 09:17:43 -08:00
Liam Girdwood 8ce5f8efa6 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>
2019-11-12 09:17:43 -08:00
Pan Xiuli b54a48d177 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>
2019-11-12 09:17:43 -08:00
Liam Girdwood 9b0ead72d3 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>
2019-11-12 09:17:43 -08:00
Pan Xiuli c5bd37f428 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>
2019-11-12 09:17:43 -08:00
Liam Girdwood 3d247c1094 rimage: fix elf section collision detection.
Section end was not checked. Now fixed. Added more error output to
identify.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-11-12 09:17:43 -08:00
Liam Girdwood 5f7a3a3a66 rimage: elf: validate module sections internally.
Make sure we validate all module sections against each other.

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
2019-11-12 09:17:43 -08:00
Liam Girdwood b537522a65 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>
2019-11-12 09:17:38 -08:00
Liam Girdwood a01016f945
Initial commit 2019-11-11 13:50:00 +00:00