All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Gibson <dwg-8fk3Idey6ehBDgjK7y7TUQ@public.gmane.org>
To: ron minnich <rminnich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Markus Armbruster
	<armbru-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
	devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org,
	Carl-Daniel Hailfinger
	<c-d.hailfinger.devel.2006-hi6Y0CQ0nG0@public.gmane.org>,
	Hollis Blanchard
	<hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>,
	Coreboot <coreboot-7ChRSZmxDtxg9hUCZPvPmw@public.gmane.org>
Subject: Re: [coreboot] DTS syntax and DTC patches (was: Re: [Qemu-devel] [RFC] Machine description as data)
Date: Fri, 20 Feb 2009 13:29:18 +1100	[thread overview]
Message-ID: <20090220022918.GA18332@yookeroo.seuss> (raw)
In-Reply-To: <13426df10902130907m5c3452dpb8f4f2b72f8507b9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

On Fri, Feb 13, 2009 at 09:07:08AM -0800, ron minnich wrote:
> Here is the sum total of the differences from when we checked it in
> over 2 years ago until now (parser). Our real changes are to
> flattree.c and livetree.c, where we do some ugly by-hand parsing of
> the ids such that pci@1,0 etc. work. I'd love to see a way to bring
> this into the real syntax. I've tried to do as little as possible to
> .y and .l.
> 
> The diff with comments is attached.
> 
> But this brings up a bigger issue and we could use your help.
> 
> OK, what did we do? We implemented the ability to have a sort of
> template. Here is a sample from real use.
> 
> /{
> 	mainboard_vendor = "Artec";
> 	mainboard_name = "DBE62";
> 	cpus { };
> 	apic@0 {
> 		/config/("northbridge/amd/geodelx/apic");
> 	};
> 	domain@0 {
> 		/config/("northbridge/amd/geodelx/domain");
> 		pci@1,0 {
> 			/config/("northbridge/amd/geodelx/pci");
> 			/* Video RAM has to be in 2MB chunks. */
> 			geode_video_mb = "16";
> 		};
> 	etc.
> 
> so what's going on here?
> 
> The config file in most cases is pretty straightforward. It's actually
> just a list of properties with a standard setting for chip control. We
> MUST have this; we don't want hundreds of settings in each mainboard,
> because sometimes a chip fix comes along and we want that to go into
> one chip file, and set the correct value, and have all mainboards get
> the new value next time they are built.
> 
> Let's look at /config/("northbridge/amd/geodelx/pci");
> 
> {
> 	device_operations = "geodelx_mc";
> 
> 	/* Video RAM has to be in 2MB chunks. */
> 	geode_video_mb = "0";
> };
> 
> The device_operations property is processed by flattree and is of no
> importance to you, but it is used in coreboot .h and .c code
> generation. For coreboot use, we have several property names that are
> special.
> 
> Note that we create a property, geode_video_mb, and set it to 0.
> 
> In the mainboard dts, we over-ride this value, and set it to 16.
> 
> These are pretty much the changes and, again, they work. But I'd like
> more, as would our community.
> 
> Right now, we can take a file containing a list of dts properties,
> read them in, and modify them as above. It's not really ideal, and I
> am sure you can already see it could be done better. But what we
> really want is the ability to read in  a dts node (with subnodes,
> etc.) and then elide them in the mainboard file.
> 
> So, for example, we have this subsection of one mainboard:
> 
> 		pci@6{ /* Port 2 */
> 			/config/("southbridge/amd/rs690/pcie.dts");
> 		};
> 		pci@7{ /* Port 3 */
> 			/config/("southbridge/amd/rs690/pcie.dts");
> 		};
> 		pci@12{
> 			/config/("southbridge/amd/sb600/hda.dts");
> 		};
> 		pci@13,0{
> 			/config/("southbridge/amd/sb600/usb.dts");
> 		};
> 		pci@13,1{
> 			/config/("southbridge/amd/sb600/usb.dts");
> 		};
> 		pci@13,2{
> 			/config/("southbridge/amd/sb600/usb.dts");
> 		};
> 
> This is not a bunch of chips, but one chip. It has lots of pci devices
> in it; this one chip is equivalent to a whole mainboard from previous
> years. What we'd really like is the ability to do what my wife calls
> restrict, add, and remove (I don't have these terms just right, it's
> some kind of compiler-speak which is what she does for a living).

Hrm, I see.  So, if we added the ability to list properties multiple
times, with the last definition overriding earlier ones, then I
believe that, along with include files, which are already supported
would accomplish what you have implemented with /config/.  Does that
seem correct?

> Restrict we have; change property values from a default.
> Add is what we'd like: add a node to a tree in some way.
> Remove we would also like: remove a node from a dts we have read in
> via /config/.

Hrm.  Well, this sort of thing is certainly on the cards with the
expression support stuff we had in mind.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

  parent reply	other threads:[~2009-02-20  2:29 UTC|newest]

Thread overview: 146+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-11 15:40 [Qemu-devel] [RFC] Machine description as data Markus Armbruster
2009-02-11 16:31 ` Ian Jackson
2009-02-11 17:43   ` Markus Armbruster
     [not found]   ` <18834.64870.951989.714873-msK/Ju9w1zmnROeE8kUsYhEHtJm+Wo+I@public.gmane.org>
2009-02-11 18:57     ` Hollis Blanchard
2009-02-11 18:57       ` Hollis Blanchard
     [not found]       ` <1234378639.28751.85.camel-EGjIuKC2qUdB0N6nvOmcJFaTQe2KTcn/@public.gmane.org>
2009-02-12  3:50         ` David Gibson
2009-02-12  3:50           ` David Gibson
     [not found] ` <87iqnh6kyv.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-11 18:50   ` Hollis Blanchard
2009-02-11 18:50     ` Hollis Blanchard
2009-02-11 19:34     ` Blue Swirl
2009-02-11 19:34       ` [Qemu-devel] " Blue Swirl
     [not found]     ` <1234378228.28751.79.camel-EGjIuKC2qUdB0N6nvOmcJFaTQe2KTcn/@public.gmane.org>
2009-02-12  4:01       ` David Gibson
2009-02-12  4:01         ` David Gibson
2009-02-12 10:26         ` Markus Armbruster
2009-02-12 10:26           ` [Qemu-devel] " Markus Armbruster
2009-02-12 12:49           ` Carl-Daniel Hailfinger
2009-02-12 12:49             ` [Qemu-devel] " Carl-Daniel Hailfinger
2009-02-12 16:46             ` M. Warner Losh
2009-02-12 16:46               ` [Qemu-devel] " M. Warner Losh
2009-02-12 18:29               ` Markus Armbruster
2009-02-12 18:29                 ` [Qemu-devel] " Markus Armbruster
2009-02-12 23:58                 ` Carl-Daniel Hailfinger
2009-02-12 23:58                   ` [Qemu-devel] " Carl-Daniel Hailfinger
     [not found]                   ` <4994B7B6.80805-hi6Y0CQ0nG0@public.gmane.org>
2009-02-13 11:19                     ` Markus Armbruster
2009-02-13 11:19                       ` Markus Armbruster
     [not found]                 ` <87prhnwltz.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-13  1:05                   ` David Gibson
2009-02-13  1:05                     ` David Gibson
2009-02-12 23:35               ` Carl-Daniel Hailfinger
2009-02-12 23:35                 ` [Qemu-devel] " Carl-Daniel Hailfinger
2009-02-12 23:58                 ` Paul Brook
2009-02-12 23:58                   ` [Qemu-devel] " Paul Brook
     [not found]                   ` <200902122358.25864.paul-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>
2009-02-13  0:32                     ` Carl-Daniel Hailfinger
2009-02-13  0:32                       ` Carl-Daniel Hailfinger
2009-02-13  0:47                       ` Jamie Lokier
2009-02-13  0:47                         ` [Qemu-devel] " Jamie Lokier
     [not found]                       ` <4994BF93.2070409-hi6Y0CQ0nG0@public.gmane.org>
2009-02-13  1:46                         ` David Gibson
2009-02-13  1:46                           ` David Gibson
2009-02-13 14:32                       ` Lennart Sorensen
2009-02-13 14:32                         ` [Qemu-devel] " Lennart Sorensen
     [not found]                 ` <4994B22E.6060608-hi6Y0CQ0nG0@public.gmane.org>
2009-02-13  0:05                   ` M. Warner Losh
2009-02-13  0:05                     ` M. Warner Losh
     [not found]           ` <87iqng0x3t.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-12 17:52             ` Hollis Blanchard
2009-02-12 17:52               ` Hollis Blanchard
     [not found]               ` <1234461162.20305.16.camel-EGjIuKC2qUdB0N6nvOmcJFaTQe2KTcn/@public.gmane.org>
2009-02-12 18:53                 ` Markus Armbruster
2009-02-12 18:53                   ` Markus Armbruster
     [not found]                   ` <87fxijwkpn.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-12 19:33                     ` Mitch Bradley
2009-02-12 19:33                       ` Mitch Bradley
     [not found]                       ` <499479A7.5090902-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2009-02-13  0:59                         ` David Gibson
2009-02-13  0:59                           ` David Gibson
2009-02-13  1:00                 ` David Gibson
2009-02-13  1:00                   ` David Gibson
2009-02-13  0:43             ` David Gibson
2009-02-13  0:43               ` David Gibson
     [not found]               ` <20090213004305.GB8104-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-02-13  2:11                 ` Carl-Daniel Hailfinger
2009-02-13  2:11                   ` Carl-Daniel Hailfinger
     [not found]                   ` <4994D6C8.5050004-hi6Y0CQ0nG0@public.gmane.org>
2009-02-13  2:17                     ` David Gibson
2009-02-13  2:17                       ` David Gibson
     [not found]                       ` <20090213021704.GA10476-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-02-13  2:45                         ` DTS syntax and DTC patches (was: Re: [Qemu-devel] [RFC] Machine description as data) Carl-Daniel Hailfinger
2009-02-13  2:45                           ` Carl-Daniel Hailfinger
     [not found]                           ` <4994DED9.6020803-hi6Y0CQ0nG0@public.gmane.org>
2009-02-13  2:51                             ` David Gibson
2009-02-13  2:51                               ` David Gibson
     [not found]                               ` <20090213025101.GC10476-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-02-13 17:07                                 ` [coreboot] " ron minnich
     [not found]                               ` <13426df10902130907m5c3452dpb8f4f2b72f8507b9@mail.gmail.com>
     [not found]                                 ` <13426df10902130907m5c3452dpb8f4f2b72f8507b9-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-02-20  2:29                                   ` David Gibson [this message]
     [not found]                                     ` <20090220022918.GA18332-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-02-20  3:32                                       ` ron minnich
2009-02-13 20:04                     ` [Qemu-devel] [RFC] Machine description as data Jon Loeliger
2009-02-13 20:04                       ` Jon Loeliger
2009-02-13 20:15                       ` Carl-Daniel Hailfinger
2009-02-13 20:15                         ` Carl-Daniel Hailfinger
     [not found]                         ` <4995D4EE.8030703-hi6Y0CQ0nG0@public.gmane.org>
2009-02-13 20:19                           ` Jon Loeliger
2009-02-13 20:19                             ` Jon Loeliger
2009-02-12 10:26     ` Markus Armbruster
2009-02-12 10:26       ` [Qemu-devel] " Markus Armbruster
2009-02-12 12:36       ` Carl-Daniel Hailfinger
2009-02-12 12:36         ` [Qemu-devel] " Carl-Daniel Hailfinger
2009-02-12 16:07       ` Paul Brook
2009-02-12 17:17         ` Blue Swirl
2009-02-12 18:09         ` Marcelo Tosatti
     [not found]       ` <87k57w0x4r.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-13  0:37         ` David Gibson
2009-02-13  0:37           ` David Gibson
     [not found]           ` <20090213003724.GA8104-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-02-13 11:26             ` Markus Armbruster
2009-02-13 11:26               ` Markus Armbruster
     [not found]               ` <87ab8qr317.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-13 12:06                 ` Paul Brook
2009-02-13 12:06                   ` Paul Brook
     [not found]                   ` <200902131206.42427.paul-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>
2009-02-13 12:48                     ` Markus Armbruster
2009-02-13 12:48                       ` Markus Armbruster
     [not found]                       ` <87ocx6pkol.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-13 13:33                         ` Paul Brook
2009-02-13 13:33                           ` Paul Brook
     [not found]                           ` <200902131333.47141.paul-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>
2009-02-13 14:13                             ` Markus Armbruster
2009-02-13 14:13                               ` Markus Armbruster
     [not found]                               ` <871vu2pgq7.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-13 14:25                                 ` Paul Brook
2009-02-13 14:25                                   ` Paul Brook
     [not found]                                   ` <200902131425.53137.paul-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>
2009-02-13 15:47                                     ` Jamie Lokier
2009-02-13 15:47                                       ` Jamie Lokier
2009-02-13 18:36                                 ` Mitch Bradley
2009-02-13 18:36                                   ` Mitch Bradley
     [not found]                                   ` <4995BDC0.3040806-D5eQfiDGL7eakBO8gow8eQ@public.gmane.org>
2009-02-13 19:49                                     ` Markus Armbruster
2009-02-13 19:49                                       ` Markus Armbruster
     [not found]                                       ` <877i3uglqz.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-13 19:51                                         ` Mitch Bradley
2009-02-13 19:51                                           ` Mitch Bradley
2009-02-16  3:42                 ` David Gibson
2009-02-16  3:42                   ` David Gibson
     [not found]                   ` <20090216034214.GB9772-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-02-16 16:39                     ` Markus Armbruster
2009-02-16 16:39                       ` Markus Armbruster
     [not found]                       ` <87iqnawd2r.fsf-A7mx1g9ivIOttUaS3K59qNi2O/JbrIOy@public.gmane.org>
2009-02-17  3:29                         ` David Gibson
2009-02-17  3:29                           ` David Gibson
     [not found]                           ` <20090217032909.GA29225-787xzQ0H9iRg7VrjXcPTGA@public.gmane.org>
2009-02-17  7:54                             ` Markus Armbruster
2009-02-17  7:54                               ` Markus Armbruster
2009-02-17 17:44                             ` Paul Brook
2009-02-17 17:44                               ` Paul Brook
     [not found]                               ` <200902171744.34951.paul-qD8j1LwMmJjtCj0u4l0SBw@public.gmane.org>
2009-02-18  8:36                                 ` Markus Armbruster
2009-02-18  8:36                                   ` Markus Armbruster
2009-02-11 19:01 ` Anthony Liguori
2009-02-11 19:36   ` Blue Swirl
2009-02-11 19:56     ` Anthony Liguori
2009-02-12 10:25       ` Markus Armbruster
2009-02-16 16:22 ` [Qemu-devel] Machine description as data prototype, take 2 (was: [RFC] Machine description as data) Markus Armbruster
2009-02-17 17:32   ` Paul Brook
2009-02-18  8:42     ` [Qemu-devel] Machine description as data prototype, take 2 Markus Armbruster
2009-02-19 10:29 ` [Qemu-devel] Machine description as data prototype, take 3 (was: [RFC] Machine description as data) Markus Armbruster
2009-02-19 13:53   ` Paul Brook
2009-02-19 14:55     ` [Qemu-devel] Machine description as data prototype, take 3 Markus Armbruster
2009-02-19 15:03       ` Paul Brook
2009-02-19 14:36   ` Anthony Liguori
2009-02-19 15:00     ` Markus Armbruster
2009-02-19 14:49   ` Anthony Liguori
2009-02-23 17:38     ` Markus Armbruster
2009-02-23 18:58       ` Anthony Liguori
2009-02-24  9:08         ` Markus Armbruster
2009-02-19 16:40   ` [Qemu-devel] Machine description as data prototype, take 3 (was: [RFC] Machine description as data) Blue Swirl
2009-02-19 18:30     ` [Qemu-devel] Machine description as data prototype, take 3 Markus Armbruster
2009-02-20 18:14       ` Blue Swirl
2009-02-20 18:20         ` Paul Brook
2009-02-23 12:00           ` Markus Armbruster
2009-02-23 12:18         ` Markus Armbruster
2009-02-23 18:00 ` [Qemu-devel] Machine description as data prototype, take 4 (was: [RFC] Machine description as data) Markus Armbruster
2009-02-24 20:06   ` Blue Swirl
2009-02-25 12:13     ` [Qemu-devel] Machine description as data prototype, take 4 Markus Armbruster
2009-02-25 20:11       ` Blue Swirl
2009-03-03 17:46 ` [Qemu-devel] Machine description as data prototype, take 5 (was: [RFC] Machine description as data) Markus Armbruster
2009-03-12 18:43 ` [Qemu-devel] Machine description as data prototype, take 6 " Markus Armbruster
2009-03-17 16:06   ` [Qemu-devel] Machine description as data prototype, take 6 Paul Brook
2009-03-17 17:32     ` Markus Armbruster
2009-03-23 15:50 ` [Qemu-devel] Re: [RFC] Machine description as data Markus Armbruster
2009-03-23 15:53   ` Markus Armbruster
2009-03-31  9:16 ` Markus Armbruster
2009-04-17 16:04 ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090220022918.GA18332@yookeroo.seuss \
    --to=dwg-8fk3idey6ehbdgjk7y7tuq@public.gmane.org \
    --cc=armbru-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=c-d.hailfinger.devel.2006-hi6Y0CQ0nG0@public.gmane.org \
    --cc=coreboot-7ChRSZmxDtxg9hUCZPvPmw@public.gmane.org \
    --cc=devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org \
    --cc=hollisb-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org \
    --cc=rminnich-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.