forked from Imagelibrary/rtems
bsp/qoriq: Add qoriq_mmu_adjust_and_write_to_tlb1()
This commit is contained in:
@@ -105,6 +105,16 @@ void qoriq_tlb1_write(
|
||||
int tsize
|
||||
);
|
||||
|
||||
void qoriq_mmu_adjust_and_write_to_tlb1(
|
||||
int tlb,
|
||||
uintptr_t begin,
|
||||
uintptr_t last,
|
||||
uint32_t mas1,
|
||||
uint32_t mas2,
|
||||
uint32_t mas3,
|
||||
uint32_t mas7
|
||||
);
|
||||
|
||||
void qoriq_tlb1_invalidate(int esel);
|
||||
|
||||
/** @} */
|
||||
|
||||
@@ -118,11 +118,8 @@ static void bsp_inter_processor_interrupt(void *arg)
|
||||
static void setup_boot_page(void)
|
||||
{
|
||||
#ifdef QORIQ_IS_HYPERVISOR_GUEST
|
||||
qoriq_mmu_context mmu_context;
|
||||
|
||||
qoriq_mmu_context_init(&mmu_context);
|
||||
qoriq_mmu_add(
|
||||
&mmu_context,
|
||||
qoriq_mmu_adjust_and_write_to_tlb1(
|
||||
QORIQ_TLB1_ENTRY_COUNT - 1,
|
||||
0xfffff000,
|
||||
0xffffffff,
|
||||
0,
|
||||
@@ -130,8 +127,6 @@ static void setup_boot_page(void)
|
||||
FSL_EIS_MAS3_SR | FSL_EIS_MAS3_SW,
|
||||
0
|
||||
);
|
||||
qoriq_mmu_partition(&mmu_context, 1);
|
||||
qoriq_mmu_write_to_tlb1(&mmu_context, QORIQ_TLB1_ENTRY_COUNT - 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -406,3 +406,29 @@ int qoriq_mmu_find_free_tlb1_entry(void)
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
void qoriq_mmu_adjust_and_write_to_tlb1(
|
||||
int tlb,
|
||||
uintptr_t begin,
|
||||
uintptr_t last,
|
||||
uint32_t mas1,
|
||||
uint32_t mas2,
|
||||
uint32_t mas3,
|
||||
uint32_t mas7
|
||||
)
|
||||
{
|
||||
qoriq_mmu_context context;
|
||||
|
||||
qoriq_mmu_context_init(&context);
|
||||
qoriq_mmu_add(
|
||||
&context,
|
||||
begin,
|
||||
last,
|
||||
mas1,
|
||||
mas2,
|
||||
mas3,
|
||||
mas7
|
||||
);
|
||||
qoriq_mmu_partition(&context, 1);
|
||||
qoriq_mmu_write_to_tlb1(&context, tlb);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user