linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC 0/1] ARM: boot: make atags area relocatable
@ 2013-10-14 13:44 Daniel Mack
  2013-10-14 13:44 ` [PATCH RFC 1/1] ARM: head-common.S: relocate atags area if necessary Daniel Mack
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Mack @ 2013-10-14 13:44 UTC (permalink / raw)
  To: linux-arm-kernel

I've been hunting an effect of failed ARM kernel boots when kexec is
used, and here's a RFC for a solution of what I figured out.

kexec currently assumes that the kernel image compression rate is 1:4,
and stuffs the dtb image after what is assumed the end of the kernel
image. However, it does not read in the kernel's symbol table or
anything alike and hence can't know about the size of the bss
section. In my case, it turns out that upon __vet_atags is executed,
the dtb image lies inside the bss area and is hence overridden with
zeros later on.

This patch makes an attempt to fix this problem by detecting the
described condition and relocating the atags/bss section to where
the '_end' symbol is stored.

Disclaimer: I'm really not sure whether my virt_to_phys() approach
and other asm details are fully correct. I'm open to suggestions :)

Successfully tested on a AM335x platform that fails to kexec without
the patch.


Thanks,
Daniel


Daniel Mack (1):
  ARM: head-common.S: relocate atags area if necessary

 arch/arm/kernel/head-common.S | 58 ++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 52 insertions(+), 6 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-10-14 13:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-14 13:44 [PATCH RFC 0/1] ARM: boot: make atags area relocatable Daniel Mack
2013-10-14 13:44 ` [PATCH RFC 1/1] ARM: head-common.S: relocate atags area if necessary Daniel Mack

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).