mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-24 11:55:41 +00:00
arm: Implement uniprocessor with MP config
Add a boolean for indicating uniprocessors with MP extensions. This drives the U bit in MPIDR. Prepares support for Cortex-R5. Backports commit a8e81b319d1ae1224cc7059877dcdf04a5aad59d from qemu
This commit is contained in:
parent
e8499a8f9b
commit
6f843a5484
|
@ -115,6 +115,9 @@ typedef struct ARMCPU {
|
||||||
/* KVM init features for this CPU */
|
/* KVM init features for this CPU */
|
||||||
uint32_t kvm_init_features[7];
|
uint32_t kvm_init_features[7];
|
||||||
|
|
||||||
|
/* Uniprocessor system with MP extensions */
|
||||||
|
bool mp_is_up;
|
||||||
|
|
||||||
/* The instance init functions for implementation-specific subclasses
|
/* The instance init functions for implementation-specific subclasses
|
||||||
* set these fields to specify the implementation-dependent values of
|
* set these fields to specify the implementation-dependent values of
|
||||||
* various constant registers and reset values of non-constant
|
* various constant registers and reset values of non-constant
|
||||||
|
|
|
@ -1795,9 +1795,11 @@ static uint64_t mpidr_read(CPUARMState *env, const ARMCPRegInfo *ri)
|
||||||
mpidr |= (1U << 31);
|
mpidr |= (1U << 31);
|
||||||
/* Cores which are uniprocessor (non-coherent)
|
/* Cores which are uniprocessor (non-coherent)
|
||||||
* but still implement the MP extensions set
|
* but still implement the MP extensions set
|
||||||
* bit 30. (For instance, A9UP.) However we do
|
* bit 30. (For instance, Cortex-R5).
|
||||||
* not currently model any of those cores.
|
|
||||||
*/
|
*/
|
||||||
|
if (cpu->mp_is_up) {
|
||||||
|
mpidr |= (1u << 30);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return mpidr;
|
return mpidr;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue