kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* what is the __io_address macro for?
@ 2011-05-13  0:03 Christopher Harvey
  0 siblings, 0 replies; only message in thread
From: Christopher Harvey @ 2011-05-13  0:03 UTC (permalink / raw)
  To: kernelnewbies

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-13  0:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-13  0:03 what is the __io_address macro for? Christopher Harvey

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).