Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79856
b: refs/heads/master
c: b3ca74a
h: refs/heads/master
v: v3
  • Loading branch information
Vladimir Berezniker authored and Ingo Molnar committed Jan 30, 2008
1 parent 87320fa commit 4240b85
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: efd1ca52d04d2f6df337a3332cee56cd60e6d4c4
refs/heads/master: b3ca74a2bfc66262d21443b160815eb26d6699e6
8 changes: 8 additions & 0 deletions trunk/arch/x86/kernel/e820_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,6 +691,8 @@ static int __init parse_memmap_opt(char *p)
mem_size = memparse(p, &p);
if (p == oldp)
return -EINVAL;

userdef = 1;
if (*p == '@') {
start_at = memparse(p+1, &p);
add_memory_region(start_at, mem_size, E820_RAM);
Expand All @@ -710,6 +712,12 @@ early_param("memmap", parse_memmap_opt);
void __init finish_e820_parsing(void)
{
if (userdef) {
char nr = e820.nr_map;

if (sanitize_e820_map(e820.map, &nr) < 0)
early_panic("Invalid user supplied memory map");
e820.nr_map = nr;

printk(KERN_INFO "user-defined physical RAM map:\n");
e820_print_map("user");
}
Expand Down

0 comments on commit 4240b85

Please sign in to comment.