diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index 2d76cd4..1055017 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -57,6 +57,7 @@ struct arch_global_data { * 0x2 maintained */ phys_addr_t secure_ram; + unsigned long tlb_allocated; #endif #ifdef CONFIG_OMAP_COMMON diff --git a/common/board_f.c b/common/board_f.c index 0fc96bd..a1138b0 100644 --- a/common/board_f.c +++ b/common/board_f.c @@ -432,6 +432,15 @@ static int reserve_mmu(void) gd->arch.tlb_addr = gd->relocaddr; debug("TLB table from %08lx to %08lx\n", gd->arch.tlb_addr, gd->arch.tlb_addr + gd->arch.tlb_size); + +#ifdef CONFIG_SYS_MEM_RESERVE_SECURE + /* + * Record allocated tlb_addr in case gd->tlb_addr to be overwritten + * with location within secure ram. + */ + gd->arch.tlb_allocated = gd->arch.tlb_addr; +#endif + return 0; } #endif