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

Cannot handle early Ready-For-FW and TRNG_REQ at the same time #1489

Open
ChiaweiW opened this issue Apr 30, 2024 · 1 comment
Open

Cannot handle early Ready-For-FW and TRNG_REQ at the same time #1489

ChiaweiW opened this issue Apr 30, 2024 · 1 comment

Comments

@ChiaweiW
Copy link

ChiaweiW commented Apr 30, 2024

Hi Caliptra team,

We found an issue when integrating Caliptra into our SoC.
The SoC ROM does not support interrupt and implements the external TRNG scheme.
That is, SoC uses a polling loop to serve both Ready-For-FW and TRNG requests.

According to the #890 patch, the Ready-For-FW flag is set early at IDEVID derivation phase.
Upon observing the ready_for_fw bit at CPTRA_FLOW_STATUS[28], SoC starts to upload the Caliptra FW via mailbox.
In the meantime, Caliptra continues to derive LDEVID, where TRNG requests are issued.
As a result, SoC is busy at FW upload and cannot handle TRNG in MAX_CYCLES_TO_WAIT, leading to the DRIVER_TRNG_EXT_TIMEOUT fatal error.

Could you help to share us some advises?
Any guidance is appreciated.

@ChiaweiW
Copy link
Author

ChiaweiW commented Apr 30, 2024

Our current workaround is to observe CPTRA_BOOT_STATUS until it gets LDevIdDerivationComplete (0x46).
After then, SoC starts to upload the FW as Caliptra is also waiting for mailbox command.

However, this is based on the Caliptra ROM source code analysis instead of the interfacing status bit.
Therefore, we wonder if there are better solutions?

@ChiaweiW ChiaweiW changed the title Cannot handle both early Ready-For-FW and TRNG_REQ Cannot handle early Ready-For-FW and TRNG_REQ at the same time Apr 30, 2024
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