mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
hw/mips_malta: add CPS to Malta board
If the user specifies smp > 1 and the CPU with CM GCR support, then create Coherent Processing System (which takes care of instantiating CPUs) rather than CPUs directly and connect i8259 and cbus to the pins exposed by CPS. However, there is no GIC yet, thus CPS exposes CPU's IRQ pins so use the same pin numbers as before. Signed-off-by: Leon Alrae <leon.alrae@imgtec.com>
This commit is contained in:
parent
67a5496184
commit
bff384a4fb
3 changed files with 60 additions and 11 deletions
|
@ -760,6 +760,7 @@ MIPSCPU *cpu_mips_init(const char *cpu_model);
|
|||
int cpu_mips_signal_handler(int host_signum, void *pinfo, void *puc);
|
||||
|
||||
#define cpu_init(cpu_model) CPU(cpu_mips_init(cpu_model))
|
||||
bool cpu_supports_cps_smp(const char *cpu_model);
|
||||
|
||||
/* TODO QOM'ify CPU reset and remove */
|
||||
void cpu_state_reset(CPUMIPSState *s);
|
||||
|
|
|
@ -19977,6 +19977,16 @@ MIPSCPU *cpu_mips_init(const char *cpu_model)
|
|||
return cpu;
|
||||
}
|
||||
|
||||
bool cpu_supports_cps_smp(const char *cpu_model)
|
||||
{
|
||||
const mips_def_t *def = cpu_mips_find_by_name(cpu_model);
|
||||
if (!def) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (def->CP0_Config3 & (1 << CP0C3_CMGCR)) != 0;
|
||||
}
|
||||
|
||||
void cpu_state_reset(CPUMIPSState *env)
|
||||
{
|
||||
MIPSCPU *cpu = mips_env_get_cpu(env);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue