what is the __io_address macro for?

Christopher Harvey chris at basementcode.com
Thu May 12 20:03:23 EDT 2011


http://lxr.linux.no/#linux+v2.6.38/arch/arm/mach-realview/include/mach/hardware.h#L40

Seems to be used in hardware that can be emulated with QEMU. The offset 
and mask seem totally arbitrary to me, but multiple mach types use the 
same ones.

I'm trying to use it to access the arm global timer. I can use it to 
access the CPU local timer, but simply adding the offset to the global 
timer registers causes QEMU to land in the GIC CPU interface.

This isn't for the realview board btw, just a similar example. I feel 
like there is something fundamental I'm missing that is preventing me 
from understanding why:

__io_address(BASE + 0x600)  //local timer, works, no problems
__io_address(BASE + 0x200)  //global timer, but reads from gic cpu 
interface?

that happens. (I am using QEMU btw)

arm docs for offsets here:  (bottom table)
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0407f/CACCJFCJ.html

Thanks for reading,
Chris.



More information about the Kernelnewbies mailing list