qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] reset strategy?


From: Liviu Ionescu
Subject: Re: [Qemu-devel] reset strategy?
Date: Mon, 29 Jun 2015 10:26:36 +0300

> On 29 Jun 2015, at 02:15, Peter Crosthwaite <address@hidden> wrote:
> 
>>    cpu_reset(CPU(cm_state->cpu));
> 
> This should be managed by the bootloader.

you mean via 'boot.c: arm_load_kernel()'?

I'm not using it, since on Cortex-M there is no kernel to load.

>>    device_reset(cm_state->nvic);
>> 
>>    if (cm_state->itm) {
>>        device_reset(cm_state->itm);
>>    }
> 
> Are are these two devices really not connected to any bus?

in hardware they obviously are somehow connected to the core.

in my emulation, these devices are created with object_new() and not connected 
to the sysbus or to any other bus.

> Yes, but you shouldn't have to register resets from machine level
> code. It should just happen via:
> 
> vl.c:4412:    qemu_register_reset(qbus_reset_all_fn, sysbus_get_default());

if I got it right, this is a qdev call that resets all devices on the sysbus.

I'm trying to move away from qdev. 

the question stands: in a post-qdev world, for MCUs, which have the peripherals 
integrated with the core (what you call SoC), is it mandatory to use buses or 
is it ok for each device to reset its children?


regards,

Liviu




reply via email to

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