Revision | 328c95fc7d005380e970383a79e30bb4d4acddd2 (tree) |
---|---|
Time | 2022-01-18 20:56:30 |
Author | Cédric Le Goater <clg@kaod...> |
Commiter | Cédric Le Goater |
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>
@@ -750,7 +750,6 @@ | ||
750 | 750 | /* PowerPC CPU aliases */ |
751 | 751 | |
752 | 752 | PowerPCCPUAlias ppc_cpu_aliases[] = { |
753 | - { "403", "403gc" }, | |
754 | 753 | { "405", "405d4" }, |
755 | 754 | { "405cr", "405crc" }, |
756 | 755 | { "405gp", "405gpd" }, |
@@ -1133,7 +1133,6 @@ struct CPUPPCState { | ||
1133 | 1133 | int nb_pids; /* Number of available PID registers */ |
1134 | 1134 | int tlb_type; /* Type of TLB we're dealing with */ |
1135 | 1135 | ppc_tlb_t tlb; /* TLB is optional. Allocate them only if needed */ |
1136 | - target_ulong pb[4]; /* 403 dedicated access protection registers */ | |
1137 | 1136 | bool tlb_dirty; /* Set to non-zero when modifying TLB */ |
1138 | 1137 | bool kvm_sw_tlb; /* non-zero if KVM SW TLB API is active */ |
1139 | 1138 | uint32_t tlb_need_flush; /* Delayed flush needed */ |
@@ -703,7 +703,6 @@ DEF_HELPER_FLAGS_2(store_hdecr, TCG_CALL_NO_RWG, void, env, tl) | ||
703 | 703 | DEF_HELPER_FLAGS_2(store_vtb, TCG_CALL_NO_RWG, void, env, tl) |
704 | 704 | DEF_HELPER_FLAGS_2(store_tbu40, TCG_CALL_NO_RWG, void, env, tl) |
705 | 705 | DEF_HELPER_2(store_hid0_601, void, env, tl) |
706 | -DEF_HELPER_3(store_403_pbr, void, env, i32, tl) | |
707 | 706 | DEF_HELPER_FLAGS_1(load_40x_pit, TCG_CALL_NO_RWG, tl, env) |
708 | 707 | DEF_HELPER_FLAGS_2(store_40x_pit, TCG_CALL_NO_RWG, void, env, tl) |
709 | 708 | DEF_HELPER_FLAGS_2(store_40x_tcr, TCG_CALL_NO_RWG, void, env, tl) |
@@ -598,25 +598,6 @@ static bool tlbemb_needed(void *opaque) | ||
598 | 598 | return env->nb_tlb && (env->tlb_type == TLB_EMB); |
599 | 599 | } |
600 | 600 | |
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 | - | |
620 | 601 | static const VMStateDescription vmstate_tlbemb = { |
621 | 602 | .name = "cpu/tlb6xx", |
622 | 603 | .version_id = 1, |
@@ -628,13 +609,8 @@ static const VMStateDescription vmstate_tlbemb = { | ||
628 | 609 | env.nb_tlb, |
629 | 610 | vmstate_tlbemb_entry, |
630 | 611 | ppcemb_tlb_t), |
631 | - /* 403 protection registers */ | |
632 | 612 | VMSTATE_END_OF_LIST() |
633 | 613 | }, |
634 | - .subsections = (const VMStateDescription*[]) { | |
635 | - &vmstate_pbr403, | |
636 | - NULL | |
637 | - } | |
638 | 614 | }; |
639 | 615 | |
640 | 616 | static const VMStateDescription vmstate_tlbmas_entry = { |
@@ -226,15 +226,6 @@ void helper_store_hid0_601(CPUPPCState *env, target_ulong val) | ||
226 | 226 | } |
227 | 227 | } |
228 | 228 | |
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 | - | |
238 | 229 | void helper_store_40x_dbcr0(CPUPPCState *env, target_ulong val) |
239 | 230 | { |
240 | 231 | /* Bits 26 & 27 affect single-stepping. */ |
@@ -911,22 +911,8 @@ void spr_write_booke_tsr(DisasContext *ctx, int sprn, int gprn) | ||
911 | 911 | } |
912 | 912 | #endif |
913 | 913 | |
914 | -/* PowerPC 403 specific registers */ | |
915 | -/* PBL1 / PBU1 / PBL2 / PBU2 */ | |
914 | +/* PIR */ | |
916 | 915 | #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 | - | |
930 | 916 | void spr_write_pir(DisasContext *ctx, int sprn, int gprn) |
931 | 917 | { |
932 | 918 | TCGv t0 = tcg_temp_new(); |