You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 17, 2019. It is now read-only.
Repository navigation
This repository was archived by the owner on Jan 17, 2019. It is now read-only.
@lgirdwood
I'm quite certain that it's a human error, meaning that You've tried parsing with incompatible .ldc file, relative to firmware running on the machine, not an actual tool malfunction.
I agree that it should be more robust and provide more sensible information, to help user take correct actions in order to overcome the issue he's facing.
I'm changing this to an enhancement as I don't think that tool malfunctioned. We'll cooperate with driver team to dump fw_ready message to debugfs so that sof-logger could read it, along with info that we'll put in .ldc file during FW build, for comparison and verification.
@akloniex
I have go through the logger code and here is my understanding:
The string is actually stored in *.ldc files, and dma_trace only send the entry pointer to the structure store the char * string.
Which means the *.ldc and the *.ri you are running must be build from the same EFI file.
Any mismatch will make the entry pointer have bias and cause errors.
dump fw_ready message to debugfs
This is actually done when the ready message is send from the FW, but this info is not kept as the FW running . We can have a another debugfs to store the ready info when we get it and let sof-logger to read it. This will have a early notification if there is a mismatch.
BUT NOTE:
sof-audio sof-audio: Firmware info: version 1.1-b9717 build 32 on Oct 18 2018:13:54:44
The version will not be change if we have some dirty build (only diff, no commit)
So we must check version and build or even build time.
@xiulipan That is correct, .ldc and .ri have to come from the same build. I agree, that checking by commit SHA wouldn't be enough, and we would like to compare whole sof_ipc_fw_ready.version struct byte by byte, so if kernel team could dump it to separate debugfs, for sof-logger to check up on, that would be best. We will extract version with rimage and put at top of .ldc file from FW side and implement checking mechanism in sof-logger.
@xiulipan
0. FW needs patch allowing separation of fw_ready.version from .text section and linker script to fit pieces together, linking version to loadable section for runtime use and non-loadable, for extraction by rimage into .ldc file
rimage needs patch to fit new section into both .ri and .ldc
logger will check default location (tbd), overrided by parameter to allow custom path, or completely disabled verification with different parameter
for the kernel part, I believe that /sys/kernel/debug/sof/fw_version is fair enough name
All of these should not break current behaviour, so these can be implemented independently. We could stage logger part in 2 steps:
verification disabled by default, enabled to default path with parameter
verification enabled with default path as default behaviour, disabled with parameter.
This way user experience would not be impacted throughout the process, and all steps could be carried out in parallel.
@akloniex
Sorry, busy with CI issues let me test with all three changes together. And rebase patches into topic/cros-sof-v4.14-rebase. It will be done on Monday.
@xiulipan
Could you send sof-apl.ldc and /sys/kernel/debug/sof/fw_version files you used? @ranj063
Is there a way to cherry-pick this PR thesofproject/linux#222
to debug/cros-v4.14-rebase branch?
Activity
akloniex commentedon Oct 19, 2018
@lgirdwood
I'm quite certain that it's a human error, meaning that You've tried parsing with incompatible .ldc file, relative to firmware running on the machine, not an actual tool malfunction.
I agree that it should be more robust and provide more sensible information, to help user take correct actions in order to overcome the issue he's facing.
I'm changing this to an enhancement as I don't think that tool malfunctioned. We'll cooperate with driver team to dump fw_ready message to debugfs so that sof-logger could read it, along with info that we'll put in .ldc file during FW build, for comparison and verification.
xiulipan commentedon Oct 19, 2018
@akloniex
I have go through the logger code and here is my understanding:
The string is actually stored in *.ldc files, and dma_trace only send the entry pointer to the structure store the char * string.
Which means the *.ldc and the *.ri you are running must be build from the same EFI file.
Any mismatch will make the entry pointer have bias and cause errors.
This is actually done when the ready message is send from the FW, but this info is not kept as the FW running . We can have a another debugfs to store the ready info when we get it and let sof-logger to read it. This will have a early notification if there is a mismatch.
BUT NOTE:
The version will not be change if we have some dirty build (only diff, no commit)
So we must check version and build or even build time.
xiulipan commentedon Oct 19, 2018
@lgirdwood
BTW, we may need some tag on master branch. The latest tag on master branch is still v1.1
$git describe --abbrev=4 v1.1-840-gb971lgirdwood commentedon Oct 21, 2018
The error being printed by logger also needs improved if it really more about using the wrong ldc file than file name length.
akloniex commentedon Oct 23, 2018
@xiulipan That is correct, .ldc and .ri have to come from the same build. I agree, that checking by commit SHA wouldn't be enough, and we would like to compare whole
sof_ipc_fw_ready.versionstruct byte by byte, so if kernel team could dump it to separate debugfs, for sof-logger to check up on, that would be best. We will extract version with rimage and put at top of .ldc file from FW side and implement checking mechanism in sof-logger.xiulipan commentedon Oct 23, 2018
@akloniex
So let make some alignment here.
And we may have some per merge test about this patch sets
akloniex commentedon Oct 23, 2018
@xiulipan
0. FW needs patch allowing separation of fw_ready.version from .text section and linker script to fit pieces together, linking version to loadable section for runtime use and non-loadable, for extraction by rimage into .ldc file
All of these should not break current behaviour, so these can be implemented independently. We could stage logger part in 2 steps:
This way user experience would not be impacted throughout the process, and all steps could be carried out in parallel.
xiulipan commentedon Oct 23, 2018
@akloniex
I think this should be enough.
Would you like to track this tasks with github issues? We can label them with enhancement.
akloniex commentedon Oct 23, 2018
@xiulipan
I believe that we could keep track of it in this thread, but if you wish you could create issue for kernel repository and link it here.
4 remaining items
xiulipan commentedon Oct 29, 2018
@akloniex
I will send the PR ASAP.
with /sys/kernel/debug/sof/fw_version
xiulipan commentedon Oct 29, 2018
@akloniex @bkokoszx
The kernel part is done. thesofproject/linux#222
debugfs fw_version stores the whole structure of
struct sof_ipc_fw_versionbkokoszx commentedon Oct 29, 2018
@xiulipan
Thanks. Is there a chance to apply your changes to topic/cros-sof-v4.14-rebase so that we can test it on yorp?
bkokoszx commentedon Oct 29, 2018
Here is logger part: #118
Now it is tested only with our diagnostic driver.
xiulipan commentedon Oct 30, 2018
@bkokoszx I will test three PRs with linux.
For topic/cros-sof-v4.14-rebase, I will try to rebase my patch on top of it and send another PR.
akloniex commentedon Nov 2, 2018
@xiulipan When can we realistically expect these changes to be ported to
topic/cros-sof-v4.14-rebase?xiulipan commentedon Nov 4, 2018
@akloniex
Sorry, busy with CI issues let me test with all three changes together. And rebase patches into
topic/cros-sof-v4.14-rebase. It will be done on Monday.xiulipan commentedon Nov 4, 2018
@akloniex @bkokoszx
Test with #118
Do you think this looks fine?
xiulipan commentedon Nov 4, 2018
@akloniex
rebase done thesofproject/linux#245
xiulipan commentedon Nov 5, 2018
@akloniex
topic/cros-sof-v4.14-rebasewill be maintained by @ranj063bkokoszx commentedon Nov 5, 2018
@xiulipan
Could you send sof-apl.ldc and /sys/kernel/debug/sof/fw_version files you used?
@ranj063
Is there a way to cherry-pick this PR thesofproject/linux#222
to debug/cros-v4.14-rebase branch?
xiulipan commentedon Nov 5, 2018
@bkokoszx
That some fail test. Which means the fw_version check method is working now.
The corresponding files work fine.
bkokoszx commentedon Nov 5, 2018
@xiulipan thanks, that's perfect
bkokoszx commentedon Nov 13, 2018
@lgirdwood @akloniex @xiulipan
I think since checking fw version is on sof and soft master branch, we could close this issue/enhancement.