bsp/qoriq: Adjust MMU config only once

This commit is contained in:
Sebastian Huber
2017-04-03 10:05:51 +02:00
parent 2ba996fa89
commit f6e793a2ca
3 changed files with 10 additions and 5 deletions

View File

@@ -78,7 +78,7 @@ void qoriq_mmu_write_to_tlb1(qoriq_mmu_context *self, int first_tlb);
void qoriq_mmu_change_perm(uint32_t test, uint32_t set, uint32_t clear);
void qoriq_mmu_config(int first_tlb, int scratch_tlb);
void qoriq_mmu_config(bool boot_processor, int first_tlb, int scratch_tlb);
void qoriq_tlb1_write(
int esel,

View File

@@ -120,6 +120,7 @@ _start:
bdnz .Lnull_area_setup_loop
.Lnull_area_setup_done:
li r3, 1
bl .Linitmmu
/* Clear SBSS */
@@ -232,8 +233,8 @@ _start:
mflr SAVED_LINK_REGISTER
/* Configure MMU */
li r3, FIRST_TLB
li r4, SCRATCH_TLB
li r4, FIRST_TLB
li r5, SCRATCH_TLB
bl qoriq_mmu_config
mtmsr INITIAL_MSR
isync
@@ -320,6 +321,7 @@ _start_secondary_processor:
mr START_STACK, r3
bl .Linitmore
li r3, 0
bl .Linitmmu
b bsp_start_on_secondary_processor
#endif /* RTEMS_SMP */

View File

@@ -191,12 +191,15 @@ static void TEXT config_fdt_adjust(void)
}
}
void TEXT qoriq_mmu_config(int first_tlb, int scratch_tlb)
void TEXT qoriq_mmu_config(bool boot_processor, int first_tlb, int scratch_tlb)
{
qoriq_mmu_context context;
int i = 0;
config_fdt_adjust();
if (boot_processor) {
config_fdt_adjust();
}
qoriq_mmu_context_init(&context);
for (i = 0; i < QORIQ_TLB1_ENTRY_COUNT; ++i) {