Skip to content

IPC handler should detect FW crash notifications #537

Closed

Description

@lgirdwood

FW sends an IPC message upon a FW exception notifying host driver an exception has occurred. This is currently ignored by the driver afaict.

[ 9768.126925] sof-audio sof-audio: error: rx list empty but received 0x4200
[ 9768.126927] sof-audio sof-audio: error: can't find message header 0x1004200

This IPC interrupts the host and sends the platform specific offset of the exception log. This should probably be handled in a platform specific detector that could call generic core code to reboot FW etc.

Activity

  1. xiulipan commented on Jan 15, 2019

    @xiulipan

    @lgirdwood
    This is not exception IPC. It should be purge FW request reply from ROM

    @keyonjie found this IPCs are coming from

    /* step 2: purge FW request */

    	/* step 2: purge FW request */
    	snd_sof_dsp_write(sdev, HDA_DSP_BAR, chip->ipc_req,
    			  chip->ipc_req_mask | (HDA_DSP_IPC_PURGE_FW |
    			  ((stream_tag - 1) << 9)));
    

    #define HDA_DSP_IPC_PURGE_FW 0x01004000

    As there is a << 9 so you will always see odd message like 0x1004200 and 0x1004400

    @keyonjie
    Please check if I am right about above explanation.
    PS: I remember there are fix about this?

  2. keyonjie commented on Jan 15, 2019

    @keyonjie

    this is actually only a warning, please ignore it, I can submit a patch to remove this warning message later.

    It is 4200(stream_tag=2) here because stream_tag 1(4000) is occupied by the playback stream during suspend.

  3. wenqingfu commented on Feb 2, 2019

    @wenqingfu

    even if specific 0x4200 is not a problem, the point still stands - say if there is a FW exception like panic, can we reboot the FW?

  4. plbossart commented on Feb 2, 2019

    @plbossart
    Member
  5. wenqingfu commented on Feb 2, 2019

    @wenqingfu

    That's called firmware recovery, where the driver takes the decision to reset and restart when the DSP panics or there is a watchdog timeout - and there is no support for it yet. It's a known need that's documented in issues #452

    Yes, sir, tried to find this issue number to link it, but didn't get it. Thank you!

  6. xiulipan commented on Feb 10, 2019

    @xiulipan

    @lgirdwood I think we have the panic ipc handler inside kernel now:

    /* handle messages from DSP */
    if ((hipct & SOF_IPC_PANIC_MAGIC_MASK) == SOF_IPC_PANIC_MAGIC) {
    /* this is a PANIC message !! */
    snd_sof_dsp_panic(sdev, HDA_DSP_PANIC_OFFSET(msg_ext));
    } else {
    /* normal message - process normally*/
    snd_sof_ipc_msgs_rx(sdev);
    }

    Maybe we can close this issue? And continue the FW recovery method in #452

  7. plbossart commented on Mar 24, 2019

    @plbossart
    Member

    @lgirdwood is this issue still current or can it be closed?

  8. plbossart commented on Jun 16, 2021

    @plbossart
    Member

    closing, this duplicates part of the functionality needed described by #452

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions