summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom_init.c
diff options
context:
space:
mode:
authorJimi Xenidis <jimix@watson.ibm.com>2006-05-18 17:03:05 -0500
committerPaul Mackerras <paulus@samba.org>2006-05-19 15:02:26 +1000
commit4d1f3f25d9c303d1ce63b42cc94c54ac0ab2e950 (patch)
treeab418b136a78442fc4f0f8d3575da74b82df4bda /arch/powerpc/kernel/prom_init.c
parent1dc461f0b03fab309eb9214df1c9b586aeaf3b22 (diff)
downloadop-kernel-dev-4d1f3f25d9c303d1ce63b42cc94c54ac0ab2e950.zip
op-kernel-dev-4d1f3f25d9c303d1ce63b42cc94c54ac0ab2e950.tar.gz
[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>
Diffstat (limited to 'arch/powerpc/kernel/prom_init.c')
-rw-r--r--arch/powerpc/kernel/prom_init.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
index 2442361..98e201c 100644
--- a/arch/powerpc/kernel/prom_init.c
+++ b/arch/powerpc/kernel/prom_init.c
@@ -1950,11 +1950,7 @@ static void __init flatten_device_tree(void)
/* Version 16 is not backward compatible */
hdr->last_comp_version = 0x10;
- /* Reserve the whole thing and copy the reserve map in, we
- * also bump mem_reserve_cnt to cause further reservations to
- * fail since it's too late.
- */
- reserve_mem(RELOC(dt_header_start), hdr->totalsize);
+ /* Copy the reserve map in */
memcpy(rsvmap, RELOC(mem_reserve_map), sizeof(mem_reserve_map));
#ifdef DEBUG_PROM
@@ -1967,6 +1963,9 @@ static void __init flatten_device_tree(void)
RELOC(mem_reserve_map)[i].size);
}
#endif
+ /* Bump mem_reserve_cnt to cause further reservations to fail
+ * since it's too late.
+ */
RELOC(mem_reserve_cnt) = MEM_RESERVE_MAP_SIZE;
prom_printf("Device tree strings 0x%x -> 0x%x\n",
OpenPOWER on IntegriCloud