target/arm: Drop ARM_FEATURE_XSCALE handling
We have now removed all the CPU types which had the Intel XScale extensions indicated via ARM_FEATURE_XSCALE, so this feature bit is never set. Remove all the code that can only be reached when using this flag. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-id: 20250828140422.3271703-5-peter.maydell@linaro.org
This commit is contained in:
parent
144aac11d6
commit
4f0fa4bfd9
5 changed files with 3 additions and 80 deletions
|
|
@ -349,11 +349,6 @@ static void arm_cpu_reset_hold(Object *obj, ResetType type)
|
|||
env->uncached_cpsr = ARM_CPU_MODE_USR;
|
||||
/* For user mode we must enable access to coprocessors */
|
||||
env->vfp.xregs[ARM_VFP_FPEXC] = 1 << 30;
|
||||
if (arm_feature(env, ARM_FEATURE_IWMMXT)) {
|
||||
env->cp15.c15_cpar = 3;
|
||||
} else if (arm_feature(env, ARM_FEATURE_XSCALE)) {
|
||||
env->cp15.c15_cpar = 1;
|
||||
}
|
||||
#else
|
||||
|
||||
/*
|
||||
|
|
@ -2259,14 +2254,6 @@ static void arm_cpu_realizefn(DeviceState *dev, Error **errp)
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* We rely on no XScale CPU having VFP so we can use the same bits in the
|
||||
* TB flags field for VECSTRIDE and XSCALE_CPAR.
|
||||
*/
|
||||
assert(arm_feature(env, ARM_FEATURE_AARCH64) ||
|
||||
!cpu_isar_feature(aa32_vfp_simd, cpu) ||
|
||||
!arm_feature(env, ARM_FEATURE_XSCALE));
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
{
|
||||
int pagebits;
|
||||
|
|
|
|||
|
|
@ -341,7 +341,6 @@ typedef struct CPUArchState {
|
|||
uint64_t vsctlr; /* Virtualization System control register. */
|
||||
uint64_t cpacr_el1; /* Architectural feature access control register */
|
||||
uint64_t cptr_el[4]; /* ARMv8 feature trap registers */
|
||||
uint32_t c1_xscaleauxcr; /* XScale auxiliary control register. */
|
||||
uint64_t sder; /* Secure debug enable register. */
|
||||
uint32_t nsacr; /* Non-secure access control register. */
|
||||
union { /* MMU translation table base 0. */
|
||||
|
|
@ -513,7 +512,6 @@ typedef struct CPUArchState {
|
|||
uint64_t cntvoff_el2; /* Counter Virtual Offset register */
|
||||
uint64_t cntpoff_el2; /* Counter Physical Offset register */
|
||||
ARMGenericTimer c14_timer[NUM_GTIMERS];
|
||||
uint32_t c15_cpar; /* XScale Coprocessor Access Register */
|
||||
uint32_t c15_ticonfig; /* TI925T configuration byte. */
|
||||
uint32_t c15_i_max; /* Maximum D-cache dirty line index. */
|
||||
uint32_t c15_i_min; /* Minimum D-cache dirty line index. */
|
||||
|
|
@ -2444,7 +2442,6 @@ QEMU_BUILD_BUG_ON(ARRAY_SIZE(((ARMCPU *)0)->ccsidr) <= R_V7M_CSSELR_INDEX_MASK);
|
|||
*/
|
||||
enum arm_features {
|
||||
ARM_FEATURE_AUXCR, /* ARM1026 Auxiliary control register. */
|
||||
ARM_FEATURE_XSCALE, /* Intel XScale extensions. */
|
||||
ARM_FEATURE_IWMMXT, /* Intel iwMMXt extension. */
|
||||
ARM_FEATURE_V6,
|
||||
ARM_FEATURE_V6K,
|
||||
|
|
|
|||
|
|
@ -2923,39 +2923,6 @@ static const ARMCPRegInfo omap_cp_reginfo[] = {
|
|||
.type = ARM_CP_CONST | ARM_CP_OVERRIDE, .resetvalue = 0 },
|
||||
};
|
||||
|
||||
static void xscale_cpar_write(CPUARMState *env, const ARMCPRegInfo *ri,
|
||||
uint64_t value)
|
||||
{
|
||||
env->cp15.c15_cpar = value & 0x3fff;
|
||||
}
|
||||
|
||||
static const ARMCPRegInfo xscale_cp_reginfo[] = {
|
||||
{ .name = "XSCALE_CPAR",
|
||||
.cp = 15, .crn = 15, .crm = 1, .opc1 = 0, .opc2 = 0, .access = PL1_RW,
|
||||
.fieldoffset = offsetof(CPUARMState, cp15.c15_cpar), .resetvalue = 0,
|
||||
.writefn = xscale_cpar_write, },
|
||||
{ .name = "XSCALE_AUXCR",
|
||||
.cp = 15, .crn = 1, .crm = 0, .opc1 = 0, .opc2 = 1, .access = PL1_RW,
|
||||
.fieldoffset = offsetof(CPUARMState, cp15.c1_xscaleauxcr),
|
||||
.resetvalue = 0, },
|
||||
/*
|
||||
* XScale specific cache-lockdown: since we have no cache we NOP these
|
||||
* and hope the guest does not really rely on cache behaviour.
|
||||
*/
|
||||
{ .name = "XSCALE_LOCK_ICACHE_LINE",
|
||||
.cp = 15, .opc1 = 0, .crn = 9, .crm = 1, .opc2 = 0,
|
||||
.access = PL1_W, .type = ARM_CP_NOP },
|
||||
{ .name = "XSCALE_UNLOCK_ICACHE",
|
||||
.cp = 15, .opc1 = 0, .crn = 9, .crm = 1, .opc2 = 1,
|
||||
.access = PL1_W, .type = ARM_CP_NOP },
|
||||
{ .name = "XSCALE_DCACHE_LOCK",
|
||||
.cp = 15, .opc1 = 0, .crn = 9, .crm = 2, .opc2 = 0,
|
||||
.access = PL1_RW, .type = ARM_CP_NOP },
|
||||
{ .name = "XSCALE_UNLOCK_DCACHE",
|
||||
.cp = 15, .opc1 = 0, .crn = 9, .crm = 2, .opc2 = 1,
|
||||
.access = PL1_W, .type = ARM_CP_NOP },
|
||||
};
|
||||
|
||||
static const ARMCPRegInfo dummy_c15_cp_reginfo[] = {
|
||||
/*
|
||||
* RAZ/WI the whole crn=15 space, when we don't have a more specific
|
||||
|
|
@ -3346,16 +3313,6 @@ static void sctlr_write(CPUARMState *env, const ARMCPRegInfo *ri,
|
|||
|
||||
/* This may enable/disable the MMU, so do a TLB flush. */
|
||||
tlb_flush(CPU(cpu));
|
||||
|
||||
if (tcg_enabled() && ri->type & ARM_CP_SUPPRESS_TB_END) {
|
||||
/*
|
||||
* Normally we would always end the TB on an SCTLR write; see the
|
||||
* comment in ARMCPRegInfo sctlr initialization below for why Xscale
|
||||
* is special. Setting ARM_CP_SUPPRESS_TB_END also stops the rebuild
|
||||
* of hflags from the translator, so do it here.
|
||||
*/
|
||||
arm_rebuild_hflags(env);
|
||||
}
|
||||
}
|
||||
|
||||
static void mdcr_el3_write(CPUARMState *env, const ARMCPRegInfo *ri,
|
||||
|
|
@ -6894,9 +6851,6 @@ void register_cp_regs_for_features(ARMCPU *cpu)
|
|||
if (arm_feature(env, ARM_FEATURE_STRONGARM)) {
|
||||
define_arm_cp_regs(cpu, strongarm_cp_reginfo);
|
||||
}
|
||||
if (arm_feature(env, ARM_FEATURE_XSCALE)) {
|
||||
define_arm_cp_regs(cpu, xscale_cp_reginfo);
|
||||
}
|
||||
if (arm_feature(env, ARM_FEATURE_DUMMY_C15_REGS)) {
|
||||
define_arm_cp_regs(cpu, dummy_c15_cp_reginfo);
|
||||
}
|
||||
|
|
@ -7245,14 +7199,6 @@ void register_cp_regs_for_features(ARMCPU *cpu)
|
|||
.writefn = sctlr_write, .resetvalue = cpu->reset_sctlr,
|
||||
.raw_writefn = raw_write,
|
||||
};
|
||||
if (arm_feature(env, ARM_FEATURE_XSCALE)) {
|
||||
/*
|
||||
* Normally we would always end the TB on an SCTLR write, but Linux
|
||||
* arch/arm/mach-pxa/sleep.S expects two instructions following
|
||||
* an MMU enable to execute from cache. Imitate this behaviour.
|
||||
*/
|
||||
sctlr.type |= ARM_CP_SUPPRESS_TB_END;
|
||||
}
|
||||
define_one_arm_cp_reg(cpu, &sctlr);
|
||||
|
||||
if (arm_feature(env, ARM_FEATURE_PMSA) &&
|
||||
|
|
|
|||
|
|
@ -1074,11 +1074,10 @@ static bool get_phys_addr_v5(CPUARMState *env, S1Translate *ptw,
|
|||
ap = (desc >> (4 + ((address >> 9) & 6))) & 3;
|
||||
result->f.lg_page_size = 12;
|
||||
break;
|
||||
case 3: /* 1k page, or ARMv6/XScale "extended small (4k) page" */
|
||||
case 3: /* 1k page, or ARMv6 "extended small (4k) page" */
|
||||
if (type == 1) {
|
||||
/* ARMv6/XScale extended small page format */
|
||||
if (arm_feature(env, ARM_FEATURE_XSCALE)
|
||||
|| arm_feature(env, ARM_FEATURE_V6)) {
|
||||
/* ARMv6 extended small page format */
|
||||
if (arm_feature(env, ARM_FEATURE_V6)) {
|
||||
phys_addr = (desc & 0xfffff000) | (address & 0xfff);
|
||||
result->f.lg_page_size = 12;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -768,12 +768,6 @@ const void *HELPER(access_check_cp_reg)(CPUARMState *env, uint32_t key,
|
|||
|
||||
assert(ri != NULL);
|
||||
|
||||
if (arm_feature(env, ARM_FEATURE_XSCALE) && ri->cp < 14
|
||||
&& extract32(env->cp15.c15_cpar, ri->cp, 1) == 0) {
|
||||
res = CP_ACCESS_UNDEFINED;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (ri->accessfn) {
|
||||
res = ri->accessfn(env, ri, isread);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue