Commit 50e93b95 authored by York Sun's avatar York Sun

armv8: Add tlb_allocated to arch global data

When secure ram is used, MMU tables have to be put into secure ram.
To use common MMU code, gd->arch.tlb_addr will be used to host TLB
entry pointer. To save allocated memory for later use, tlb_allocated
variable is added to global data structure.
Signed-off-by: default avatarYork Sun <>
parent e61a7534
......@@ -57,6 +57,7 @@ struct arch_global_data {
* 0x2 maintained
phys_addr_t secure_ram;
unsigned long tlb_allocated;
......@@ -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);
* 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;
return 0;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment