[sw,driver] keymgr driver idle status handling
Nobody has claimed this yet.
- Dominant language
- SystemVerilog
- Stars
- 3.6k
- Forks
- 1.1k
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 141
Description
Description
The keymgr driver in both silicon creator and cryptolib uses keymgr_wait_until_done after starting an operation. In all instances, keymgr_wait_until_done is invoked immediately following the initiation of an operation.
This function, intended to wait for completion, currently returns OK if the OP_STATUS register is idle.
However, the hardware documentation for the keymgr IP indicates that the OP_STATUS field should not be idle/cleared once an operation is initiated. Also, our coverage report indicates that this switch case is not triggered by available tests.
An internal error or a trap would seem more suitable if this unexpected status were encountered.
Contributor guide
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
Start with the cited keymgr_wait_until_done implementations in sw/device/silicon_creator/lib/drivers/keymgr.c and sw/device/lib/crypto/drivers/keymgr.c, then read the OP_STATUS behavior in hw/ip/keymgr/doc/registers.md. Check the existing tests and coverage for the idle-status branch. Done means unexpected idle status after operation start is handled appropriately and the behavior is covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- embedded-iot, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100