mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: david.hagood@gmail.com
To: linux-kernel@vger.kernel.org
Subject: How to allocate a region of address space (NOT RAM!)
Date: Wed, 1 Sep 2010 14:51:17 -0500	[thread overview]
Message-ID: <63e423a0c8ebc4c6e448622c1d0cb99f.squirrel@localhost> (raw)

I'm working with a single chip system (specifically, a PPC core) that has
onboard devices. I need to allocate a region of address space that is
unused, so that I can configure one of the on-chip devices to occupy that
space. The region of address space allocated must NOT have anything there
already - no RAM, no devices.

As far as I can see, there is no "bus" object I can talk to in order to
allocate address space, as one would do when allocating space on PCI. How
do I grab a region of address space, and be sure that nobody else is going
to frob it?

I could just look at the memory map, plunk my flag down and say "I claim
this address in the name of Endpoint!" but that doesn't keep me from
accidentally laying claim to New York, nor does it stop somebody else from
sailing in behind me and plunking their flag down.

Is there some master resource somewhere in the kernel that tracks the
allocation of physical address space, in the same way that kalloc tracks
the allocation of RAM space? Is there some API I've missed that will
allocate space and make sure it gets mapped into virtual space for me, or
will I have to roll my own solution?



                 reply	other threads:[~2010-09-01 19:51 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=63e423a0c8ebc4c6e448622c1d0cb99f.squirrel@localhost \
    --to=david.hagood@gmail.com \
    --cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome