All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Pavel Machek <pavel@ucw.cz>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Reserving physical memory at boot time
Date: Sun, 09 Mar 2003 13:08:39 -0800	[thread overview]
Message-ID: <3E6BAD57.803@zytor.com> (raw)
In-Reply-To: 20030307231954.GB164@elf.ucw.cz

Pavel Machek wrote:
> 
> Okay; which mem= options you want killed?
> 

Anything that doesn't match the regexp (in Perl syntax):

/^mem=(0[0-7]*|[1-9][0-9]*|0x[0-9a-f]+)[kmg]$/i

> What about this?

Looks good to me.

> 								Pavel
> 
> --- clean/arch/i386/kernel/setup.c	2003-03-06 23:25:14.000000000 +0100
> +++ linux/arch/i386/kernel/setup.c	2003-03-08 00:18:21.000000000 +0100
> @@ -527,6 +527,9 @@
>  		 * to <mem>, overriding the bios size.
>  		 * "mem=XXX[KkmM]@XXX[KkmM]" defines a memory region from
>  		 * <start> to <start>+<mem>, overriding the bios size.
> +		 *
> +		 * HPA tells me bootloaders need to parse mem=, so no new
> +		 * option should be mem=
>  		 */
>  		if (c == ' ' && !memcmp(from, "mem=", 4)) {
>  			if (to != command_line)
> @@ -535,8 +538,24 @@
>  				from += 9+4;
>  				clear_bit(X86_FEATURE_PSE, boot_cpu_data.x86_capability);
>  				disable_pse = 1;
> -			} else if (!memcmp(from+4, "exactmap", 8)) {
> -				from += 8+4;
> +			} else {
> +				/* If the user specifies memory size, we
> +				 * limit the BIOS-provided memory map to
> +				 * that size. exactmap can be used to specify
> +				 * the exact map. mem=number can be used to
> +				 * trim the existing memory map.
> +				 */
> +				unsigned long long start_at, mem_size;
> + 
> +				mem_size = memparse(from+4, &from);
> +			}
> +		}
> +
> +		if (c == ' ' && !memcmp(from, "memmap=", 7)) {
> +			if (to != command_line)
> +				to--;
> +			if (!memcmp(from+7, "exactmap", 8)) {
> +				from += 8+7;
>  				e820.nr_map = 0;
>  				userdef = 1;
>  			} else {
> @@ -548,7 +567,7 @@
>  				 */
>  				unsigned long long start_at, mem_size;
>   
> -				mem_size = memparse(from+4, &from);
> +				mem_size = memparse(from+7, &from);
>  				if (*from == '@') {
>  					start_at = memparse(from+1, &from);
>  					add_memory_region(start_at, mem_size, E820_RAM);
> @@ -565,6 +584,7 @@
>  			}
>  		}
>  
> +
>  		/* "acpi=off" disables both ACPI table parsing and interpreter init */
>  		if (c == ' ' && !memcmp(from, "acpi=off", 8))
>  			acpi_disabled = 1;
> 
> 


  reply	other threads:[~2003-03-09 20:58 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-12-03 12:03 Reserving physical memory at boot time Duncan Sands
2002-12-03 21:11 ` Richard B. Johnson
2002-12-03 12:52   ` Duncan Sands
2002-12-03 22:14     ` Alan Cox
2002-12-03 21:58   ` Alan Cox
2002-12-03 22:18     ` bzeeb-lists
2002-12-04 13:25     ` Richard B. Johnson
     [not found]     ` <Pine.LNX.3.95.1021204082313.23777A-100000@chaos.analogic.c om>
2002-12-04 16:44       ` Mike Galbraith
2002-12-04  6:15         ` Duncan Sands
2002-12-05  5:44           ` Mike Galbraith
2002-12-04 17:01         ` Richard B. Johnson
2002-12-04 17:06           ` Randy.Dunlap
2003-03-05  5:44             ` H. Peter Anvin
2003-03-05  6:01               ` Randy.Dunlap
2003-03-05 15:04                 ` H. Peter Anvin
2003-03-05 15:43                   ` Randy.Dunlap
2003-03-05 15:48                     ` H. Peter Anvin
2003-03-06 21:26                   ` Pavel Machek
2003-03-06 23:24                     ` H. Peter Anvin
2003-03-07 23:19                       ` Pavel Machek
2003-03-09 21:08                         ` H. Peter Anvin [this message]
2003-03-09 23:07                           ` Randy.Dunlap
2002-12-03 23:23 ` James Stevenson
2002-12-04  3:53   ` Randy.Dunlap
  -- strict thread matches above, loose matches on Subject: below --
2002-12-05  8:13 Suparna Bhattacharya

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=3E6BAD57.803@zytor.com \
    --to=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.