mirror of
https://github.com/mii443/qemu.git
synced 2025-12-16 17:18:49 +00:00
target/ppc: Remove the software TLB model of 7450 CPUs
(Applies to 7441, 7445, 7450, 7451, 7455, 7457, 7447, 7447a and 7448) The QEMU-side software TLB implementation for the 7450 family of CPUs is being removed due to lack of known users in the real world. The last users in the code were removed by the two previous commits. A brief history: The feature was added in QEMU by commit7dbe11acd8("Handle all MMU models in switches...") with the mention that Linux was not able to handle the TLB miss interrupts and the MMU model would be kept disabled. At some point later, commit8ca3f6c382("Allow selection of all defined PowerPC 74xx (aka G4) CPUs.") enabled the model for the 7450 family without further justification. We have since the year 2011 [1] been unable to run OpenBIOS in the 7450s and have not heard of any other software that is used with those CPUs in QEMU. Attempts were made to find a guest OS that implemented the TLB miss handlers and none were found among Linux 5.15, FreeBSD 13, MacOS9, MacOSX and MorphOS 3.15. All CPUs that registered this feature were moved to an MMU model that replaces the software TLB with a QEMU hardware TLB implementation. They can now run the same software as the 7400 CPUs, including the OSes mentioned above. References: - https://bugs.launchpad.net/qemu/+bug/812398 https://gitlab.com/qemu-project/qemu/-/issues/86 - https://lists.nongnu.org/archive/html/qemu-ppc/2021-11/msg00289.html message id: 20211119134431.406753-1-farosas@linux.ibm.com Signed-off-by: Fabiano Rosas <farosas@linux.ibm.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20211130230123.781844-4-farosas@linux.ibm.com> Signed-off-by: Cédric Le Goater <clg@kaod.org>
This commit is contained in:
committed by
Cédric Le Goater
parent
b137fb72d7
commit
a09410ed1f
@@ -1147,7 +1147,6 @@ void dump_mmu(CPUPPCState *env)
|
||||
mmubooke206_dump_mmu(env);
|
||||
break;
|
||||
case POWERPC_MMU_SOFT_6xx:
|
||||
case POWERPC_MMU_SOFT_74xx:
|
||||
mmu6xx_dump_mmu(env);
|
||||
break;
|
||||
#if defined(TARGET_PPC64)
|
||||
@@ -1181,7 +1180,6 @@ static int check_physical(CPUPPCState *env, mmu_ctx_t *ctx, target_ulong eaddr,
|
||||
ret = 0;
|
||||
switch (env->mmu_model) {
|
||||
case POWERPC_MMU_SOFT_6xx:
|
||||
case POWERPC_MMU_SOFT_74xx:
|
||||
case POWERPC_MMU_SOFT_4xx:
|
||||
case POWERPC_MMU_REAL:
|
||||
case POWERPC_MMU_BOOKE:
|
||||
@@ -1234,7 +1232,6 @@ int get_physical_address_wtlb(CPUPPCState *env, mmu_ctx_t *ctx,
|
||||
|
||||
switch (env->mmu_model) {
|
||||
case POWERPC_MMU_SOFT_6xx:
|
||||
case POWERPC_MMU_SOFT_74xx:
|
||||
if (real_mode) {
|
||||
ret = check_physical(env, ctx, eaddr, access_type);
|
||||
} else {
|
||||
@@ -1383,9 +1380,6 @@ static bool ppc_jumbo_xlate(PowerPCCPU *cpu, vaddr eaddr,
|
||||
env->spr[SPR_IMISS] = eaddr;
|
||||
env->spr[SPR_ICMP] = 0x80000000 | ctx.ptem;
|
||||
goto tlb_miss;
|
||||
case POWERPC_MMU_SOFT_74xx:
|
||||
cs->exception_index = POWERPC_EXCP_IFTLB;
|
||||
goto tlb_miss_74xx;
|
||||
case POWERPC_MMU_SOFT_4xx:
|
||||
case POWERPC_MMU_SOFT_4xx_Z:
|
||||
cs->exception_index = POWERPC_EXCP_ITLB;
|
||||
@@ -1454,19 +1448,6 @@ static bool ppc_jumbo_xlate(PowerPCCPU *cpu, vaddr eaddr,
|
||||
env->spr[SPR_HASH2] = ppc_hash32_hpt_base(cpu) +
|
||||
get_pteg_offset32(cpu, ctx.hash[1]);
|
||||
break;
|
||||
case POWERPC_MMU_SOFT_74xx:
|
||||
if (access_type == MMU_DATA_STORE) {
|
||||
cs->exception_index = POWERPC_EXCP_DSTLB;
|
||||
} else {
|
||||
cs->exception_index = POWERPC_EXCP_DLTLB;
|
||||
}
|
||||
tlb_miss_74xx:
|
||||
/* Implement LRU algorithm */
|
||||
env->error_code = ctx.key << 19;
|
||||
env->spr[SPR_TLBMISS] = (eaddr & ~((target_ulong)0x3)) |
|
||||
((env->last_way + 1) & (env->nb_ways - 1));
|
||||
env->spr[SPR_PTEHI] = 0x80000000 | ctx.ptem;
|
||||
break;
|
||||
case POWERPC_MMU_SOFT_4xx:
|
||||
case POWERPC_MMU_SOFT_4xx_Z:
|
||||
cs->exception_index = POWERPC_EXCP_DTLB;
|
||||
|
||||
Reference in New Issue
Block a user