All of lore.kernel.org
 help / color / mirror / Atom feed
From: chris@basementcode.com (Christopher Harvey)
To: kernelnewbies@lists.kernelnewbies.org
Subject: what is the __io_address macro for?
Date: Thu, 12 May 2011 20:03:23 -0400	[thread overview]
Message-ID: <4DCC754B.80805@basementcode.com> (raw)

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.

                 reply	other threads:[~2011-05-13  0:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DCC754B.80805@basementcode.com \
    --to=chris@basementcode.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.