Uh oh!
There was an error while loading. Please reload this page.
debugability: extract fw_version and copy it to .ldc file - #512
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
lgirdwood
left a comment
There was a problem hiding this comment.
looks like you have not squashed changes ?
7663ce9 to
67bff6aCompareThis is done in order to place fw_version, part of fw_ready message, in both .ri and .ldc files, for later verification of compatibility of trace logs reported by dsp with .ldc file parsed together by logger. Signed-off-by: ArturX Kloniecki <arturx.kloniecki@linux.intel.com>
67bff6a to
69c9da3Compare| static const struct sof_ipc_fw_ready ready = { | ||
| static const struct sof_ipc_fw_ready ready | ||
| __attribute__((section(".fw_ready"))) = { |
There was a problem hiding this comment.
Just move to end of definition (like Linux) and we are good to merge.
There was a problem hiding this comment.
This is exactly in line with kernel examples:
e.g.: in macro expansion from include/linux/kernel.h:#define ftrace_vprintk(fmt, vargs) \ do { \ if (__builtin_constant_p(fmt)) { \ static const char *trace_printk_fmt __used \ __attribute__((section("__trace_printk_fmt"))) = \ __builtin_constant_p(fmt) ? fmt : NULL; \ \ __ftrace_vbprintk(_THIS_IP_, trace_printk_fmt, vargs); \ } else \ __ftrace_vprintk(_THIS_IP_, fmt, vargs); \ } while (0)
It is a variable attribute, and cannot be placed after assignment operator, otherwise it will not compile.
There was a problem hiding this comment.
ok, it seems we can do this where we define but not declare...
There was a problem hiding this comment.
The problem is that it is defined and declared in the same statement.
I could split it into 2 separate statements if you'd like, but it seems redundant to me.
| static const struct sof_ipc_fw_ready ready = { | ||
| static const struct sof_ipc_fw_ready ready | ||
| __attribute__((section(".fw_ready"))) = { |
There was a problem hiding this comment.
ok, it seems we can do this where we define but not declare...
lgirdwood
commented
Oct 29, 2018
@akloniex oh just a few checkpatch errors for alignment. |
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>
69c9da3 to
0f3f9c0Compareakloniex
commented
Oct 30, 2018
@lgirdwood I've corrected alignment. |
In order to verify that running FW version is compatible with .ldc file parsed by sof-logger we need to extract fw_version from fw_ready message. This is done by moving fw_ready to separate elf section attached to sof_data memory region and pasting it to both .ri and .ldc files during rimage processing.