diff options
author | York Sun <yorksun@freescale.com> | 2012-12-14 06:21:58 +0000 |
---|---|---|
committer | Andy Fleming <afleming@freescale.com> | 2013-01-30 11:25:08 -0600 |
commit | 2d9f26b69377b3a5953d4422724069d9456c2684 (patch) | |
tree | 41778644532dfdc1654e28645e1b741b26ff0242 /arch | |
parent | de757a7af05239fec359a13347b1c05ecbb59944 (diff) | |
download | u-boot-imx-2d9f26b69377b3a5953d4422724069d9456c2684.zip u-boot-imx-2d9f26b69377b3a5953d4422724069d9456c2684.tar.gz u-boot-imx-2d9f26b69377b3a5953d4422724069d9456c2684.tar.bz2 |
powerpc/mpc85xx: Reserve default boot page
The boot page in memory is already reserved so OS won't overwrite.
As long as the boot page translation is active, the default boot page
also needs to be reserved in case the memory is 4GB or more.
Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/cpu/mpc85xx/fdt.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c index ab09330..16d7f6a 100644 --- a/arch/powerpc/cpu/mpc85xx/fdt.c +++ b/arch/powerpc/cpu/mpc85xx/fdt.c @@ -100,6 +100,22 @@ void ft_fixup_cpu(void *blob, u64 memory_limit) printf("Failed to reserve memory for bootpg: %s\n", fdt_strerror(off)); } + +#ifndef CONFIG_MPC8xxx_DISABLE_BPTR + /* + * Reserve the default boot page so OSes dont use it. + * The default boot page is always mapped to bootpg above using + * boot page translation. + */ + if (0xfffff000ull < memory_limit) { + off = fdt_add_mem_rsv(blob, 0xfffff000ull, (u64)4096); + if (off < 0) { + printf("Failed to reserve memory for 0xfffff000: %s\n", + fdt_strerror(off)); + } + } +#endif + /* Reserve spin table page */ if (spin_tbl_addr < memory_limit) { off = fdt_add_mem_rsv(blob, |