qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Developing custom device for ARM
@ 2016-02-23 15:47 Igor R
  2016-02-23 16:03 ` Peter Maydell
  0 siblings, 1 reply; 2+ messages in thread
From: Igor R @ 2016-02-23 15:47 UTC (permalink / raw)
  To: qemu-devel

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-23 16:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-23 15:47 [Qemu-devel] Developing custom device for ARM Igor R
2016-02-23 16:03 ` Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).