Commit Graph

24 Commits

Author SHA1 Message Date
Marcin Maka 19e11c6e23 tools: add support for static uuids section
Content of static uuid section is appended to the ldc file
along with a new special header by rimage.

New ldc file part is read by the logger to decode
uuid pointers provided in traces into nice names.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-03-06 10:15:04 +01:00
Marcin Maka 22ddf1e210 abi: define debug abi version for user space dbg interfaces
The sof-logger and potentially other debug API clients perform ABI
compatibility check using the single FW ABI version. The same one is used
by the primary FW client which is the kernel driver. If there is a change
made to the debug API, the main ABI has to be updated to protect integrity
of the debug tools while such a change may not affect the kernel driver
at all.

This patch introduces new debug ABI version to be increased when changing
user space debug interfaces while the the main ABI is not affected.
Recompilation and installation of the new driver every time the tunneled
debug protocol is upgraded may be avoided.

Signed-off-by: Marcin Maka <marcin.maka@linux.intel.com>
2020-02-27 13:07:17 +01:00
Diana Cretu 9e91739b18 rimage: Fix DRAM_BASE address for i.MX8M
As per xtensa configuration mmap, DRAM_BASE is 0x3b6e8000.

Signed-off-by: Diana Cretu <diana.cretu@nxp.com>
2020-02-26 15:26:44 +02:00
Daniel Baluta 0781a4bed5 rimage: Add support for imx8m
This defines the iram/dram/sram memory zones and creates
a new machine type for i.MX8M.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-01-22 09:57:21 +02:00
Daniel Baluta 5f0b1fd4f4 rimage: Add support for i.MX8X
i.MX8X is very similar with i.MX8. Memory layout is the same
except IRQSTEER address.

Code will be shared but there will be different firmware binaries
named:
	* sof-imx8.ri, for i.MX8
	* sof-imx8x.ri, for i.MX8X

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2020-01-13 20:17:19 +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
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
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 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
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
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 c82f759420 rimage: use local elf.h
Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
2019-01-30 06:52:35 +01: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
ArturX Kloniecki 0f3f9c0807 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>
2018-10-30 12:21:56 +01:00
ArturX Kloniecki 4e5fa7723b 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>
2018-09-26 08:05:03 +02:00
Yan Wang 3ad69eb715 FIX: Remove unused variable.
The variable "i" shouldn't be used.

Signed-off-by: Yan Wang <yan.wang@linux.intel.com>
2018-04-24 08:09:52 -07: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 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