From: Bernhard Walle <bwalle@suse.de>
To: kexec@lists.infradead.org
Cc: x86@kernel.org, linux-kernel@vger.kernel.org, vgoyal@redhat.com,
Bernhard Walle <bwalle@suse.de>
Subject: Introduce userspace interface for Firmware-provided memory map
Date: Fri, 20 Jun 2008 17:56:57 +0200 [thread overview]
Message-ID: <1213977420-1555-1-git-send-email-bwalle@suse.de> (raw)
This patch (as request for comments) introduces a new userspace interface
/proc/firmware_mem that provides the unfiltered view of the BIOS on
memory configuration. That's usable for two reasons:
1) Debugging (yes, the E820 memory is printed in kernel ring buffer, but that's
not the case for all platforms, on IA64 you have to enable some magic define
to print the EFI memory map, for example),
2) Kexec. When the user or the system uses a special command line to modify the
memory configuration, kexec still needs a method to get the original memory
map. While the filtered view is useful for generating ELF core headers for
crashdumps, the unfiltered view is necessary to boot the next kernel without
the "limitations" the original kernel has.
We had the discussion to add iomem_used on kexec mailing list. However, I think
it's better to let /proc/iomem represent the *filtered* (i.e. "used") view of
the I/O resources and introduce a new interface for the *unfiltered* view.
There are two reasons:
1) On i386 (the oldest architectures), /proc/iomem always represented the
*filtered* view (i.e. "mem" parameter was also visible in /proc/iomem).
I think we should not change the semantics of an interface without a reason.
2) /proc/iomem_used would it make necessary to duplicate all registration between
/proc/iomem and /proc/iomem_used. Because currently the resource root
is exported and used everywhere in the kernel source, that would make
changes of the whole resource infrastructure necessary if code duplication
should be avoided.
Maybe you think that /proc/firmware_mem is not the right place to export that.
I don't know, I also don't care that much about the naming or the way to export
that. So, please advise me if you agree that it's ok for kexec to export an
unfiltered view of the memory map.
The patch has been tested on i386 and x86_64.
Signed-off-by: Bernhard Walle <bwalle@suse.de>
next reply other threads:[~2008-06-20 15:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-20 15:56 Bernhard Walle [this message]
2008-06-20 15:56 ` [PATCH 1/3] Introduce /proc/firmware_mem Bernhard Walle
2008-06-20 15:56 ` [PATCH 2/3] Use /proc/firmware_mem for x86 (e820) Bernhard Walle
2008-06-24 18:28 ` Pavel Machek
2008-06-26 8:21 ` Bernhard Walle
2008-06-20 15:57 ` [PATCH 3/3] Limit E820 map when a user-defined memory map is specified Bernhard Walle
2008-06-20 19:45 ` Vivek Goyal
2008-06-20 20:34 ` Yinghai Lu
2008-06-22 19:46 ` Bernhard Walle
2008-06-22 19:56 ` Bernhard Walle
2008-06-22 20:11 ` Yinghai Lu
2008-06-24 14:07 ` Bernhard Walle
2008-06-20 15:58 ` Introduce userspace interface for Firmware-provided memory map Bernhard Walle
2008-06-20 19:42 ` Vivek Goyal
2008-06-20 20:35 ` H. Peter Anvin
2008-06-22 19:59 ` Bernhard Walle
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=1213977420-1555-1-git-send-email-bwalle@suse.de \
--to=bwalle@suse.de \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@redhat.com \
--cc=x86@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®