-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add RNG driver #54
Add RNG driver #54
Conversation
FYI, this PR allow to get rid of this warning when building WiFi example:
|
856e75c
to
be0227f
Compare
Looks good, but I added the DNM label until the HAL PR has been merged and west.yml updated. |
|
||
static int siwx917_get_entropy(const struct device *dev, uint8_t *buffer, uint16_t length) | ||
{ | ||
return siwx917_get_entropy_isr(dev, buffer, length, ENTROPY_BUSYWAIT); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The API description says: "This call has to be thread safe to satisfy requirements of the random subsystem."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact, I believe RSI_RNG_GetBytes()
and all the subfunctions (mainly rng_get_bytes()
) are thread safe. So I didn't keep the spinlock.
Support for random number generator is required for most of the cryptographic operations, including support for WiFi and TLS. This driver has been tested with tests/drivers/entropy: *** Booting Zephyr OS build v3.7.0-4339-g1ec5ce05f9f8 *** Running TESTSUITE entropy_api =================================================================== START - test_entropy_get_entropy random device is 0x8217298, name is rng@45090000 0x93 0x3e 0xf1 0x68 0xd4 0x22 0xbf 0x4d 0xad PASS - test_entropy_get_entropy in 0.012 seconds =================================================================== TESTSUITE entropy_api succeeded ------ TESTSUITE SUMMARY START ------ SUITE PASS - 100.00% [entropy_api]: pass = 1, fail = 0, skip = 0 ... - PASS - [entropy_api.test_entropy_get_entropy] duration = 0.01 ... ------ TESTSUITE SUMMARY END ------ =================================================================== RunID: d1547c805699201af769cb01331efcce PROJECT EXECUTION SUCCESSFUL Co-authored-by: Tibor Laczko <[email protected]> Signed-off-by: Tibor Laczko <[email protected]> Signed-off-by: Jérôme Pouiller <[email protected]>
Change indentation level of build.yml to match upstream-build.yml. Signed-off-by: Jérôme Pouiller <[email protected]>
upstream-build.yml and build.yml didn't invoke twister in the same nor with the same tests. Note $EXTRA_TWISTER_FLAGS was used in all the tests. Yet, CI still runs on Windows. So, this commit get rid of EXTRA_TWISTER_FLAGS in all the invocations. Signed-off-by: Jérôme Pouiller <[email protected]>
It makes sense to check we don't break the entropy driver. Signed-off-by: Jérôme Pouiller <[email protected]>
be0227f
to
47e8a59
Compare
49b5a1b
into
SiliconLabsSoftware:main
This work is inspired of the Tibor's work.
This PR also align build.yml and upstream-build.yml.