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

[entropy_complex] Corner case tests at the chip level #10970

Closed
1 of 3 tasks
msfschaffner opened this issue Feb 18, 2022 · 25 comments
Closed
1 of 3 tasks

[entropy_complex] Corner case tests at the chip level #10970

msfschaffner opened this issue Feb 18, 2022 · 25 comments
Labels
Component:DV DV issue: testbench, test case, etc. Earlgrey-PROD Candidate Temporary label to triage issues into Earlgrey-PROD Milestones IP:csrng IP:edn IP:entropy_src Milestone:V2 Priority:P3 Priority: low Subsystem:Entropy entropy_src, csrng, or edn related issues TOP:earlgrey Type:Task Tasks, to-do list.

Comments

@msfschaffner
Copy link
Contributor

msfschaffner commented Feb 18, 2022

This issue captures recommended tests and associated questions that came up in the V2 meeting for EDN:

  • There is probably a need for an entropy stress test at the system level. Current list of entropy consumers in the system:

    • AES
    • KMAC
    • OTBN
    • Keymgr
    • Ibex
    • Alert Handler (ping timer)
    • OTP Ctrl (background check timer)

    This test may end up looking very similar to parts of the power virus workload (maybe we can make this part of the same test?) [top] Provide list of desired vectors for power estimation #9297

  • Do we need to cover special corner cases around sleep entry to assess EDN interfaces crossing CDCs? I.e., enter / exit low power state while an EDN fetch is ongoing in one or more entropy consumers? (Note: since there are no entropy consumers on the AON domain, deep sleep scenarios where power is turned off may be less interesting than light sleep where clocks are gated).

  • Is there a need for a max latency test accross the individual entropy blocks / the entire entropy subsystem? For the latter, would it even be possible to bound the req -> ack latency accross the entire subsystem? If the answer is yes to any of these questions, how do we derive the thresholds?

If we decide to add any of the tests above, need to make sure these are reflected in the testplan.

estimate 16

@msfschaffner msfschaffner added Component:DV DV issue: testbench, test case, etc. Type:Task Tasks, to-do list. Subsystem:Entropy entropy_src, csrng, or edn related issues IP:csrng IP:edn IP:entropy_src TOP:earlgrey Milestone:V2 labels Feb 18, 2022
@msfschaffner msfschaffner added this to the Project: M2 milestone Feb 18, 2022
@tjaychen tjaychen removed their assignment Feb 18, 2022
@senelson7 senelson7 mentioned this issue Mar 17, 2022
19 tasks
@mwbranstad mwbranstad removed their assignment Apr 11, 2022
@weicaiyang weicaiyang added the Priority:P1 Priority: high label May 18, 2022
@martin-lueker
Copy link
Contributor

Hi Everyone, I'm reviewing Entropy_complex issues. This one has not seen much traffic since it was opened. Are there any updates?

@cdgori
Copy link

cdgori commented Oct 21, 2022

Just looking at those, I think the stress test will be needed for sure.

The CDC/sleep-wake part might be handled by some of the other ongoing CDC testing, not sure. If not then it seems like general cross-module testing of clock gating behavior is desirable. (Maybe this is more a "full chip" test than an "entropy complex" test though?)

I can argue that the max latency could be deferred (substantially or indefinitely) as long as we are doing boot entropy tests at the full-chip level. But I don't remember the context of why we considered/wanted that test?

@msfschaffner
Copy link
Contributor Author

msfschaffner commented Oct 28, 2022

Agreed that the CDC/sleep-wake part may already be handled as part of the existing tests and CDC tooling.

For the stress test, the max load test may actually suffice, since it exercises the entropy complex quite heavily: #14814 (comment)

As for the max latency test - this came up as a question, but as you say this may not be needed if we have tests for critical functionality such as a boot entropy test. @moidx @tjaychen @alphan WDYT?

@tjaychen
Copy link

@cindychip @eunchan
For the max latency, we should double check whether kmac enforces that check in hardware.
I think it does, which is why we had a kmac timeout test I believe. That's the primary case to worry about here I think.

@alphan
Copy link
Contributor

alphan commented Nov 1, 2022

As for the max latency test - this came up as a question, but as you say this may not be needed if we have tests for critical functionality such as a boot entropy test. @moidx @tjaychen @alphan WDYT?

We have something in our todo list to make sure the boot mode entropy will be enough for ROM. Is this what you are referring to?

@tjaychen
Copy link

@msfschaffner and i talked through this today.
We believe the major points in this test can be covered by the power virus test and Nuvoton tests.
We do need to add one test in M3 to check the upper limit of secure boot, but we don't believe that needs to be M2 gating.

Let me know if anyone objects, otherwise we will drop this to M3 at the end of day tomorrow.

@zi-v
Copy link
Contributor

zi-v commented Nov 10, 2022

I agree

@cindychip cindychip modified the milestones: Project: M2, Project: M3 Nov 11, 2022
@alphan
Copy link
Contributor

alphan commented Nov 15, 2022

@msfschaffner and i talked through this today. We believe the major points in this test can be covered by the power virus test and Nuvoton tests. We do need to add one test in M3 to check the upper limit of secure boot, but we don't believe that needs to be M2 gating.

Let me know if anyone objects, otherwise we will drop this to M3 at the end of day tomorrow.

SGTM

@andreaskurth andreaskurth added the Triaging:MultipleBlocks Issue is relevant for the triage of multiple HW blocks label Feb 21, 2023
@GregAC GregAC modified the milestones: Discrete: M3, Discrete: M2.5 Feb 24, 2023
@GregAC GregAC added the Priority:P2 Priority: medium label Feb 24, 2023
@GregAC
Copy link
Contributor

GregAC commented Feb 24, 2023

Triaged for otbn I think it's worth considering an entropy stress test for M2.5

@vogelpi
Copy link
Contributor

vogelpi commented Feb 24, 2023

Triaged for entropy_src. I agree that we want this for M2.5.

@GregAC
Copy link
Contributor

GregAC commented Feb 24, 2023

Triaged for rv_core_ibex same conclusion as above

@andreaskurth
Copy link
Contributor

Triaged for edn and csrng, agree.

For the system-level entropy stress test, maybe parts of the chip_sw_power_max_load test could be reused (see #14814 for the state of its implementation).

@andreaskurth andreaskurth added Triaged and removed Triaging:MultipleBlocks Issue is relevant for the triage of multiple HW blocks labels Mar 1, 2023
@marnovandermaas
Copy link
Contributor

I will track the effort of this for M2.5 in the EDN block:

estimate 16

@moidx moidx added Priority:P3 Priority: low and removed Priority:P2 Priority: medium labels Apr 6, 2023
@msfschaffner msfschaffner added the Earlgrey-PROD Candidate Temporary label to triage issues into Earlgrey-PROD Milestones label Oct 6, 2023
@msfschaffner
Copy link
Contributor Author

Discussed with @moidx. We are closing this issue since profiling the boot times can be done more accurately with real silicon samples using existing ROM E2E tests that have already been developed. The same tests could be inspected in simulation as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:DV DV issue: testbench, test case, etc. Earlgrey-PROD Candidate Temporary label to triage issues into Earlgrey-PROD Milestones IP:csrng IP:edn IP:entropy_src Milestone:V2 Priority:P3 Priority: low Subsystem:Entropy entropy_src, csrng, or edn related issues TOP:earlgrey Type:Task Tasks, to-do list.
Projects
None yet
Development

No branches or pull requests