public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: zoucao-ipc <zoucaox@gmail.com>
To: zoucao@linux.alibaba.com, tglx@linutronix.de, mingo@redhat.com,
	hpa@zytor.com
Cc: x86@kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/boot/e820: add new chareater "-" to free BIOS memory in memmap bootargs
Date: Mon, 16 Apr 2018 19:06:37 +0800	[thread overview]
Message-ID: <5AD483BD.70804@gmail.com> (raw)
In-Reply-To: <20180410025912.49830-2-zoucao@linux.alibaba.com>

any suggestions?

On 2018/4/10 上午10:59, zoucao@linux.alibaba.com wrote:
> From: zoucao <zoucao@localhost.localdomain>
>
> Normally every BIOS reserved memory is used for some features, we can't
> use them, but in some conditions,  users can ensure some BIOS memories
> are not used and reserved memory is well to free, they have not a good
> way to free these memories, here add a new chareater "-" in memmap to
> free reserved memory.
>
> Signed-off-by: zou cao <zoucao@linux.alibaba.com>
> ---
>   7u/Documentation/kernel-parameters.txt | 6 ++++++
>   7u/arch/x86/kernel/e820.c              | 3 +++
>   2 files changed, 9 insertions(+)
>
> diff --git a/7u/Documentation/kernel-parameters.txt b/7u/Documentation/kernel-parameters.txt
> index 9a1abb99a..dbea75e12 100644
> --- a/7u/Documentation/kernel-parameters.txt
> +++ b/7u/Documentation/kernel-parameters.txt
> @@ -1677,6 +1677,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
>   			         or
>   			         memmap=0x10000$0x18690000
>   
> +	memmap=nn[KMG]-ss[KMG]
> +			Free E820 reserved memory, as specified by the user.
> +			Region of reserved memory to be free, from ss to ss+nn.
> +			Example: free reserved memory from 0x18690000-0x186a0000
> +					memmap=0x4101000-0x6aeff000
> +
>   	memory_corruption_check=0/1 [X86]
>   			Some BIOSes seem to corrupt the first 64k of
>   			memory when doing things like suspend/resume.
> diff --git a/7u/arch/x86/kernel/e820.c b/7u/arch/x86/kernel/e820.c
> index 174da5fc5..b8a042981 100644
> --- a/7u/arch/x86/kernel/e820.c
> +++ b/7u/arch/x86/kernel/e820.c
> @@ -875,6 +875,9 @@ static int __init parse_memmap_one(char *p)
>   	} else if (*p == '$') {
>   		start_at = memparse(p+1, &p);
>   		e820_add_region(start_at, mem_size, E820_RESERVED);
> +	} else if (*p == '-') {
> +		start_at = memparse(p+1, &p);
> +		e820_remove_range(start_at, mem_size, E820_RESERVED, E820_RAM);
>   	} else
>   		e820_remove_range(mem_size, ULLONG_MAX - mem_size, E820_RAM, 1);
>   

  reply	other threads:[~2018-04-16 11:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-10  2:59 [PATCH V2] x86/boot/e820: add new chareater - to free BIOS memory in memmap bootargs zoucao
2018-04-10  2:59 ` [PATCH] x86/boot/e820: add new chareater "-" " zoucao
2018-04-16 11:06   ` zoucao-ipc [this message]
2018-04-17  6:18   ` zoucao-ipc
2018-04-17 10:22     ` Thomas Gleixner
2018-04-17 13:11       ` zoucao-ipc
2018-04-17 13:47   ` Thomas Gleixner
2018-04-17 14:40     ` zoucao-ipc
  -- strict thread matches above, loose matches on Subject: below --
2018-04-08  6:41 [PATCH] free e820 reserved memory in bootargs memmap zoucao
2018-04-08  6:41 ` [PATCH] x86/boot/e820: add new chareater "-" to free BIOS memory in memmap bootargs zoucao

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=5AD483BD.70804@gmail.com \
    --to=zoucaox@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=zoucao@linux.alibaba.com \
    /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