mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 09:43:56 -06:00
target/mips: Update ITU to utilize SAARI and SAAR CP0 registers
Update ITU to utilize SAARI and SAAR CP0 registers. Reviewed-by: Stefan Markovic <smarkovic@wavecomp.com> Signed-off-by: Yongbok Kim <yongbok.kim@mips.com> Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
This commit is contained in:
parent
e5345d9675
commit
043715d1e0
5 changed files with 54 additions and 6 deletions
|
@ -69,6 +69,7 @@ static void mips_cps_realize(DeviceState *dev, Error **errp)
|
|||
Error *err = NULL;
|
||||
target_ulong gcr_base;
|
||||
bool itu_present = false;
|
||||
bool saar_present = false;
|
||||
|
||||
for (i = 0; i < s->num_vp; i++) {
|
||||
cpu = MIPS_CPU(cpu_create(s->cpu_type));
|
||||
|
@ -82,12 +83,14 @@ static void mips_cps_realize(DeviceState *dev, Error **errp)
|
|||
itu_present = true;
|
||||
/* Attach ITC Tag to the VP */
|
||||
env->itc_tag = mips_itu_get_tag_region(&s->itu);
|
||||
env->itu = &s->itu;
|
||||
}
|
||||
qemu_register_reset(main_cpu_reset, cpu);
|
||||
}
|
||||
|
||||
cpu = MIPS_CPU(first_cpu);
|
||||
env = &cpu->env;
|
||||
saar_present = (bool)env->saarp;
|
||||
|
||||
/* Inter-Thread Communication Unit */
|
||||
if (itu_present) {
|
||||
|
@ -96,6 +99,11 @@ static void mips_cps_realize(DeviceState *dev, Error **errp)
|
|||
|
||||
object_property_set_int(OBJECT(&s->itu), 16, "num-fifo", &err);
|
||||
object_property_set_int(OBJECT(&s->itu), 16, "num-semaphores", &err);
|
||||
object_property_set_bool(OBJECT(&s->itu), saar_present, "saar-present",
|
||||
&err);
|
||||
if (saar_present) {
|
||||
qdev_prop_set_ptr(DEVICE(&s->itu), "saar", (void *)&env->CP0_SAAR);
|
||||
}
|
||||
object_property_set_bool(OBJECT(&s->itu), true, "realized", &err);
|
||||
if (err != NULL) {
|
||||
error_propagate(errp, err);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue