Skip to content

Conversation

@ktrzcinx
Copy link
Member

Some minor fixes proposed by @lyakh in #1818

@kv2019i
Copy link
Collaborator

kv2019i commented Mar 18, 2020

@ktrzcinx We need to squash these changes to the merged series, so can you update this to edit every commit to have summary of:

"squash! ASoC: SOF: ext_manifest: parse compiler version"

.. with the summary matching the merged commit this patch should be squashed into (before sending upstream). This syntax is used by "git commit --squash " and you can also use it with amending "git commit --amend --squash .

@plbossart
Copy link
Member

Agree with @kv2019i without clear indications it's likely maintainers will make a mistake when squashing. please provide guidance on what needs to be squashed where, thank you

@ktrzcinx ktrzcinx requested a review from lyakh March 19, 2020 08:12
lyakh
lyakh previously approved these changes Mar 19, 2020
@ranj063
Copy link
Collaborator

ranj063 commented Mar 19, 2020

@kv2019i how does the !fixup work? Will be autosquash the patches when we click on rebase and merge the PR?

@kv2019i
Copy link
Collaborator

kv2019i commented Mar 20, 2020

@ranj063 wrote:

@kv2019i how does the !fixup work? Will be autosquash the patches when we click on rebase and merge the PR?

No, it's not done by GitHub. But when we do a rebase of sof-dev-rebase, then the fixup/squash commits are automatically ordered such that we can easily combine them. You need to have "autoSquash = true" in your .git/config, or pass "--autosquash" to git-rebase.

We never rebase sof-dev, so in sof-dev these patches will always stay as they are.

This may cause some complications to our scripts for picking reviewed-by tags, though, so something to watch out for. FYI @plbossart

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.

Thanks @ktrzcinx . One comment on the include path, and I'd also like to double-confirm what is the final FW version of the header, so we don't need further fixups. I.e. let the FW patch be merged first.

Copy link
Collaborator

Choose a reason for hiding this comment

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

To avoid further fixups, I want confirmation that the FW side is merged.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ktrzcinx Why are you removing this field? Without it getting to the data would become more difficult. Now you can just do hdr->blob, after this patch this won't be any longer possible. Above you did keep a variable-length .elements[] array, why are you removing .blob[] here?

Copy link
Member Author

Choose a reason for hiding this comment

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

@lyakh thesofproject/sof#2427 (comment). Moreover hdr->blob shouldn't be used at all, hdr should be every time casted to type specific struct. Field .elements[] should be deleted in a same way as .blob[], my mistake.

@ktrzcinx ktrzcinx force-pushed the ext-mnf-pr-fix branch 2 times, most recently from 3fb1427 to ed50f53 Compare March 23, 2020 08:09
@kv2019i kv2019i requested review from kv2019i, lyakh and plbossart March 23, 2020 11:28
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.

Thanks @ktrzcinx -- this has been one long PR. Let's wait for the other reviewer's to ack and acceptance for sof#2427

plbossart
plbossart previously approved these changes Mar 23, 2020
lyakh
lyakh previously approved these changes Mar 24, 2020
@kv2019i
Copy link
Collaborator

kv2019i commented Mar 24, 2020

All good, now just waiting for thesofproject/sof#2427 to be approved.

UPDATE: still waiting for thesofproject/sof#2427 to be merged (some extra steps needed to keep QEMU in CI going on)

lyakh
lyakh previously approved these changes Apr 30, 2020
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>
The firmware version can be extracted from the extended
manifest content. This information known at build time
does not need to be provided in a mailbox.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
@ktrzcinx ktrzcinx force-pushed the ext-mnf-pr-fix branch 2 times, most recently from 713cd69 to 91ffbbf Compare April 30, 2020 07:05
@ktrzcinx ktrzcinx requested a review from lyakh April 30, 2020 08:31
kv2019i
kv2019i previously approved these changes Apr 30, 2020
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.

Thanks @ktrzcinx , looks good now! I actually made some comments yesterday, but those had not been sent. But you addressed those in the last update, so looks good!

Copy link
Collaborator

Choose a reason for hiding this comment

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

you compare w_size of memory here, and w_size is calculated from w->num_windows, and w->num_windows is only verified below to be valid. So, for example if w->num_windows == 0 the below check would return -EINVAL, but in case of sdev->info_window != NULL you now return 0 in this case? Which one is correct?

Copy link
Member Author

@ktrzcinx ktrzcinx May 4, 2020

Choose a reason for hiding this comment

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

Such an issue would be properly handled, because for w->num_windows == 0 w->num_windows will differ from sdev->info_window->num_windows for sure (condition in line 24/33). Event that I changed order of those checks, to make it more obvious.

ktrzcinx added 2 commits May 4, 2020 08:27
The window description can be extracted from the extended manifest
content. This information known at build time does not need to be
provided in a mailbox.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
The compiler version and description can be extracted from the
extended manifest content. This information known at build time
does not need to be provided in a mailbox.

Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
@kv2019i kv2019i requested review from ranj063 and removed request for ranj063 May 5, 2020 12:07
@kv2019i
Copy link
Collaborator

kv2019i commented May 5, 2020

@ranj063 This is ready to go, but you still have pending changes-requested, so can you check that?

@ranj063 ranj063 merged commit c08157b into thesofproject:topic/sof-dev May 5, 2020
@marc-hb
Copy link
Collaborator

marc-hb commented May 9, 2020

Please review the 2-lines long, PR #2091 fixup! for the crash below

