qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v5 01/31] target/arm: Implement arm_v7m_cpu_has_work()


From: Peter Maydell
Subject: Re: [PATCH v5 01/31] target/arm: Implement arm_v7m_cpu_has_work()
Date: Thu, 23 Sep 2021 19:01:06 +0100

On Thu, 23 Sept 2021 at 18:17, Philippe Mathieu-Daudé <f4bug@amsat.org> wrote:
> Since we provide info->class_init as arm_v7m_class_init(), only
> tcg_ops and gdb_core_xml_file from CPUClass are set:
>
> static void arm_v7m_class_init(ObjectClass *oc, void *data)
> {
>      ARMCPUClass *acc = ARM_CPU_CLASS(oc);
>      CPUClass *cc = CPU_CLASS(oc);
>
>      acc->info = data;
> #ifdef CONFIG_TCG
>      cc->tcg_ops = &arm_v7m_tcg_ops;
> #endif /* CONFIG_TCG */
>
>      cc->gdb_core_xml_file = "arm-m-profile.xml";
> }

This class's parent type is TYPE_ARM_CPU; so TYPE_ARM_CPU's class_init
runs first and sets up most of the class fields. This function only
needs to set the ones which must be different on a M-profile core.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]