mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Hanson, Jonathan M" <jonathan.m.hanson@intel.com>
To: <linux-kernel@vger.kernel.org>
Subject: Figuring out physical memory regions from a kernel module
Date: Wed, 8 Dec 2004 10:44:09 -0700	[thread overview]
Message-ID: <C863B68032DED14E8EBA9F71EB8FE4C20596010F@azsmsx406> (raw)

	Is there a reliable way to tell from a kernel module (currently
written for 2.4 but will need to work under 2.6 in the future) which
regions of physical memory are actually available for the kernel and
processes to use? For example, the following command tells me the
regions of physical memory that are available to use:

cat /proc/iomem | grep 'System RAM'

This yields something like the following on my x86 system:

00000000-0009ffff : System RAM
00100000-1ffd5857 : System RAM

I need to be able to determine these regions from within a kernel
module. The e820 data structures configured at kernel boot-time are not
exported so I can't see them from a kernel module, otherwise they would
be perfect. For my purposes, I'm operating under the assumption that all
physical memory can be mapped by the kernel (under 896 MB of physical
memory). Can anyone recommend a way to get to this data? I would greatly
appreciate it.


             reply	other threads:[~2004-12-08 17:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-08 17:44 Hanson, Jonathan M [this message]
2004-12-08 17:50 ` Arjan van de Ven
2004-12-08 17:57 ` Dave Hansen
2004-12-09  6:25 ` Vivek Goyal
2004-12-08 17:54 Hanson, Jonathan M
2004-12-08 18:28 Hanson, Jonathan M
2004-12-08 18:40 ` Dave Hansen
2004-12-08 21:26 Hanson, Jonathan M
2004-12-08 21:38 ` Dave Hansen

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=C863B68032DED14E8EBA9F71EB8FE4C20596010F@azsmsx406 \
    --to=jonathan.m.hanson@intel.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

all inboxes | Powered by JetHome®