jitterentropy base genode nstime.h for virt riscv

Martin Stein martin.stein at genode-labs.com
Mon Feb 27 14:29:57 CET 2023


As far as I can tell, this is because you're using the ARMv7 version of
jitterentropy-base-genode-nstime.h, which uses inline assembly, which is
unknown to the riscv compiler. Either you find a riscv implementation of
that file or you have to write it on your own.

Cheers,
Martin

On 27.02.23 13:55, Pranab Kumar Rout cs21m045 wrote:
> Hello all,
> While building sculpt for virt riscv, I was getting undefined reference
> errors in app/gpt_write,
> Based on Norman's suggestions earlier, 
> I updated the recipe for the jitterentopy API [1] that is used to
> assemble the content in depot/genodelabs/api/jitterentropy/<version>/
> [1] 
> genode/repos/libports/recipes/api/jitterentropy/content.mk
> <http://content.mk>
> 
> This helped me overcome the undefined reference errors, But now I am
> getting:
> 
>     Library jitterentropy
>         COMPILE  jitterentropy-base-genode.o
>         COMPILE  jitterentropy-base.o
>     genode/depot/genodelabs/api/jitterentropy/2023-02-24/src/lib/jitterentropy/spec/riscv/jitterentropy-base-genode-nstime.h:
>     Assembler messages:
>     genode/depot/genodelabs/api/jitterentropy/2023-02-24/src/lib/jitterentropy/spec/riscv/jitterentropy-base-genode-nstime.h:20:
>     Error: unrecognized opcode `mrc p15,0,a5,c9,c13,0'
>     make[7]: *** [genode/repos/base/mk/generic.mk:58
>     <http://generic.mk:58>: jitterentropy-base.o] Error 1
>     make[6]: *** [var/libdeps:112: jitterentropy.lib] Error 2
>     make[5]: *** [Makefile:336: gen_deps_and_build_targets] Error 2
> 
> 
> This error seems be due the contents of the header file (That I had
> created):
> 
>     repos/libports/src/lib/jitterentropy/spec/riscv/jitterentropy-base-genode-nstime.h
> 
> 
> because jitterentropy was not enabled yet on riscv, I had to create this
> file myself. 
> Contents of [2] that I had written:
> 
>     #ifndef _JITTERENTROPY_RISCV_BASE_GENODE_NSTIME_H_
>     #define _JITTERENTROPY_RISCV_BASE_GENODE_NSTIME_H_
>     static inline void jent_get_nstime(__u64 *out)
>     {
>     uint32_t t;
>     asm volatile("mrc p15, 0, %0, c9, c13, 0" : "=r"(t));
>     *out = t;
>     }
>     #endif
> 
> 
> [2]* *
> *repos/libports/src/lib/**jitterentropy/spec/riscv/*jitterentropy-base-genode*-**nstime.h *
> *
> *
> I tried to build it by looking at the header files corresponding to
> other architectures. I am not aware of opcode for riscv. Please guide me
> to write the correct code. what should be written in this header file
> for riscv.
> 
> Thanks and regards,
> Pranab Kumar Rout
> 
> _______________________________________________
> Genode users mailing list
> users at lists.genode.org
> https://lists.genode.org/listinfo/users
> 



More information about the users mailing list