Uh oh!
There was an error while loading. Please reload this page.
forked from torvalds/linux
- Notifications
You must be signed in to change notification settings - Fork 150
Firmware debugging fixes and updates.#1208
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
Merged
Uh oh!
There was an error while loading. Please reload this page.
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
ef697a5
ASoC: SOF: core: make debug module params and state global.
lrgirdwo cc356f3
ASoC: SOF: Intel: initialise and verify FW crash dump data.
lrgirdwo 2c1ae1c
ASoC: SOF: ipc: retain DSP context after FW exception.
lrgirdwo 724701f
ASoC: SOF: intel: Add context data to any IPC timeout.
lrgirdwo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -37,6 +37,7 @@ | ||
| #define MBOX_SIZE 0x1000 | ||
| #define MBOX_DUMP_SIZE 0x30 | ||
| #define EXCEPT_OFFSET 0x800 | ||
| #define EXCEPT_MAX_HDR_SIZE 0x400 | ||
| /* DSP peripherals */ | ||
| #define DMAC0_OFFSET 0xFE000 | ||
| @@ -228,6 +229,11 @@ static void bdw_get_registers(struct snd_sof_dev *sdev, | ||
| /* note: variable AR register array is not read */ | ||
| /* then get panic info */ | ||
| if (xoops->arch_hdr.totalsize > EXCEPT_MAX_HDR_SIZE) { | ||
| dev_err(sdev->dev, "invalid header size 0x%x. FW oops is bogus\n", | ||
| xoops->arch_hdr.totalsize); | ||
| return; | ||
| } | ||
| offset += xoops->arch_hdr.totalsize; | ||
| sof_mailbox_read(sdev, offset, panic_info, sizeof(*panic_info)); | ||
| @@ -241,7 +247,7 @@ static void bdw_dump(struct snd_sof_dev *sdev, u32 flags) | ||
| struct sof_ipc_dsp_oops_xtensa xoops; | ||
| struct sof_ipc_panic_info panic_info; | ||
| u32 stack[BDW_STACK_DUMP_SIZE]; | ||
| u32 status, panic; | ||
| u32 status, panic, imrx, imrd; | ||
| /* now try generic SOF status messages */ | ||
| status = snd_sof_dsp_read(sdev, BDW_DSP_BAR, SHIM_IPCD); | ||
| @@ -250,6 +256,26 @@ static void bdw_dump(struct snd_sof_dev *sdev, u32 flags) | ||
| BDW_STACK_DUMP_SIZE); | ||
| snd_sof_get_status(sdev, status, panic, &xoops, &panic_info, stack, | ||
| BDW_STACK_DUMP_SIZE); | ||
| /* provide some context for firmware debug */ | ||
| imrx = snd_sof_dsp_read(sdev, BDW_DSP_BAR, SHIM_IMRX); | ||
| imrd = snd_sof_dsp_read(sdev, BDW_DSP_BAR, SHIM_IMRD); | ||
| dev_err(sdev->dev, | ||
| "error: ipc host -> DSP: pending %s complete %s raw 0x%8.8x\n", | ||
| panic & SHIM_IPCX_BUSY ? "yes" : "no", | ||
| panic & SHIM_IPCX_DONE ? "yes" : "no", panic); | ||
| dev_err(sdev->dev, | ||
| "error: mask host: pending %s complete %s raw 0x%8.8x\n", | ||
| imrx & SHIM_IMRX_BUSY ? "yes" : "no", | ||
| imrx & SHIM_IMRX_DONE ? "yes" : "no", imrx); | ||
| dev_err(sdev->dev, | ||
| "error: ipc DSP -> host: pending %s complete %s raw 0x%8.8x\n", | ||
| status & SHIM_IPCD_BUSY ? "yes" : "no", | ||
| status & SHIM_IPCD_DONE ? "yes" : "no", status); | ||
| dev_err(sdev->dev, | ||
| "error: mask DSP: pending %s complete %s raw 0x%8.8x\n", | ||
| imrd & SHIM_IMRD_BUSY ? "yes" : "no", | ||
| imrd & SHIM_IMRD_DONE ? "yes" : "no", imrd); | ||
| } | ||
| /* | ||
| @@ -451,6 +477,7 @@ static int bdw_probe(struct snd_sof_dev *sdev) | ||
| /* TODO: add offsets */ | ||
| sdev->mmio_bar = BDW_DSP_BAR; | ||
| sdev->mailbox_bar = BDW_DSP_BAR; | ||
| sdev->dsp_oops_offset = MBOX_OFFSET; | ||
plbossart marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| /* PCI base */ | ||
| mmio = platform_get_resource(pdev, IORESOURCE_MEM, | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.