Skip to content

Conversation

@xiulipan
Copy link

@xiulipan xiulipan commented Mar 13, 2020

Add probe support from thesofproject/sof#2338 ABI version 3.14.0
Add debug ABI version from thesofproject/sof#2398 ABI version 3.15.0

Align struct sof_ipc_cc_version to firmware definition in SOF ABI 3.16.0.
The struct definition was changed due to errors in FW build.
The Cadence XCC compiler produces incorrect linkage section sizes, when a
variable length array is used in the compiler version struct. The firmware
definition was changed to a fixed 32 byte compiler description string.
This length covers all released firmware binaries and thus only a minor
ABI change is needed.

As the same structure is used in IPC messages between driver and firmware,
the kernel needs to be aligned to firmware change.

Signed-off-by: Pan Xiuli xiuli.pan@linux.intel.com

FW change is thesofproject/sof#2522

@aiChaoSONG
Copy link

@xiulipan Catch a typo in commit message: troble -> trouble. I am a little confused by "static" here, I think it is actually "fixed" length

@xiulipan xiulipan changed the title ASoC: SOF: make sof_ipc_ext_data to static length ASoC: SOF: make sof_ipc_ext_data to fixed length Mar 13, 2020
@xiulipan
Copy link
Author

@aiChaoSONG thanks, updated

lyakh
lyakh previously approved these changes Mar 13, 2020
Copy link
Collaborator

@lyakh lyakh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...provided 24 characters are enough - this should be good. But two notes:

  1. I still don't understand why our ABI headers aren't under include/uapi
  2. strictly speaking char isn't a proper type for fixed-size objects, uint8_t or __u8 should be used instead. But that can be a separate patch.

Copy link
Member

@plbossart plbossart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs more explanations, sorry

@xiulipan
Copy link
Author

@plbossart @kv2019i @lyakh comment updated, please check if this would explain the issue.
Mode detail with debug logs please see thesofproject/sof#2507

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commit message still needs work.

@xiulipan
Copy link
Author

@kv2019i @plbossart Thanks for point out the problem. I think the comment may be more fit for FW side. I will try to refine the comment here to explain the change is align with FW.

@xiulipan xiulipan changed the title ASoC: SOF: make sof_ipc_ext_data to fixed length ASoC: SOF: make sof_ipc_cc_version to fixed length Mar 17, 2020
@xiulipan xiulipan force-pushed the pr/fixflexcc branch 2 times, most recently from d8ccf94 to 846fb7f Compare March 17, 2020 08:29
@lgirdwood
Copy link
Member

@plbossart @kv2019i there are bug in the Cadence compiler that give us different linkage section sizes and some offsets in packed data compared to GCC. Specifying a size here aligns XCC with GCC output.

@plbossart
Copy link
Member

@plbossart @kv2019i there are bug in the Cadence compiler that give us different linkage section sizes and some offsets in packed data compared to GCC. Specifying a size here aligns XCC with GCC output.

Right, so let's capture that in the commit message.

@xiulipan xiulipan added the ABI involves ABI changes, need extra attention label Mar 18, 2020
@xiulipan xiulipan requested a review from dbaluta as a code owner March 18, 2020 04:49
@xiulipan
Copy link
Author

@plbossart @kv2019i @lgirdwood update the comments with ABI version 3.15.0

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now commit message has all the info. As this is a fairly complex rootcause, let's iterate on the language a bit more, but close to merging.

@xiulipan xiulipan changed the title ASoC: SOF: make sof_ipc_cc_version to fixed length ASoC: SOF: make sof_ipc_cc_version to fixed length and fix ABI mismatch Mar 26, 2020
@xiulipan
Copy link
Author

@plbossart @kv2019i @lyakh @lgirdwood update commits and merge with ABI fix patches to make ABI change in order.

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Many good updates. I still have a few minor nits on the commit messages and we need to resolve the debug API ABI version alignment, please see inline.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiulipan @lgirdwood We have a conflict still here:

  • this kernel patch is set debug ABI to 15
  • FW patch was merged with ABI 14 thesofproject/sof@e6940da
  • ABI classifier states this is ABI 15

I would propose to change classifier and kernel patch to ABI14 to match the already merged FW. Please ack.

@xiulipan
Copy link
Author

