lowRISC / lowRISC/opentitan

[kmac,dv] Extend StKeyMgrErrKeyNotValid state coverage

Open
#24,741 0 comments 0 reactions 0 assignees View on GitHub
Component:DV IP:kmac
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

PR #22794 extended the `kmac_app` module to abort when the sideload key is invalid during operation. When the key gets invalidated during an operation, the FSM inside the `kmac_app` module enters the `StKeyMgrErrKeyNotValid` state. PR #24724 extended DV to increase the coverage of this FSM state. However, still some state transitions into this state are not covered:

Based on PR #24724, the DV test needs to be extended to (_i_) first trigger one of the following FSM error states and then (_ii_) invalidate the sideload key:
```
StError->StKeyMgrErrKeyNotValid
StErrorAwaitApp->StKeyMgrErrKeyNotValid
StErrorAwaitSw->StKeyMgrErrKeyNotValid
StErrorServiceRejected->StKeyMgrErrKeyNotValid
StErrorWaitAbsorbed->StKeyMgrErrKeyNotValid
```
The following state transitions are not covered because of #24739:
```
StAppOutLen->StKeyMgrErrKeyNotValid
StAppProcess->StKeyMgrErrKeyNotValid
StAppWait->StKeyMgrErrKeyNotValid
```

The following state transitions are not covered because it seems not to be possible to enter this state from the origin state:
```
StIdle->StKeyMgrErrKeyNotValid
StTerminalError->StKeyMgrErrKeyNotValid
```

Contributor guide

Open the contributing guide

Research direction

Start with the kmac_app FSM and the DV changes in PR #24724, then trace the listed transitions into StKeyMgrErrKeyNotValid. Extend the DV scenario to trigger each reachable StError state before invalidating the sideload key; account for the exclusions described in PR #24739 and the origin states noted as unreachable.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.