Skip to content
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

Humility should point out if the processor is in a fault state #357

Open
cbiffle opened this issue Apr 11, 2023 · 0 comments
Open

Humility should point out if the processor is in a fault state #357

cbiffle opened this issue Apr 11, 2023 · 0 comments

Comments

@cbiffle
Copy link
Contributor

cbiffle commented Apr 11, 2023

When diagnosing a kernel panic, I noticed that the panic message was truncated. Long story short, it was truncated because the kernel ran out of stack while generating the panic message. Whee.

Humility's output was

$ humility -t sidecar-b tasks
humility: attached to 0483:3754:002600184D4B500E20373831 via ST-Link V3
humility tasks failed: kernel has panicked on boot: "panicked at 'assertion failed: `(left == right)`\n  left: `"

It would be fantastic if Humility would also point out that the machine is wedged in a kernel hard fault. You can determine this from the bottom 9 bits of xPSR, which contain the current active exception number. It should be 0 basically all the time unless you manage to stop the processor during an ISR; in such cases, things like stack traces tend to be wrong, so it'd be nice to print a note.

But particularly if we're in a fault (which is, to a first approximation, interrupts less than 11), it would be nice to know that. We have existing fault diagnosis code in humility probe that could be applied.

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

No branches or pull requests

1 participant