mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
hw/mips/itu: Pass SAAR using QOM link property
QOM objects shouldn't access each other internals fields except using the QOM API. mips_cps_realize() instantiates a TYPE_MIPS_ITU object, and directly sets the 'saar' pointer: if (saar_present) { s->itu.saar = &env->CP0_SAAR; } In order to avoid that, pass the MIPS_CPU object via a QOM link property, and set the 'saar' pointer in mips_itu_realize(). Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Tested-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Reviewed-by: Jiaxun Yang <jiaxun.yang@flygoat.com> Message-Id: <20230203113650.78146-10-philmd@linaro.org>
This commit is contained in:
parent
10997f2d1d
commit
4c921e3fb2
3 changed files with 26 additions and 28 deletions
|
@ -72,9 +72,8 @@ struct MIPSITUState {
|
|||
uint64_t icr0;
|
||||
|
||||
/* SAAR */
|
||||
bool saar_present;
|
||||
void *saar;
|
||||
|
||||
uint64_t *saar;
|
||||
MIPSCPU *cpu0;
|
||||
};
|
||||
|
||||
/* Get ITC Configuration Tag memory region. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue