-
Notifications
You must be signed in to change notification settings - Fork 133
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
Check fw boot flags to load library #4643
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -574,6 +574,8 @@ EXPORT_SYMBOL(sof_ipc4_find_debug_slot_offset_by_type); | |
static int ipc4_fw_ready(struct snd_sof_dev *sdev, struct sof_ipc4_msg *ipc4_msg) | ||
{ | ||
int inbox_offset, inbox_size, outbox_offset, outbox_size; | ||
struct sof_ipc_fw_ready *fw_ready = &sdev->fw_ready; | ||
int ret; | ||
|
||
/* no need to re-check version/ABI for subsequent boots */ | ||
if (!sdev->first_boot) | ||
|
@@ -599,6 +601,13 @@ static int ipc4_fw_ready(struct snd_sof_dev *sdev, struct sof_ipc4_msg *ipc4_msg | |
sdev->debug_box.offset = snd_sof_dsp_get_window_offset(sdev, | ||
SOF_IPC4_DEBUG_WINDOW_IDX); | ||
|
||
ret = snd_sof_dsp_block_read(sdev, SOF_FW_BLK_TYPE_SRAM, inbox_offset, fw_ready, | ||
sizeof(*fw_ready)); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. @ujfalusi why do we need to worry about the reference firmware in the context of library loading? Is this something we will ever test? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should only lose compatibility with a reference when all possible alternatives have been exhausted... |
||
if (ret) { | ||
dev_err(sdev->dev, "Unable to read fw_ready, read from TYPE_SRAM failed\n"); | ||
return ret; | ||
} | ||
|
||
sof_ipc4_create_exception_debugfs_node(sdev); | ||
|
||
dev_dbg(sdev->dev, "mailbox upstream 0x%x - size 0x%x\n", | ||
|
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.
this is going to fail with reference firmware. FW_READY in IPC4 does not contain payload, thus the "fw_ready" is going to be all 0, the flag is 0 but the reference fw does have context save and the library re-load will fail since we are trying to load already loaded library.
Or do I miss something?
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.
so what 's your advice ? I don't want to add more config in get_fw config which is also not compatible with reference fw.