I am currently working with the Linux kernel module, and I need to access some 64-bit values stored in the array, however first I need to make void from the pointer.
I use a kernel function phys_to_virtthat returns a pointer to void, and I'm not quite sure how to actually use this void pointer to access the elements in the array that it points to.
I am currently doing this:
void *ptr;
uint64_t test;
ptr = phys_to_virt(physAddr);
test = *(uint64_t*)ptr;
printk("Test: %llx\n", test);
The value that I get from the test is not what I expected to see in the array, so I'm sure I'm doing something wrong. I need to access the first three elements in the array, so I need to point the void pointer to uint64_t [], but I'm not quite sure how to do this.
Any advice is appreciated.
thank