[PATCH] powerpc: Auto reserve of device tree blob

A devtree compiler (dtc) generated devtree blob is "relocatable" and so
does not contain a reserved_map entry for the blob itself.  This means
that if passed to Linux, Linux will not get lmb_reserve() the blob and
it could be over.  The following patch will explicitly reserve the
"blob" as it was given to us and stops prom_init.c from creating a
reserved mapping for the blob.

NOTE: that the dtc/kexec should not generate the blob reservation entry.
Although if they do, LMB reserver handles overlaps.

Signed-off-by:  <jimix@watson.ibm.com>
Acked-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
Jimi Xenidis
2006-05-18 17:03:05 -05:00
committed by Paul Mackerras
parent 1dc461f0b0
commit 4d1f3f25d9
2 changed files with 9 additions and 5 deletions

View File

@@ -1267,6 +1267,11 @@ static void __init early_reserve_mem(void)
reserve_map = (u64 *)(((unsigned long)initial_boot_params) +
initial_boot_params->off_mem_rsvmap);
/* before we do anything, lets reserve the dt blob */
lmb_reserve(__pa((unsigned long)initial_boot_params),
initial_boot_params->totalsize);
#ifdef CONFIG_PPC32
/*
* Handle the case where we might be booting from an old kexec