[Qemu-devel] [RFC] Machine description as data
Paul Brook
paul at codesourcery.com
Sat Feb 14 00:33:46 EST 2009
> Hypothetical example: say the kernel needs to know exactly how the
> interrupts are wired. But QEMU can wire the interrupts just one way,
> the way it has always wired them. What's the point in putting that way
> into the machine configuration? Verifying that whatever is there
> matches reality is no less work than generating the information from
> scratch, isn't it?
Much of the reason for having a machine config is that it allows control over
things like interrupt routing. Particularly for embedded machines, it's
common to have a variety of different machines all using the same components,
but varying in how those components are connected. For example the ARM
Integrator, Versatile, Realview and Luminary Stellaris boards are all based
on approximately the same basic set of devices (the ARM PrimeCell SoC
peripherals), just with different memory maps and interrupt topologies. I
suspect the same is true for many of the PPC, SH4 and ColdFire boards, and
probably the different SPARC sun4m/sun4u variants.
Most of the intrastructure to do modular machine construction is already there
in qemu, it's just currently driven by hardcoded C QEMUMachineInitFunc rather
than a runtime config.
I guess that's where I see the distinction. Roughly speaking the "machine
config" replaces pc.c:pc_init1, and the "user config" replaces a lot of the
goo in vl.c:main, drive_init, etc.
Paul
More information about the devicetree-discuss
mailing list