oxidecomputer / oxidecomputer/humility
Humility should point out if the processor is in a fault state
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 584
- Forks
- 63
- Avg merge
- 3h
- Merged PRs (30d)
- 2
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the existing fault-diagnosis code used by humility probe, then inspect how humility -t sidecar-b tasks reports a kernel panic. Use the bottom 9 bits of xPSR to identify active exceptions and faults, and verify that tasks output warns when the processor is in a fault state or stopped in an ISR.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools, embedded-iot, operating-systems
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100