-
Notifications
You must be signed in to change notification settings - Fork 349
Create extended manifest #2427
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
Create extended manifest #2427
Conversation
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.
Whats the rational behind all this work ? i.e. what does this give us over existing metadata ? MAJOR ABI updates are not free.
Two major benefits are:
|
We already have FW versioning in the standard manifest, but we dont use it. It's just hard coded to values used by CAVS FW. We should probably use this. A lot lot easier than changing MAJOR ABI.
Ok, this is the part we need. I do like using an ELF section, and we should put all our FW boot data in this section. We should also put all our init TEXT in this section too (any code that is run once during FW boot). Once boot is complete we then add this section to the heap (and can power it OFF etc if it's not used). |
|
@lgirdwood I am not sure if putting this "boot data" into a section that is loaded to the DSP memory is the right thing as the FW does not use it at all. The only reasonwhy it is loaded, as I see it, is to report it back to the driver through the IPC since the driver does not know how to extract it on the host side before loading. So loading to sram, reporting back, freeing memory seems to be pretty expensive process vs. just reading it from the fw binary on the host side. |
Maybe two sections, one for data that is only interesting for kernel alone, another for stuff used by firmware but only during the boot process. |
|
@paulstelian97 Of course, +1 for boot section in general. Btw, cAVS platforms are quite optimized regarding memory occupation by the boot code and data already since the boot loader stays in DRAM (called IMR), only the real run-time part of the fw is loaded to SRAM. |
|
@mmaka1 in general I dont wont to update MAJOR for this, but I would accept a MINOR update that could prefix the data in extended manifest. I prefer to build as a new section and let rimage prepend it in the output so that kernel can read. |
|
@lgirdwood Yes, we recently talked about a way to keep backward compatibility with the driver form a previous line, already deployed by distros and it is important indeed. However from the other side we'd like to copy only really required things and move as much as possible including things that are already used by the driver's code that could be safely changed (no plans for backport). |
|
@lgirdwood I'm currently working with this PR, but let clarify.
MINOR change I understand as keep all structs in mailbox, as it was before, am I wrong?
So old structs with |
We can keep the same structs, but put them in ext manifest and not in the mailbox. The ABI change is smaller now. We should be able to use the same kernel functions for parsing too.
Yes.
Yes. Btw, have we considered (for backwards compat reasons) copying this data (as RO data) as a manifest module ? i.e. the codeloader will copy it to mailbox address (like it does with base FW sections). i.e. rimage creates a new module that should be copied by codeloader to mailbox (this modules only contains the legacy data only - no new structures). This way older kernels will be able to run new FW. |
c73c21b to
3bf7903
Compare
|
@ktrzcinx will be merged after v1.5 is tagged this week. |
|
@kv2019i Waiting for QEMU update, the QEMU patch got some build error. And I will try to update the QEMU Docker image after the build error is fixed. |
|
@kv2019i @ktrzcinx @lgirdwood Docker image for QEMU updated, I re-trigger the QEMU test |
|
It seems CI stuck, I re-run tests by re-pushing last commit |
63daf4c to
576baae
Compare
|
SOFCI TEST |
099db5a to
c3a248d
Compare
|
@ktrzcinx how does this PR differ from your TEST PR ? |
|
@lgirdwood I found an issue with new NOTE section introduction for |
|
@ktrzcinx looks like a linker issue, btw what happens if you use the GNU GCC linker on BYT when XCC is used ? |
This section will be used to store information about firmware known during compilation time. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Extended manifest is a place to store build time known firmware metadata, for example firmware version or used compiler description. Given information is read on host side before firmware startup. This part of output binary is located as a first structure in binary file. Extended manifest should be skipped in firmware loading routine. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
Include such an information in extended manifest, to make it accessible from host side before firmware load and run. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This information is known at build time so should be passed by extended manifest. Introduced structure is designed to be fully compatible with information provided through mailbox to make parsing code on host side as much reusable as possible. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This is information is known during compilation time, so it should be passed by extended manifest. Reuse sof_ipc_probe_support struct to make parsing function from host side as much universal as possible. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
|
@lgirdwood @mmaka1 issue with linker is resolved. For to |
|
CI usual issues on Jenkins |
|
Kernel support already merged. |
Extended manifest is a place to store metadata about firmware, known during
compilation time - for example firmware version or used compiler.
Given information are read on host side before firmware startup.
This part of output binary is not signed.
Related with https://github.com/thesofproject/linux/pull/1818/commits