• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Commit MetaInfo

Revision328c95fc7d005380e970383a79e30bb4d4acddd2 (tree)
Time2022-01-18 20:56:30
AuthorCédric Le Goater <clg@kaod...>
CommiterCédric Le Goater

Log Message

target/ppc: Finish removal of 401/403 CPUs

Commit c8f49e6b938e ("target/ppc: remove 401/403 CPUs") left a few
things behind.

Reviewed-by: Fabiano Rosas <farosas@linux.ibm.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Message-Id: <20220117091541.1615807-1-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20220118104150.1899661-3-clg@kaod.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>

Change Summary

Incremental Difference

--- a/target/ppc/cpu-models.c
+++ b/target/ppc/cpu-models.c
@@ -750,7 +750,6 @@
750750 /* PowerPC CPU aliases */
751751
752752 PowerPCCPUAlias ppc_cpu_aliases[] = {
753- { "403", "403gc" },
754753 { "405", "405d4" },
755754 { "405cr", "405crc" },
756755 { "405gp", "405gpd" },
--- a/target/ppc/cpu.h
+++ b/target/ppc/cpu.h
@@ -1133,7 +1133,6 @@ struct CPUPPCState {
11331133 int nb_pids; /* Number of available PID registers */
11341134 int tlb_type; /* Type of TLB we're dealing with */
11351135 ppc_tlb_t tlb; /* TLB is optional. Allocate them only if needed */
1136- target_ulong pb[4]; /* 403 dedicated access protection registers */
11371136 bool tlb_dirty; /* Set to non-zero when modifying TLB */
11381137 bool kvm_sw_tlb; /* non-zero if KVM SW TLB API is active */
11391138 uint32_t tlb_need_flush; /* Delayed flush needed */
--- a/target/ppc/helper.h
+++ b/target/ppc/helper.h
@@ -703,7 +703,6 @@ DEF_HELPER_FLAGS_2(store_hdecr, TCG_CALL_NO_RWG, void, env, tl)
703703 DEF_HELPER_FLAGS_2(store_vtb, TCG_CALL_NO_RWG, void, env, tl)
704704 DEF_HELPER_FLAGS_2(store_tbu40, TCG_CALL_NO_RWG, void, env, tl)
705705 DEF_HELPER_2(store_hid0_601, void, env, tl)
706-DEF_HELPER_3(store_403_pbr, void, env, i32, tl)
707706 DEF_HELPER_FLAGS_1(load_40x_pit, TCG_CALL_NO_RWG, tl, env)
708707 DEF_HELPER_FLAGS_2(store_40x_pit, TCG_CALL_NO_RWG, void, env, tl)
709708 DEF_HELPER_FLAGS_2(store_40x_tcr, TCG_CALL_NO_RWG, void, env, tl)
--- a/target/ppc/machine.c
+++ b/target/ppc/machine.c
@@ -598,25 +598,6 @@ static bool tlbemb_needed(void *opaque)
598598 return env->nb_tlb && (env->tlb_type == TLB_EMB);
599599 }
600600
601-static bool pbr403_needed(void *opaque)
602-{
603- PowerPCCPU *cpu = opaque;
604- uint32_t pvr = cpu->env.spr[SPR_PVR];
605-
606- return (pvr & 0xffff0000) == 0x00200000;
607-}
608-
609-static const VMStateDescription vmstate_pbr403 = {
610- .name = "cpu/pbr403",
611- .version_id = 1,
612- .minimum_version_id = 1,
613- .needed = pbr403_needed,
614- .fields = (VMStateField[]) {
615- VMSTATE_UINTTL_ARRAY(env.pb, PowerPCCPU, 4),
616- VMSTATE_END_OF_LIST()
617- },
618-};
619-
620601 static const VMStateDescription vmstate_tlbemb = {
621602 .name = "cpu/tlb6xx",
622603 .version_id = 1,
@@ -628,13 +609,8 @@ static const VMStateDescription vmstate_tlbemb = {
628609 env.nb_tlb,
629610 vmstate_tlbemb_entry,
630611 ppcemb_tlb_t),
631- /* 403 protection registers */
632612 VMSTATE_END_OF_LIST()
633613 },
634- .subsections = (const VMStateDescription*[]) {
635- &vmstate_pbr403,
636- NULL
637- }
638614 };
639615
640616 static const VMStateDescription vmstate_tlbmas_entry = {
--- a/target/ppc/misc_helper.c
+++ b/target/ppc/misc_helper.c
@@ -226,15 +226,6 @@ void helper_store_hid0_601(CPUPPCState *env, target_ulong val)
226226 }
227227 }
228228
229-void helper_store_403_pbr(CPUPPCState *env, uint32_t num, target_ulong value)
230-{
231- if (likely(env->pb[num] != value)) {
232- env->pb[num] = value;
233- /* Should be optimized */
234- tlb_flush(env_cpu(env));
235- }
236-}
237-
238229 void helper_store_40x_dbcr0(CPUPPCState *env, target_ulong val)
239230 {
240231 /* Bits 26 & 27 affect single-stepping. */
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -911,22 +911,8 @@ void spr_write_booke_tsr(DisasContext *ctx, int sprn, int gprn)
911911 }
912912 #endif
913913
914-/* PowerPC 403 specific registers */
915-/* PBL1 / PBU1 / PBL2 / PBU2 */
914+/* PIR */
916915 #if !defined(CONFIG_USER_ONLY)
917-void spr_read_403_pbr(DisasContext *ctx, int gprn, int sprn)
918-{
919- tcg_gen_ld_tl(cpu_gpr[gprn], cpu_env,
920- offsetof(CPUPPCState, pb[sprn - SPR_403_PBL1]));
921-}
922-
923-void spr_write_403_pbr(DisasContext *ctx, int sprn, int gprn)
924-{
925- TCGv_i32 t0 = tcg_const_i32(sprn - SPR_403_PBL1);
926- gen_helper_store_403_pbr(cpu_env, t0, cpu_gpr[gprn]);
927- tcg_temp_free_i32(t0);
928-}
929-
930916 void spr_write_pir(DisasContext *ctx, int sprn, int gprn)
931917 {
932918 TCGv t0 = tcg_temp_new();