Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MF781-0002ob-RF for qemu-devel@nongnu.org; Fri, 12 Jun 2009 09:49:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MF77x-0002nX-LA for qemu-devel@nongnu.org; Fri, 12 Jun 2009 09:49:09 -0400 Received: from [199.232.76.173] (port=35324 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MF77x-0002nQ-Cy for qemu-devel@nongnu.org; Fri, 12 Jun 2009 09:49:05 -0400 Received: from mx2.redhat.com ([66.187.237.31]:46417) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MF6xD-0005K0-SF for qemu-devel@nongnu.org; Fri, 12 Jun 2009 09:38:00 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n5CDbraa022235 for ; Fri, 12 Jun 2009 09:37:53 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n5CDbrtY009051 for ; Fri, 12 Jun 2009 09:37:53 -0400 Received: from pike.pond.sub.org (vpn-10-124.str.redhat.com [10.32.10.124]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n5CDbpHZ004466 for ; Fri, 12 Jun 2009 09:37:52 -0400 Subject: Re: [Qemu-devel] [PATCH 0/4] Machine config files References: <20090610173803.4674.82538.stgit@wren.home> From: Markus Armbruster Date: Fri, 12 Jun 2009 15:37:50 +0200 In-Reply-To: <20090610173803.4674.82538.stgit@wren.home> (Paul Brook's message of "Wed\, 10 Jun 2009 18\:38\:03 +0100") Message-ID: <878wjx374h.fsf@pike.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Paul Brook 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? [...]