All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Vrabel <david.vrabel@citrix.com>
To: Ian Campbell <Ian.Campbell@citrix.com>
Cc: "xen-devel@lists.xensource.com" <xen-devel@lists.xensource.com>,
	David Vrabel <david.vrabel@citrix.com>
Subject: Re: [PATCH 08/11] device tree, arm: supply a flat device tree to dom0
Date: Thu, 22 Mar 2012 17:12:49 +0000	[thread overview]
Message-ID: <4F6B5D91.9020205@citrix.com> (raw)
In-Reply-To: <1332425191.8817.81.camel@zakaz.uk.xensource.com>

On 22/03/12 14:06, Ian Campbell wrote:
> On Mon, 2012-03-19 at 17:52 +0000, David Vrabel wrote:
>> From: David Vrabel <david.vrabel@citrix.com>
>>
>> Build a flat device tree for dom0 based on the one supplied to Xen.
>> The following changes are made:
>>
>>   * In the /chosen node, the xen,dom0-bootargs parameter is renamed to
>>     bootargs.
>>
>>   * In all memory nodes, the reg parameters are adjusted to reflect
>>     the amount of memory dom0 can use.  The p2m is updated using this
>>     info.
>>
>> Support for passing ATAGS to dom0 is removed.
> 
> With the series applied up to and including this patch my dom0 kernel
> fails to boot with:
> [    0.000000] Linux version 3.2.0-rc5-arm-native+ (ianc@drall) (gcc version 4.6.0 (GCC) ) #77 Thu Mar 22 13:58:33 GMT 2012
> [    0.000000] CPU: ARMv7 Processor [410fc0f0] revision 0 (ARMv7), cr=10c53c7d
> [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
> [    0.000000] Machine: ARM Versatile Express, model: V2P-AEMv7A
> [    0.000000] bootconsole [earlycon0] enabled
> [    0.000000] Memory policy: ECC disabled, Data cache writeback
> [    0.000000] Kernel panic - not syncing: ERROR: Failed to allocate 0x1000 bytes below 0x0.
> [    0.000000] 
> [    0.000000] [<c000d64c>] (unwind_backtrace+0x0/0xe0) from [<c0273558>] (panic+0x50/0x17c)
> [    0.000000] [<c0273558>] (panic+0x50/0x17c) from [<c032ff04>] (memblock_alloc_base+0x2c/0x34)
> [    0.000000] [<c032ff04>] (memblock_alloc_base+0x2c/0x34) from [<c0329f30>] (early_alloc.constprop.3+0x10/0x28)
> [    0.000000] [<c0329f30>] (early_alloc.constprop.3+0x10/0x28) from [<c032a8c0>] (paging_init+0x48c/0x628)
> [    0.000000] [<c032a8c0>] (paging_init+0x48c/0x628) from [<c0328678>] (setup_arch+0x508/0x7ac)
> [    0.000000] [<c0328678>] (setup_arch+0x508/0x7ac) from [<c03254dc>] (start_kernel+0x6c/0x2c0)
> [    0.000000] [<c03254dc>] (start_kernel+0x6c/0x2c0) from [<80008048>] (0x80008048)

This is really a bug in the memblock allocator.  You have
ARM_APPENDED_DTB enabled and you have actually appended a DTB.  The
appended DTB takes precedence over the one passed from the bootloader
and DTB in the Linux tree has 2 GiB of memory @ 2 GiB.  It looks like
the memblock allocator adds start + size, overflows and ends up with the
end of the region at 0.

You can either: a) disable ARM_APPENDED_DTB; b) not append a DTB; or c)
ensure the appended DTB's memory regions match that supplied by Xen.

David

  parent reply	other threads:[~2012-03-22 17:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-19 17:51 [PATCHv2 00/11] arm: pass a device tree to dom0 David Vrabel
2012-03-19 17:51 ` [PATCH 01/11] libfdt: move headers to xen/include/xen/libfdt/ David Vrabel
2012-03-19 17:58   ` David Vrabel
2012-03-19 17:52 ` [PATCH 02/11] MAINTAINERS: add device tree maintainer David Vrabel
2012-03-19 17:54   ` Keir Fraser
2012-03-19 17:52 ` [PATCH 03/11] device tree: follow coding style David Vrabel
2012-03-19 17:52 ` [PATCH 04/11] device tree: correctly ignore unit-address when matching nodes by name David Vrabel
2012-03-19 17:52 ` [PATCH 05/11] device tree: add device_tree_for_each_node() David Vrabel
2012-03-22 11:12   ` Ian Campbell
2012-03-22 12:47     ` David Vrabel
2012-03-19 17:52 ` [PATCH 06/11] device tree: add device_tree_dump() to print a flat device tree David Vrabel
2012-03-19 17:52 ` [PATCH 07/11] arm: remove the hack for loading vmlinux images David Vrabel
2012-03-19 17:52 ` [PATCH 08/11] device tree, arm: supply a flat device tree to dom0 David Vrabel
2012-03-20 10:43   ` David Vrabel
2012-03-20 10:52     ` Ian Campbell
2012-03-22 14:06   ` Ian Campbell
2012-03-22 14:27     ` David Vrabel
2012-03-22 17:12     ` David Vrabel [this message]
2012-03-19 17:52 ` [PATCH 09/11] Allow cmdline_parse() to be used with const strings David Vrabel
2012-03-19 17:54   ` Keir Fraser
2012-03-19 17:52 ` [PATCH 10/11] arm: use bootargs for the command line David Vrabel
2012-03-22 14:22   ` Ian Campbell
2012-03-22 14:30     ` Ian Campbell
2012-03-22 15:03     ` David Vrabel
2012-03-19 17:52 ` [PATCH 11/11] arm: add dom0_mem command line argument David Vrabel

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=4F6B5D91.9020205@citrix.com \
    --to=david.vrabel@citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /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.