OSDN Git Service

x86/boot/e820: Implement a range manipulation operator
authorJan H. Schönherr <jschoenh@amazon.de>
Fri, 2 Feb 2018 23:10:20 +0000 (00:10 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 26 Feb 2018 07:44:52 +0000 (08:44 +0100)
commitef61f8a340fd6d49df6b367785743febc47320c1
tree010e1943bd46fcc03e8d5ddb638c0e81254a9a5b
parent672c0ae09b33a11d8f31fc61526632e96301164c
x86/boot/e820: Implement a range manipulation operator

Add a more versatile memmap= operator, which -- in addition to all the
things that were possible before -- allows you to:

- redeclare existing ranges -- before, you were limited to adding ranges;
- drop any range -- like a mem= for any location;
- use any e820 memory type -- not just some predefined ones.

The syntax is:

  memmap=<size>%<offset>-<oldtype>+<newtype>

Size and offset work as usual. The "-<oldtype>" and "+<newtype>" are
optional and their existence determine the behavior: The command
works on the specified range of memory limited to type <oldtype>
(if specified). This memory is then configured to show up as <newtype>.
If <newtype> is not specified, the memory is removed from the e820 map.

Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20180202231020.15608-1-jschoenh@amazon.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Documentation/admin-guide/kernel-parameters.txt
arch/x86/kernel/e820.c