@kv2019i PR updated, thanks for comments advice.

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiulipan Thanks, commit messages now look good! Please check my proposal for ABI versioning. If @lgirdwood approves, let's do this and get this PR to ready and bump ABI to 16 in kernel as well.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiulipan @lgirdwood This PR anyways includes all changes from ABI13-14-15-16, so this is mostly to get the history records and git commit messages accurate. I'd change this commit in the series to assign ABI14 as that's how the FW was merged. And then align rest of the series as per ABI classifier (and unmerged patches). We'll end up with bumping ABI to 16 in this series in any case.

@xiulipan
Copy link
Author

@kv2019i Thanks for the proposal.
This PR and thesofproject/sof#2522 will achieve the target to make FW and Kernel ABI align to 16.

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiulipan Can you fix the "ASoC: SOF: add debug ABI version" to set version to 3.14.0 to match the merged FW patch thesofproject/sof#2398

I think that's the only change we still need to merge this. @lyakh @lgirdwood @plbossart please comment if you disagree on this

@xiulipan
Copy link
Author

@kv2019i The point here is probe support do not have an ABI version, do we need add one for it or ignore the ABI version for it?

@kv2019i
Copy link
Collaborator

kv2019i commented Mar 27, 2020

@xiulipan wrote:

@kv2019i The point here is probe support do not have an ABI version, do we need add one for it or ignore the ABI version for it?

? the FW patch clearly modifies ABI version to 3.14.0 -> thesofproject/sof@e6940da

And in your kernel commit message for debug interface, you state "This change main ABI to 3.15.0 and you modify the header to ABI 15.

So I don't want to have merged FW and kernel patches to have conflicting information. The FW patch was now merged as 14, so kernel should not claim 15 either. Or just don't touch the ABI at all in this patch and only bump in the follow-up patches.

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xiulipan this needs split into 3 PRs, one for each ABI bump then mapped into ABI tool. We should then be good to merge all PRs.

@xiulipan
Copy link
Author

@lgirdwood Got that, but It may got some conflict on the ABI number change. As both PR will base on ABI 13. The merge conflict can not be avoided. Other wise, we need to rebase each PR after the merge.
I will send 3 new PR and keep this PR as well. You can decided which way is better.

@xiulipan
Copy link
Author

@lgirdwood ABI 3.14 #1946
ABI 3.15 #1947
ABI 3.16 #1890

Use uint8_t to replace char in packed ABI structs
to have fixed length for struct.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Use uint8_t to replace char in packed ABI structs
to have fixed length for struct.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Use uint8_t to replace char in packed ABI structs
to have fixed length for struct.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
Align struct sof_ipc_cc_version to firmware definition in SOF ABI 3.15.0.

The struct definition was changed due to errors in FW build.
The Cadence XCC compiler produces incorrect linkage section sizes, when a
variable length array is used in the compiler version struct. The firmware
definition was changed to a fixed 32 byte compiler description string.
This length covers all released firmware binaries and thus only a minor
ABI change is needed.

As the same structure is used in IPC messages between driver and firmware,
the kernel needs to be aligned to firmware change.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
@xiulipan
Copy link
Author

@lgirdwood @kv2019i Update and rebase as requested. Ping for review and merge.

@lgirdwood
Copy link
Member

lgirdwood commented Mar 31, 2020

@kv2019i @plbossart FW and kernel now aligned at 14, this and thesofproject/sof#2522 will then align at 15 and everything thereafter will be 16 onwards

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, good now! Thanks @xiulipan FYI @lgirdwood

@kv2019i
Copy link
Collaborator

kv2019i commented Mar 31, 2020

NOTE: now that sof-logger starts to work again, we have some failures reported, but as sof-logger has been out-of-business for some days now, it's impossible to tell when it broke. Better to merge this (to get the logs) and sort out any errors as a next step.

@kv2019i kv2019i requested a review from lyakh March 31, 2020 14:11
@kv2019i
Copy link
Collaborator

kv2019i commented Mar 31, 2020

@plbossart @lyakh You have pending review comments open. We are in a bit of a hurry with this one...

@lgirdwood
Copy link
Member

Now just waiting on Internal CI completing on FW side. Will merge both when it's done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ABI involves ABI changes, need extra attention

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants