Skip to content

Conversation

@softwarecki
Copy link
Contributor

Fixed non-maskable interrupt handling:
The non-maskable interrupt have no corresponding bit in INTERRUPT and INTENABLE registers so its occurrence cannot be confirmed. Removed the code that checked if the interrupt flag is set.

Added emergency ipc message send function"
Added intel_adsp_ipc_send_message_emergency function that allows to send an ipc message notifying about emergency event, such as watchdog timeout.

Separated a watchdog state from core power:
The watchdog is controlled by ll-scheduler and should not be resumed when a core is bringing up. Watchdog pause control code was removed.

tmleman
tmleman previously approved these changes Jan 26, 2023
Copy link
Member

Choose a reason for hiding this comment

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

WAIT_FOR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an emergency function used to send a notification about watchdog timeout on a primary core. We don't want any timeout here.

aborisovich
aborisovich previously approved these changes Feb 1, 2023
Added intel_adsp_ipc_send_message_emergency function that allows to send an
ipc message notifying about emergency event, such as watchdog timeout.

Signed-off-by: Adrian Warecki <[email protected]>
abonislawski
abonislawski previously approved these changes Feb 2, 2023
tmleman
tmleman previously approved these changes Feb 2, 2023
aborisovich
aborisovich previously approved these changes Feb 2, 2023
@stephanosio stephanosio dismissed their stale review February 2, 2023 13:37

addressed

@stephanosio
Copy link
Member

@softwarecki If you plan to get this into v3.3, a bug report is required in order for this PR to be merged during the feature freeze. Please file a bug report issue for the problem that this PR is trying to fix and link the issue to this PR.

The watchdog is controlled by ll-scheduler and should not be resumed when
a core is bringing up. Watchdog pause control code was removed.

Signed-off-by: Adrian Warecki <[email protected]>
@laurenmurphyx64
Copy link
Contributor

@softwarecki Reminder to file a bug report if you need this in for 3.3 :-]

}
}

regs->idd = ext_data;
Copy link
Member

Choose a reason for hiding this comment

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

is it right ? this is overwriting the value set few lines above for regs->idd (CAVS_V15 build)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good question. I made it identical to the intel_adsp_ipc_send_message function, which uses these registers regardless of the platform. I suspect that setting this bit triggers message acknowledgment, and it doesn't need to stay set. Maybe @aborisovich can confirm this?

Copy link

@aborisovich aborisovich Feb 14, 2023

Choose a reason for hiding this comment

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

Yes it looks like by analogy it should work, I'll look into CAVS15 registers asap.

Copy link

@aborisovich aborisovich Feb 15, 2023

Choose a reason for hiding this comment

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

Ok, so we have it partially wrong.
IDD register on CAVS1.5 is also DIPCIE register.
DIPCIE register has bit 30 used as done bit. When set, it means that ipc target (host here) had completed the operation. DIPCIE message extension is composed of 29 youngest bits.
So basically in this code, we override DIPCIE bits 30 and 31 using extended message what should not happen.
ext_data should be truncated from the left to contain only 29 youngest bits of the extended message for CAVS1.5.

We can of course assume that application logic (that provides extended message value) had prepared the message in the way that is suitable. Let's say application copied state of IDD 31 and 30 bit to the extended message and then wrote remaining 29 bits content. But this is not a good practice in my opinion.

It works for now so I guess we can merge this PR and provide some fixes in separate PR that would also fix the body of intel_adsp_ipc_send_message function.
Is this ok for you @ceolin ?

@stephanosio stephanosio modified the milestones: v3.3.0, v3.4.0 Feb 10, 2023
@softwarecki softwarecki removed the bug The issue is a bug, or the PR is fixing a bug label Feb 13, 2023
@nashif nashif merged commit ddad622 into zephyrproject-rtos:main Feb 20, 2023
@softwarecki softwarecki deleted the watchdog-fixups branch February 23, 2023 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform: Intel ADSP Intel Audio platforms

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants