qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/4] Machine config files


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH 0/4] Machine config files
Date: Fri, 12 Jun 2009 15:37:50 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.3 (gnu/linux)

Paul Brook <address@hidden> writes:

> The following series implements machine config files, and adds converts
> some of the existing hardcoded machines.
>
> The config files themselves are based on the ppc-linux Flattened Device Trees.
> In generaly I've tried to structure things so that the same config file can
> be used for both qemu and linux.

This means the configuration file is binary.

It can be compiled from source with dtc, which doesn't seem to be
included in the patch series.  The language accepted by dtc is pretty
low-level: it talks NUL-terminates strings, byte strings and arrays of
"cells" (32 bit integers).

This leaves compiling from configuration concepts like "physical address
range", "interrupt" and so forth to FDT concepts like "array of cell" to
the user.

For instance, to specify an physical address range of 0x7f00000 bytes
starting at 0x100000, you say

    #address-cells = <1>;
    #size-cells  = <1>;
    reg = <0x100000 0x7f00000>

except when you're dealing with 64 bit physical address space, where it
becomes

    #address-cells = <2>;
    #size-cells  = <2>;
    reg = <0 0x100000 0 0x7f00000>

Not sure I got the endianess right.

To specify 8 bytes of ISA I/O space starting at 0x3f8, you say

    #address-cells = <2>;
    #size-cells = <1>;
    reg = <1 0x000002f8 0x00000008>;

The "1" in there means I/O space.  It's defined in the IEEE 1275 binding
document for ISA.

To specify ISA interrupt 4, you do:

    #interrupt-cells = <2>;
    interrupts = <4 3>;

The "3" encodes the interrupt type (level vs. edge; can't be bothered to
look up the number right now).

The various PCI addresses are "fun", too, and covered by their own
binding document.

Is that really what we want for a configuration file?

[...]




reply via email to

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