I am migrating a code from Linux to ghs Integrity Real Time OS. The code requires opening physical/main memory and then map the physical to virtual memory using mmap.
In Linux, main memory is accessed by,
fd = open(“/dev/mem”, O_RDONLY);
void * virt_addr = mmap(NULL, 0x20000, PROT_READ | PROT_WRITE, MAP_SHARED, physical_addr);
int32_t register_access = ((UINT8 *)virt_addr + 0x2000);
Note: physical_addr is a physical address of base address register(BAR) in PCI.
Can you please let me know how this can be accomplished in Integrity.
Thanks in advance
Solution code for virtual memory access in integrity