[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CPU reset vs DeviceState reset
From: |
Peter Maydell |
Subject: |
CPU reset vs DeviceState reset |
Date: |
Mon, 2 Mar 2020 17:20:33 +0000 |
Hi; I've just noticed that although TYPE_CPU is a subclass of
TYPE_DEVICE, it seems to implement its own reset method
('reset' field in CPUClass struct) rather than just using the
DeviceClass's 'reset'.
Is there a reason for doing this, or is it just historical legacy
from TYPE_CPU originally not being a subclass of TYPE_DEVICE?
I ask because I'd like to be able to use 3-phase reset in the Arm
CPU, and I'm wondering whether it would be better to make TYPE_CPU
just use Device's reset system, or to treat TYPE_CPU as its own
base class and implement Resettable there. The former seems more
straightforward, unless I'm missing something that means we
really do need to have the reset method be different.
thanks
-- PMM
- CPU reset vs DeviceState reset,
Peter Maydell <=