mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-25 05:08:51 +00:00
target-arm: Add CPU property to disable AArch64
Adds registration and get/set functions for enabling/disabling the AArch64 execution state on AArch64 CPUs. By default AArch64 execution state is enabled on AArch64 CPUs, setting the property to off, will disable the execution state. The below QEMU invocation would have AArch64 execution state disabled. $ ./qemu-system-aarch64 -machine virt -cpu cortex-a57,aarch64=off Also adds stripping of features from CPU model string in acquiring the ARM CPU by name. Backports part of commit fb8d6c24b095c426151b9bba8c8b0e58b03d6503 from qemu
This commit is contained in:
parent
997ca2f6ea
commit
4df1ce63b8
2 changed files with 13 additions and 1 deletions
|
@ -272,7 +272,7 @@ static bool arm_v7m_cpu_exec_interrupt(CPUState *cs, int interrupt_request)
|
|||
}
|
||||
#endif
|
||||
|
||||
static bool arm_cpu_is_big_endian(CPUState *cs)
|
||||
static QEMU_UNUSED_FUNC bool arm_cpu_is_big_endian(CPUState *cs)
|
||||
{
|
||||
ARMCPU *cpu = ARM_CPU(NULL, cs);
|
||||
CPUARMState *env = &cpu->env;
|
||||
|
|
|
@ -28,6 +28,11 @@ static inline void set_feature(CPUARMState *env, int feature)
|
|||
env->features |= 1ULL << feature;
|
||||
}
|
||||
|
||||
static inline QEMU_UNUSED_FUNC void unset_feature(CPUARMState *env, int feature)
|
||||
{
|
||||
env->features &= ~(1ULL << feature);
|
||||
}
|
||||
|
||||
#ifndef CONFIG_USER_ONLY
|
||||
static uint64_t a57_l2ctlr_read(CPUARMState *env, const ARMCPRegInfo *ri)
|
||||
{
|
||||
|
@ -154,6 +159,13 @@ static const ARMCPUInfo aarch64_cpus[] = {
|
|||
{ NULL }
|
||||
};
|
||||
|
||||
static QEMU_UNUSED_FUNC bool aarch64_cpu_get_aarch64(Object *obj, Error **errp)
|
||||
{
|
||||
ARMCPU *cpu = ARM_CPU(NULL, obj);
|
||||
|
||||
return arm_feature(&cpu->env, ARM_FEATURE_AARCH64);
|
||||
}
|
||||
|
||||
static void aarch64_cpu_initfn(struct uc_struct *uc, Object *obj, void *opaque)
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue