Alternatively, when I include libuhcall.a in the source files for the kernel module, I get a different linking error that uhcall.o uses VFP register arguments while the kernel module does not. This causes the linking to fail.
You cannot used libuhcall for kernel-mode drivers. You will have to invoke the HVC instruction directly. This logic is embedded within the example uhcallkmod example in the rgapps folder – take a look. We should probably make a kernel mode library at some point…
What is being passed to uhcallkmod_hvc(u32 uhcall_function, void *uhcall_buffer, u32 uhcall_buffer_len) for the pa (uhcall_buffer)? It seems that in uhcall.c the pa is determined for the data struct being passed to the hypercall. Then this value is cast as a pointer (uhcallp.uhcall_buffer=(void *)(uint32_t)uhcall_buffer_paddr) and given to uhcallkmod_hvc()?
As a note. #include <linux/mm.h> requires a few additional dependencies to define constants.
I also needed the following: #include <linux/kernel.h> for MAX_SIZE #include <linux/numa.h> for NUMA_NO_NODE #include <linux/gfp.h> for __GFP_ZERO
Can you revise the PR so that the new documentation you added to docs/rpi3-cortex_a53-armv8_32\build.rst actually pops one level of indentation?
he libraries blurb appears as a sub bullet of the outer “Note” bullet, but should be at the same level as the “Note” bullet.
Also the inline literal uhcall() should have spacing between the end of literal `` and the word for following it. This gives currently gives a warning during the documentation build and the resulting documentation becomes a little weird at that point of rendering.