Hello, I implemented a simple sys_bus device that only communicates through port io. The purpose of this device is to be accessible via /dev/port only, with no need for any additional kernel modules. I Defined the memory region using memory_region_init_io and registered it using sysbus_add_io. I registered the memory region in address 0x9000, and defined custom read and write functions for it. In the guest Linux I used dd if=/dev/port skip=$((0x9000)) count=1 bs=1 to access the port io registers.
This worked great for x86 and mips (malta) machines, however, on an arm (versatilepb) machine, I couldn't get this method to work. The reads and writes from 0x900X addresses did not get through to my device. Further inspection revealed that in arm, the kernel tries to reference the *virtual* address 0x9000, while in mips it references the virtual address 0x8b009000. (In x86 a different set of opcodes are used to access the port io area). Why isn't this method working on arm? Thanks.