-
Notifications
You must be signed in to change notification settings - Fork 349
cc_version: use fixed length for CC_DESC #2522
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ktrzcinx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add in comment comment that sof_ipc_cc_version.desc is read as flex array from kernel side. This solution also resolve compilation problem from #2427.
|
@kakulesza it seems from the log, there is not change needed for kernel https://sof-ci.01.org/sofpr/PR2522/build5231/devicetest/APL_UP2_PCM512X/verify-sof-firmware-load.sh/verify-sof-firmware-load.sh.txt @lgirdwood Please help to review this fix for the logger regression. |
|
@lgirdwood This is hard one, cos it's in abi header, but it's not really abi change, cos these fields are null-terminated strings anyway, so it doesn't matter for parsing if it's flex array or const array. It's fixed-size array just to overcome some embedded compiler limitations that are not up-to-date with gcc. |
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pends on kernel update.
|
@lgirdwood @ktrzcinx @jajanusz Thanks for remind about the Kernel part. There is indeed a need to make align on both side. |
|
@xiulipan thanks, ping me once kernel one is approved. Can you assign ABI number too in classifier. |
|
@lgirdwood It seems I did not have access for the project |
|
@xiulipan updated, I've given all member W access bow to align their ABI updates. |
|
@lgirdwood Should this be go with an ABI patch or an ABI minor? |
|
@xiulipan Lets make it minor since it's impact is user & developer confusion if version is wrong |
|
@lgirdwood update the PR with ABI to 3.15.0 |
|
@xiulipan ok, please ping when kernel is approved and we can merge. |
|
@xiulipan @lgirdwood Kernel change is ready to go, but a concern was raised by @plbossart why we pick 24 chars as the length here. Is that future-proof enough? @paulstelian97 also had concerns on this. Let's agree on this, and then we can merge. |
|
@xiulipan you need to rebase |
|
@lgirdwood @plbossart I also find another mismatch in the |
|
@xiulipan I've assigned to ABI 14 |
|
@lgirdwood So here is my thinking, we will need fix for FW to make |
|
@xiulipan anything in your plan preventing this PR merging into 14 ? |
|
@lgirdwood I have updated thesofproject/linux#1890 to make each ABI change has its own ABI. |
ok, I can see the classifier has been updated. Does this now fully reflect your plan. |
|
@xiulipan @plbossart @lgirdwood Please prioritize merging this PR. Logs are already broken for like 2 weeks. |
@lgirdwood I think we we are good to go now. We hit issues by merging FW patches for ABI bumps that were not approved on kernel side, but we gain nothing by delaying this. I.e. let's put this in, and then @xiulipan linux#1890 and then we are aligned again. |
lgirdwood
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/include/kernel/abi.h
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xiulipan This does not align with the classifier or the commit message. Can you double check this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lgirdwood @xiulipan D'oh, you are right. The kernel patch (not yet merged) puts cc_version as ABI16:
thesofproject/linux@3552e9c
So definitely commit message and patch are not in sync here.
This probably happened because FW PRs for ABI15 have been merged without bumping the version. E.g.
e6940da
... was the last PR for ABI14, but it was merged with abi.h of ABI14.
I think we can probably still go ahead with this. The abi.h version needs to be changed to 16 when the last PR for ABI16 is merged. As @lyakh commented on the kernel side, if this is the norm to have multiple changes done in a single bump, we need to separate the commits that add functionality from commits that bump the version. I.e. we open ABIxx for development, have interface changes approved for this ABI level, and then we have a closing commit that freezes ABIxx. No binary FW releases should be done from master during this time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@xiulipan ping ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lgirdwood The three kernel pr is already there
thesofproject/linux#1947
thesofproject/linux#1946
thesofproject/linux#1890
Replace char with uint8_t to have fixed lenght for string. char has minimum 8 bits length. Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
There is a bug in the Cadence XCC compiler that give us different linkage section sizes for flex length struct sof_ipc_ext_data in ELF file compared to GCC version. And there are appending struct in the same ELF section, this will bring wrong offset for those struct binary in ELF file. Example: When the CC_DESC is " RG-2017.8-linux", we should have struct length for 0x50 in header size, but the binary length in ELF file is 0x4c. When the CC_DESC is " RG-2017.8-win", size are both 0x4c All existing compiler description has length less than 32 bytes. So use a fixed length 32 in this structure. ABI version changes to 3.15.0 Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
|
@lgirdwood Kernel side now ready to go. |
|
CI know issues. |
|
@kv2019i Merged, I think we are good now |
|
@lgirdwood wrote:
Ack, all changes for ABI versions 14&15 are now good in both kernel and fw. |
Fix ABI version to 3.15.0 on master first.
There is a bug in the Cadence XCC compiler that give us different
linkage section sizes for flex length struct sof_ipc_ext_data in
ELF file compared to GCC version. And there are appending struct
in the same ELF section, this will bring wrong offset for those
struct binary in ELF file.
Example:
When the CC_DESC is " RG-2017.8-linux", we should have struct
length for 0x50 in header size, but the binary length in ELF file
is 0x4c. When the CC_DESC is " RG-2017.8-win", size are both 0x4c
All existing compiler description has length less than
24 bytes. So use a fixed length 24 in this structure.
ABI version 3.16.0
Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com
fix #2507