qemu-devel
[Top][All Lists]
Advanced

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

Re[2]: [Qemu-devel] Config file support


From: Paul Sokolovsky
Subject: Re[2]: [Qemu-devel] Config file support
Date: Tue, 24 Oct 2006 03:12:22 +0300

Hello Paul,

Monday, October 23, 2006, 11:29:52 PM, you wrote:

> On Monday 23 October 2006 21:01, Rob Landley wrote:
>> On Sunday 22 October 2006 2:27 pm, Paul Brook wrote:
>> > I've been considering a machine config file for a while, but haven't come
>> > up with a coherent way of representing everything yet.

   I'm glad this discussion was brought up on the list. And I'd like
to also bring back another related issue - what about providing
"plugin" system for device (chip) implementation, in addition to
flexible-format machine config allowing to construct "virtual boards"
out of them?

>>
>> Do you at least have a list of everything that needs to be represented?  (I
>> have a list but am fairly certain it's not complete.)

> Not really. I guess a generic key/value pair is sufficient for most things
> (base address, model number, etc).

> The trickier cases are where devices refer to each other: PCI, usb, IRQ lines,
> DMA channels, etc. ie. anything where the existing _init function returns a
> value.
> I guess you could use the same key/value mechanism, and allow the value to be
> an "object".

  Yes, machine config apparently would be a hierarchical structure,
with cross-references. And well, there's an industrial standard to
represent that - XML.

> The really OTT method is to embed a python interpreter or something and do the
> machine init that way. I'm not seriously suggesting that though.

  Well, I guess, machine configuration really a declarative information,
and XML should be enough. But it would be really nice to have Python
bindings to implement device plugin, especially for "boring" hardware
like, say, battery controllers.

  What about config like:

<qemu>

  <devices>
    <deviceDef type="builtin" name="pxa25x" impl="PXA25X" />
    <deviceDef type="builtin" name="ram" impl="RAM" />
    <deviceDef type="plugin"  name="w1ctrlr" impl="w1controller.so" />
    <deviceDef type="python"  name="ds2762" impl="ds2762.py" />
  </devices>

  <boards>
    <board name="pda">
      <device name="pxa25x">
        <param name="cpuid" value="0xaaaaaaaa" />
      </device>
      <device name="ram" addr="0xa0000000" size="32M" />
      <device id="w1" name="w1ctrlr" addr="0x10000000" size="16" irq="67" />
      <device name="ds2762" parent="w1">
        <param name="w1addr" value="2" />
      </device>
    </board>
  </boards>

</qemu>


> Paul


-- 
Best regards,
 Paul                            mailto:address@hidden





reply via email to

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