mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
Add reset callbacks for PowerPC CPU.
Move cpu_ppc_init, cpu_ppc_close, cpu_ppc_reset and ppc_tlb_invalidate into helper.c as they are to be called from outside of the translated code. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2682 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
dd37a5e4d7
commit
0a032cbec6
6 changed files with 87 additions and 64 deletions
|
@ -2256,16 +2256,7 @@ void tlb_fill (target_ulong addr, int is_write, int is_user, void *retaddr)
|
|||
/* TLB invalidation helpers */
|
||||
void do_tlbia (void)
|
||||
{
|
||||
if (unlikely(PPC_MMU(env) == PPC_FLAGS_MMU_SOFT_6xx)) {
|
||||
ppc6xx_tlb_invalidate_all(env);
|
||||
} else if (unlikely(PPC_MMU(env) == PPC_FLAGS_MMU_SOFT_4xx)) {
|
||||
/* XXX: TODO */
|
||||
#if 0
|
||||
ppcbooke_tlb_invalidate_all(env);
|
||||
#endif
|
||||
} else {
|
||||
tlb_flush(env, 1);
|
||||
}
|
||||
ppc_tlb_invalidate_all(env);
|
||||
}
|
||||
|
||||
void do_tlbie (void)
|
||||
|
@ -2473,25 +2464,6 @@ static int booke_page_size_to_tlb (target_ulong page_size)
|
|||
}
|
||||
|
||||
/* Helpers for 4xx TLB management */
|
||||
void do_4xx_tlbia (void)
|
||||
{
|
||||
ppcemb_tlb_t *tlb;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 64; i++) {
|
||||
tlb = &env->tlb[i].tlbe;
|
||||
if (tlb->prot & PAGE_VALID) {
|
||||
#if 0
|
||||
end = tlb->EPN + tlb->size;
|
||||
for (page = tlb->EPN; page < end; page += TARGET_PAGE_SIZE)
|
||||
tlb_flush_page(env, page);
|
||||
#endif
|
||||
tlb->prot &= ~PAGE_VALID;
|
||||
}
|
||||
}
|
||||
tlb_flush(env, 1);
|
||||
}
|
||||
|
||||
void do_4xx_tlbre_lo (void)
|
||||
{
|
||||
ppcemb_tlb_t *tlb;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue