UBUNTU: SAUCE: allow mem= banks to be reset on the command line

Each mem=X option specified an _additional_ memory segment.  This
cummulative behaviour prevents us from using mem=X to limit ram in play
during testing, especially where the bootloader is supplying the actual
memory of the device unconditionally.  Allow the memory map to be reset
to empty via a '!' prefix.

BugLink: http://bugs.launchpad.net/bugs/1206835
Signed-off-by: Andy Whitcroft <apw@canonical.com>
This commit is contained in:
Andy Whitcroft
2013-07-17 17:52:25 +01:00
committed by Tim Gardner
parent 0e1f625343
commit d2d47fb6b1

View File

@@ -564,6 +564,17 @@ static int __init early_mem(char *p)
phys_addr_t start; phys_addr_t start;
char *endp; char *endp;
/*
* Allow the user to reset any previous settings
* such as might be specified unconditionally by
* the bootloader. Adding ! as a prefix triggers
* this reset.
*/
if (p && p[0] == '!') {
p++;
usermem = 0;
}
/* /*
* If the user specifies memory size, we * If the user specifies memory size, we
* blow away any automatically generated * blow away any automatically generated