Re: [PATCH 02/11] x86: Add device tree support

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sebastian Andrzej Siewior
Date: Sunday, November 28, 2010 - 6:49 am

* Benjamin Herrenschmidt | 2010-11-27 08:42:16 [+1100]:

OLPC's openfirmware is embedded into the bootpage where ofw_magic is set
to OLPC_OFW_SIG (0x2057464F). I don't touch this, the device tree is
passed via setup_data. So you could use both at the same time.

Similar. We get most critical parameters from the so called bootpage
(the traditional x86 way) which also contains a pointer to the device
tree (we don't have open firmware or something else where we call back).
We plan to relocate the device tree (before it is unflattered) so the
bootloader does not need to know about the memory layout the kernel is
having. 
On kexec, the bootpage is built from scratch AFAIK. So the kexec loader
needs to suck the dtb from /proc and can add it to the bootpage.

This is only for the case where we do not get a dtb from the bootloader
Microblaze also links dtb into the kernel in that case.


The reason why you have multiple .o wrapper files is because the specific
platform code is not simply passing the device tree but also adding /
updating nodes like MAC address, bus clocks, ... which are coming from
the (different) bd_t struct or something else. The simpleboot target is
covering the case where you just pass the embedded dtb to kernel without
changing it.

On x86 we want to have the bootloader passing us the final dtb. The
in-kernel dtb is more like a generic simpleboot target.

For the distro reason the in-kernel dtb supports multiple dtbs. So a
distro kernel can include all of them into .init.data section and the
user can specify on the command line which device tree he wants. x86 gets
its command line via the bootpage so it is available before we have a
device tree. Microblaze should also be able to use this mechanism.


Yes, we want this as well. But what about the old ARMs where the
bootloader did not have dtb support? What about minimal bootloader which
just initialize the CPU and memory and jump then into the kernel? So the
in-kernel dtb is a simple way to solve this. However I don't know what
to do about updating the MAC address where it is not yet set.

This isn't a problem unless you move nodes or deprecate them, right? Or
do you think about another reason to versionning the device-tree?.


Sebastian
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Add device tree support for x86, Sebastian Andrzej Si ..., (Thu Nov 25, 10:39 am)
[PATCH 01/11] x86/kernel: remove conditional early remap i ..., Sebastian Andrzej Si ..., (Thu Nov 25, 10:39 am)
[PATCH 02/11] x86: Add device tree support, Sebastian Andrzej Si ..., (Thu Nov 25, 10:39 am)
[PATCH 03/11] x86/dtb: Add a device tree for CE4100, Sebastian Andrzej Si ..., (Thu Nov 25, 10:39 am)
[PATCH 04/11] x86/dtb: add irq host abstraction, Sebastian Andrzej Si ..., (Thu Nov 25, 10:39 am)
[PATCH 05/11] x86/dtb: add early parsing of APIC and IO APIC, Sebastian Andrzej Si ..., (Thu Nov 25, 10:39 am)
[PATCH 06/11] x86/dtb: add support hpet, Sebastian Andrzej Si ..., (Thu Nov 25, 10:39 am)
[PATCH 07/11] x86/dtb: add support for PCI devices backed ..., Sebastian Andrzej Si ..., (Thu Nov 25, 10:39 am)
[PATCH 08/11] x86/dtb: Add generic bus probe, Sebastian Andrzej Si ..., (Thu Nov 25, 10:39 am)
[PATCH 09/11] x86/ioapic: Add OF bindings for IO-APIC, Sebastian Andrzej Si ..., (Thu Nov 25, 10:39 am)
[PATCH 10/11] x86/io_apic: add simply id set, Sebastian Andrzej Si ..., (Thu Nov 25, 10:40 am)
[PATCH 11/11] x86/ce4100: use OF for ioapic, Sebastian Andrzej Si ..., (Thu Nov 25, 10:40 am)
Re: [PATCH 04/11] x86/dtb: add irq host abstraction , Jon Loeliger, (Thu Nov 25, 12:30 pm)
Re: [PATCH 10/11] x86/io_apic: add simply id set, Yinghai Lu, (Thu Nov 25, 2:04 pm)
Re: [PATCH 02/11] x86: Add device tree support, Sam Ravnborg, (Thu Nov 25, 3:53 pm)
Re: [PATCH 02/11] x86: Add device tree support, Sebastian Andrzej Si ..., (Fri Nov 26, 2:06 am)
Re: [PATCH 10/11] x86/io_apic: add simply id set, Sebastian Andrzej Si ..., (Fri Nov 26, 4:03 am)
Re: [PATCH 04/11] x86/dtb: add irq host abstraction, Sebastian Andrzej Si ..., (Fri Nov 26, 7:19 am)
[PATCH] x86/io_apic: split setup_ioapic_ids_from_mpc() int ..., Sebastian Andrzej Si ..., (Fri Nov 26, 9:50 am)
Re: [PATCH 04/11] x86/dtb: add irq host abstraction, Benjamin Herrenschmidt, (Fri Nov 26, 2:36 pm)
Re: [PATCH 02/11] x86: Add device tree support, Benjamin Herrenschmidt, (Fri Nov 26, 2:42 pm)
Re: [PATCH 03/11] x86/dtb: Add a device tree for CE4100, Benjamin Herrenschmidt, (Fri Nov 26, 2:57 pm)
Re: [PATCH 04/11] x86/dtb: add irq host abstraction , Jon Loeliger, (Fri Nov 26, 8:11 pm)
Re: [PATCH 07/11] x86/dtb: add support for PCI devices bac ..., Benjamin Herrenschmidt, (Sat Nov 27, 3:33 pm)
Re: [PATCH 02/11] x86: Add device tree support, Sebastian Andrzej Si ..., (Sun Nov 28, 6:49 am)
Re: [PATCH 07/11] x86/dtb: add support for PCI devices bac ..., Sebastian Andrzej Si ..., (Sun Nov 28, 7:04 am)
Re: [PATCH 03/11] x86/dtb: Add a device tree for CE4100, Sebastian Andrzej Si ..., (Sun Nov 28, 9:04 am)
Re: [PATCH 02/11] x86: Add device tree support, Benjamin Herrenschmidt, (Sun Nov 28, 3:28 pm)
Re: [PATCH 07/11] x86/dtb: add support for PCI devices bac ..., Benjamin Herrenschmidt, (Sun Nov 28, 3:32 pm)
Re: [PATCH 03/11] x86/dtb: Add a device tree for CE4100, Benjamin Herrenschmidt, (Sun Nov 28, 3:53 pm)
Re: [PATCH 03/11] x86/dtb: Add a device tree for CE4100, Mitch Bradley, (Sun Nov 28, 6:34 pm)
Re: [PATCH 03/11] x86/dtb: Add a device tree for CE4100, David Gibson, (Sun Nov 28, 7:22 pm)
Re: [sodaville] [PATCH 03/11] x86/dtb: Add a device tree f ..., Sebastian Andrzej Si ..., (Mon Nov 29, 12:36 pm)
Re: [sodaville] [PATCH 03/11] x86/dtb: Add a device tree f ..., Sebastian Andrzej Si ..., (Mon Nov 29, 12:44 pm)
Re: [sodaville] [PATCH 03/11] x86/dtb: Add a device tree f ..., Benjamin Herrenschmidt, (Mon Nov 29, 1:03 pm)
Re: [PATCH 03/11] x86/dtb: Add a device tree for CE4100, Benjamin Herrenschmidt, (Mon Nov 29, 1:05 pm)
Re: [sodaville] [PATCH 03/11] x86/dtb: Add a device tree f ..., Benjamin Herrenschmidt, (Mon Nov 29, 1:14 pm)
Re: [PATCH 03/11] x86/dtb: Add a device tree for CE4100, Mitch Bradley, (Mon Nov 29, 1:32 pm)
Re: [PATCH 03/11] x86/dtb: Add a device tree for CE4100, Benjamin Herrenschmidt, (Mon Nov 29, 1:44 pm)
Re: [PATCH 03/11] x86/dtb: Add a device tree for CE4100, Mitch Bradley, (Mon Nov 29, 2:32 pm)
Re: [PATCH 03/11] x86/dtb: Add a device tree for CE4100, David Gibson, (Mon Nov 29, 4:58 pm)
Re: [PATCH 03/11] x86/dtb: Add a device tree for CE4100, Benjamin Herrenschmidt, (Mon Nov 29, 7:50 pm)
Re: [PATCH 03/11] x86/dtb: Add a device tree for CE4100, Sebastian Andrzej Si ..., (Tue Nov 30, 4:20 am)
Re: [PATCH 03/11] x86/dtb: Add a device tree for CE4100, Sebastian Andrzej Si ..., (Tue Nov 30, 4:51 am)
Re: [PATCH 03/11] x86/dtb: Add a device tree for CE4100, Benjamin Herrenschmidt, (Tue Nov 30, 1:31 pm)
Re: [sodaville] [PATCH 04/11] x86/dtb: add irq host abstra ..., Sebastian Andrzej Si ..., (Wed Dec 1, 3:31 am)
Re: [PATCH 07/11] x86/dtb: add support for PCI devices bac ..., Sebastian Andrzej Si ..., (Thu Dec 2, 9:17 am)
[tip:x86/apic] x86: io_apic: Split setup_ioapic_ids_from_mpc(), tip-bot for Sebastia ..., (Mon Dec 6, 6:33 am)
Re: [sodaville] [PATCH 01/11] x86/kernel: remove condition ..., Sebastian Andrzej Si ..., (Wed Dec 8, 1:38 am)
[tip:x86/apic-cleanups] x86, ioapic: Avoid writing io_apic ..., tip-bot for Yinghai Lu, (Thu Dec 9, 1:56 pm)
Re: [PATCH 01/11] x86/kernel: remove conditional early rem ..., Sebastian Andrzej Si ..., (Thu Dec 16, 2:55 am)
Re: [PATCH 02/11] x86: Add device tree support, Grant Likely, (Thu Dec 30, 1:26 am)
Re: [PATCH 02/11] x86: Add device tree support, Rob Landley, (Thu Dec 30, 1:45 am)
Re: [PATCH 02/11] x86: Add device tree support, Grant Likely, (Thu Dec 30, 1:57 pm)
Re: [PATCH 02/11] x86: Add device tree support, Grant Likely, (Thu Dec 30, 1:58 pm)
Re: [sodaville] [PATCH 02/11] x86: Add device tree support, H. Peter Anvin, (Thu Dec 30, 5:51 pm)
Re: [sodaville] [PATCH 02/11] x86: Add device tree support, H. Peter Anvin, (Mon Jan 3, 11:06 am)
Re: [sodaville] [PATCH 02/11] x86: Add device tree support, H. Peter Anvin, (Mon Jan 3, 11:10 am)