May 08 17:20:22 up2 kernel: sof-audio-pci 0000:00:0e.0: use msi interrupt mode
May 08 17:20:22 up2 kernel: sof-audio-pci 0000:00:0e.0: hda codecs found, mask 4
May 08 17:20:22 up2 kernel: sof-audio-pci 0000:00:0e.0: using HDA machine driver skl_hda_dsp_generic now
May 08 17:20:22 up2 kernel: sof-audio-pci 0000:00:0e.0: DMICs detected in NHLT tables: 0
May 08 17:20:22 up2 kernel: sof-audio-pci 0000:00:0e.0: Direct firmware load for intel/sof/community/sof-apl.ri failed with error -2
May 08 17:20:22 up2 kernel: sof-audio-pci 0000:00:0e.0: error: request firmware intel/sof/community/sof-apl.ri failed err: -2
May 08 17:20:22 up2 kernel: BUG: kernel NULL pointer dereference, address: 0000000000000000
May 08 17:20:22 up2 kernel: #PF: supervisor read access in kernel mode
May 08 17:20:22 up2 kernel: #PF: error_code(0x0000) - not-present page
May 08 17:20:22 up2 kernel: PGD 0 P4D 0
May 08 17:20:22 up2 kernel: Oops: 0000 [#1] SMP NOPTI
May 08 17:20:22 up2 kernel: CPU: 3 PID: 86 Comm: kworker/3:1 Not tainted 5.7.0-rc3-sof+ #12
May 08 17:20:22 up2 kernel: Hardware name: AAEON UP-APL01/UP-APL01, BIOS UPA1AM40 08/06/2018
May 08 17:20:22 up2 kernel: Workqueue: events sof_probe_work [snd_sof]
May 08 17:20:22 up2 kernel: RIP: 0010:snd_sof_load_firmware_raw+0x7b/0x190 [snd_sof]
May 08 17:20:22 up2 kernel: Code: 85 c0 0f 84 2b 01 00 00 48 8b 13 48 89 c6 48 89 ef e8 d9 e3 d5 da 41 89 c4 85 c0 0f 88 24 92 00 00 0f 1f 4>
May 08 17:20:22 up2 kernel: RSP: 0018:ffffa8db80223e18 EFLAGS: 00010246
May 08 17:20:22 up2 kernel: RAX: 0000000000000000 RBX: ffff928dee8a6828 RCX: 0000000000000000
May 08 17:20:22 up2 kernel: RDX: 0000000000000007 RSI: 0000000000000002 RDI: ffff928dfbd98820
May 08 17:20:22 up2 kernel: RBP: ffff928deebe7c28 R08: 00000001383405ae R09: ffffffff9c8c1374
May 08 17:20:22 up2 kernel: R10: 0000000000000393 R11: 000000000002cfc0 R12: 00000000fffffffe
May 08 17:20:22 up2 kernel: R13: ffff928deebe7c28 R14: 0000000000000000 R15: ffff928de8d79bc0
May 08 17:20:22 up2 kernel: FS:  0000000000000000(0000) GS:ffff928dfbd80000(0000) knlGS:0000000000000000
May 08 17:20:22 up2 kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
May 08 17:20:22 up2 kernel: CR2: 0000000000000000 CR3: 0000000178fb4000 CR4: 00000000003406e0
May 08 17:20:22 up2 kernel: Call Trace:
May 08 17:20:22 up2 kernel:  sof_probe_work+0x81/0x220 [snd_sof]
May 08 17:20:22 up2 kernel:  process_one_work+0x1d2/0x3a0
May 08 17:20:22 up2 kernel:  worker_thread+0x45/0x3c0
May 08 17:20:22 up2 kernel:  kthread+0xf6/0x130
May 08 17:20:22 up2 kernel:  ? process_one_work+0x3a0/0x3a0
May 08 17:20:22 up2 kernel:  ? kthread_park+0x80/0x80
May 08 17:20:22 up2 kernel:  ret_from_fork+0x35/0x40
May 08 17:20:22 up2 kernel: Modules linked in: snd_hda_codec_hdmi snd_soc_hdac_hdmi snd_soc_dmic snd_sof_pci snd_sof_intel_hda_common snd_so>
May 08 17:20:22 up2 kernel: CR2: 0000000000000000
May 08 17:20:22 up2 kernel: ---[ end trace 33baffe6567bf588 ]---
May 08 17:20:22 up2 kernel: RIP: 0010:snd_sof_load_firmware_raw+0x7b/0x190 [snd_sof]
May 08 17:20:22 up2 kernel: Code: 85 c0 0f 84 2b 01 00 00 48 8b 13 48 89 c6 48 89 ef e8 d9 e3 d5 da 41 89 c4 85 c0 0f 88 24 92 00 00 0f 1f 4>
May 08 17:20:22 up2 kernel: RSP: 0018:ffffa8db80223e18 EFLAGS: 00010246
May 08 17:20:22 up2 kernel: RAX: 0000000000000000 RBX: ffff928dee8a6828 RCX: 0000000000000000
May 08 17:20:22 up2 kernel: RDX: 0000000000000007 RSI: 0000000000000002 RDI: ffff928dfbd98820
May 08 17:20:22 up2 kernel: RBP: ffff928deebe7c28 R08: 00000001383405ae R09: ffffffff9c8c1374
May 08 17:20:22 up2 kernel: R10: 0000000000000393 R11: 000000000002cfc0 R12: 00000000fffffffe
May 08 17:20:22 up2 kernel: R13: ffff928deebe7c28 R14: 0000000000000000 R15: ffff928de8d79bc0
May 08 17:20:22 up2 kernel: FS:  0000000000000000(0000) GS:ffff928dfbd80000(0000) knlGS:0000000000000000
May 08 17:20:22 up2 kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
May 08 17:20:22 up2 kernel: CR2: 0000000000000000 CR3: 0000000178fb4000 CR4: 00000000003406e0

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants