On 10/3/26 23:31, Yodel Eldar wrote:
Define the Typhoon class and instance initializers.
Add "cpu[*]" link properties in the instance_init of Typhoon.
Setting these cpu link properties will occur in a later commit.
Note: This is one step towards splitting typhoon_init() into the
instance_init and realize hooks. typhoon_init() currently takes
a fixed cpus array as a parameter; that array will be removed soon.
Signed-off-by: Yodel Eldar <[email protected]>
---
hw/alpha/typhoon.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
+static void typhoon_pcihost_init(Object *obj)
+{
+ TyphoonState *s = TYPHOON_PCI_HOST_BRIDGE(obj);
+
+ int i;
+ for (i = 0; i < 4; ++i) {
+ g_autofree char *name = g_strdup_printf("cpu[%d]", i);
+ object_property_add_link(obj, name, TYPE_ALPHA_CPU,
+ (Object **)&s->cchip.cpu[i],
+ qdev_prop_allow_set_link_before_realize, 0);
+ }
+}
Hmm this machine is modelled using quite legacy style. The Typhoon
PCIHost object shouldn't have direct access to CPUs but only expose
IRQ lines, then the board layer wire these lines to CPUs.