LKML Archive on
help / color / mirror / Atom feed
From: Rob Herring <>
To: John Linn <>
Cc: Grant Likely <>,,
	Nicolas Pitre <>,
	Russell King <>,
	Catalin Marinas <>,,, Olof Johansson <>,
	Jeremy Kerr <>,
	Lennert Buijtenhek <>
Subject: Re: [PATCH 0/8] Basic ARM device tree support
Date: Wed, 26 Jan 2011 16:32:54 -0600	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <00bcd596-2108-4c54-92d3-7fda39e333e3@VA3EHSMHS015.ehs.local>

On 01/26/2011 02:04 PM, John Linn wrote:
>> -----Original Message-----
>> From: Grant Likely [] On Behalf Of Grant Likely
>> Sent: Tuesday, January 18, 2011 1:29 PM
>> To:
>> Cc: Nicolas Pitre; Russell King; Catalin Marinas;; linux-
>>; Olof Johansson; Jeremy Kerr; John Linn; Lennert Buijtenhek
>> Subject: [PATCH 0/8] Basic ARM device tree support
>> It's been a while since these patches have been circulated for review.
>> Much has changed since the last posting and there are no longer any
>> ugly hacks or workarounds to it working.  From my viewpoint, these
>> patches are complete and ready to be used.
>> This patch series allows CONFIG_OF to be enabled on ARM and allows the
>> kernel to accept a dtb pointer from boot firmware instead of atags.
>> If a dtb is passed, then the kernel will use the root 'compatible'
>> property to find a matching machine_desc, and it will use it to obtain
>> the memory layout, initrd location and kernel parameters string.
>> Only limited device tree support is enabled here.  It does not perform
>> any kind of device registration from device tree data.  That support
>> will be enabled in a later patch set.  Right now those patches depend
>> on the common struct clk patches that Jeremy is working on, so I'm not
>> going to post them yet.  Rather, this series is a stable base that
>> other engineers can use to start working on device tree support for
>> their platforms.
>> Tested on Versatile (qemu) and nVidia Tegra Harmony.  Kernel compiles
>> an boot with CONFIG_OF both on and off, both with and without passing
>> a device tree blob.
> Tested on Xilinx platform.  Did see an issue with loading the device
> tree blob into higher memory.  At address 0 there was no issue.

I have a fix for this. The issue is the early mmu page table needs to 
map the dtb. I later realized this is also may be problem for ATAGs as 
well, so I planned to re-work to make it unconditional and work for 
ATAGs. Or perhaps ATAGs only get accessed with the MMU on later than the 
dtb and everything is okay?

This applies to the DT patch set prior to the one Grant sent out
this week, so it may need updates.

From: Rob Herring <>
Date: Tue, 5 Oct 2010 10:32:51 -0500
Subject: [PATCH] arm/dt: map devtree blob in initial page table

If the DTB is not in 1st 1MB of RAM, it will not be mapped before
memblock is setup, so map it early. We assume the dtb is less than
1MB and map 2MB so it can be at any alignment.

Some assembly optimizations from Nicolas Pitre.

Signed-off-by: Rob Herring <>
  arch/arm/kernel/head.S |   13 +++++++++++++
  1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index 0480f25..1fcb962 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -228,6 +228,19 @@ __create_page_tables:
  	str	r6, [r0]

+	/* Make sure DT blob is mapped */
+	adr	r0, __devtree_pointer
+	ldr	r0, [r0]
+	mov	r0, r0, lsr #20
+	mov	r0, r0, lsl #20
+	add	r3, r0, #PAGE_OFFSET
+	add	r3, r4, r3, lsr #18
+	orr	r6, r7, r0
+	str	r6, [r3]
+	add	r6, r6, #0x100000
+	str	r6, [r3, #4]

  reply	other threads:[~2011-01-26 22:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-18 20:28 [PATCH 0/8] Basic ARM device tree support Grant Likely
2011-01-18 20:29 ` [PATCH 1/8] arm/dt: Make __vet_atags also accept a dtb image Grant Likely
2011-01-18 21:26   ` Nicolas Pitre
2011-01-18 21:42     ` Grant Likely
2011-01-18 20:29 ` [PATCH 2/8] arm/dt: allow bootmem reservation for device tree blob and initrd Grant Likely
2011-01-18 20:29 ` [PATCH 3/8] arm/dt: Allow CONFIG_OF on ARM Grant Likely
2011-01-18 20:29 ` [PATCH 4/8] arm/dt: consolidate atags setup into setup_machine_atags Grant Likely
2011-01-18 20:29 ` [PATCH 5/8] arm/dt: probe for platforms via the device tree Grant Likely
2011-01-18 20:29 ` [PATCH 6/8] arm/dt: Basic versatile devicetree support Grant Likely
2011-01-18 20:29 ` [PATCH 7/8] arm/tegra: Fix tegra irq_data conversion Grant Likely
2011-01-18 20:29 ` [PATCH 8/8] arm/dt: Basic tegra devicetree support Grant Likely
2011-01-18 21:47   ` Nicolas Pitre
2011-01-18 21:55     ` Grant Likely
2011-01-19 12:14   ` Sergei Shtylyov
2011-01-26 20:04 ` [PATCH 0/8] Basic ARM device tree support John Linn
2011-01-26 22:32   ` Rob Herring [this message]
2011-01-28  6:37     ` Jason Liu
2011-01-31 18:05   ` Grant Likely
2011-01-31 18:06     ` John Linn

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:

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

  git send-email \ \ \ \ \ \ \ \ \ \ \ \ \ \

* 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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).