Re: Trying to understand QOM object creation and property linking

2022-01-06 Thread Peter Maydell
On Thu, 6 Jan 2022 at 15:45, Alex Bennée wrote: > Peter Maydell writes: > > Yeah, that trick only works for the real CPU object, not for > > passing to SoC or SoC-like objects. > > Hmm I wonder if I should be instantiating the underlying CPU object? > AIUI the cores are cortex-m0+ so I assume tha

Re: Trying to understand QOM object creation and property linking

2022-01-06 Thread Alex Bennée
Peter Maydell writes: > On Thu, 6 Jan 2022 at 14:26, Alex Bennée wrote: >> >> >> Peter Maydell writes: >> >> > On Wed, 5 Jan 2022 at 21:05, Alex Bennée wrote: >> >> Can't be added as a subregion to the container... >> >> >> >> qemu-system-arm: ../../softmmu/memory.c:2538: >> >> memory_reg

Re: Trying to understand QOM object creation and property linking

2022-01-06 Thread Peter Maydell
On Thu, 6 Jan 2022 at 14:26, Alex Bennée wrote: > > > Peter Maydell writes: > > > On Wed, 5 Jan 2022 at 21:05, Alex Bennée wrote: > >> Can't be added as a subregion to the container... > >> > >> qemu-system-arm: ../../softmmu/memory.c:2538: > >> memory_region_add_subregion_common: Assertion `

Re: Trying to understand QOM object creation and property linking

2022-01-06 Thread Alex Bennée
Peter Maydell writes: > On Wed, 5 Jan 2022 at 21:05, Alex Bennée wrote: >> Can't be added as a subregion to the container... >> >> qemu-system-arm: ../../softmmu/memory.c:2538: >> memory_region_add_subregion_common: Assertion `!subregion->container' failed. > > This assert means you tried t

Re: Trying to understand QOM object creation and property linking

2022-01-06 Thread Peter Maydell
On Wed, 5 Jan 2022 at 21:05, Alex Bennée wrote: > Can't be added as a subregion to the container... > > qemu-system-arm: ../../softmmu/memory.c:2538: > memory_region_add_subregion_common: Assertion `!subregion->container' failed. This assert means you tried to add the same MemoryRegion as a su

Re: Trying to understand QOM object creation and property linking

2022-01-05 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > Hi Alex, > > On 5/1/22 19:03, Alex Bennée wrote: >> Hi, >> I'm having a hell of a time trying to create a new SoC+Board model >> from >> scratch. The problem comes down to trying to expose some properties to >> the underlying CPU from my board model. So I have:

Re: Trying to understand QOM object creation and property linking

2022-01-05 Thread Philippe Mathieu-Daudé
Hi Alex, On 5/1/22 19:03, Alex Bennée wrote: Hi, I'm having a hell of a time trying to create a new SoC+Board model from scratch. The problem comes down to trying to expose some properties to the underlying CPU from my board model. So I have: static const TypeInfo pipico_machine_types[] = {

Trying to understand QOM object creation and property linking

2022-01-05 Thread Alex Bennée
Hi, I'm having a hell of a time trying to create a new SoC+Board model from scratch. The problem comes down to trying to expose some properties to the underlying CPU from my board model. So I have: static const TypeInfo pipico_machine_types[] = { { .name = TYPE_PIPICO_