Hello,
On Tue, Feb 28, 2023 at 11:24:18 CET, Pranab Kumar Rout cs21m045 wrote:
Now, I need to write the hearder file (jitterentropy-base-genode-nstime.h) for risc-v that would do the same work. Can you please explain what this function ( *inline void jent_get_nstime(__u64 *out)* ) actually do ? So that I can write it for risc-v arch also.
Please refer to the jitterentropy library documentation [1] for the specification of jent_get_nstime(). In general, the function shoud return a "high-resolution time stamp" with minimal overhead, for example a cycle counter like TSC on x86. Unfortunately, I don't know about any RISC-V feature that could be used for this specific purpose or if RISC-V in general provides sufficient CPU Execution Timing Jitter for the jitterentropy library.
[1] http://www.chronox.de/jent.html
Regards