]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/fsl_booke: make sure PAGE_OFFSET map to memstart_addr for relocatable kernel
authorKevin Hao <haokexin@gmail.com>
Tue, 24 Dec 2013 07:12:10 +0000 (15:12 +0800)
committerScott Wood <scottwood@freescale.com>
Thu, 9 Jan 2014 23:52:17 +0000 (17:52 -0600)
commitdcfac1f5c27c6fbb433e62674a4adab72f480b9f
tree1d3c786feb97e2ef82a417a9a95dcecf82bcd5da
parente809938e37fe3e97eb1cb805e889b450bd303192
powerpc/fsl_booke: make sure PAGE_OFFSET map to memstart_addr for relocatable kernel

This is always true for a non-relocatable kernel. Otherwise the kernel
would get stuck. But for a relocatable kernel, it seems a little
complicated. When booting a relocatable kernel, we just align the
kernel start addr to 64M and map the PAGE_OFFSET from there. The
relocation will base on this virtual address. But if this address
is not the same as the memstart_addr, we will have to change the
map of PAGE_OFFSET to the real memstart_addr and do another relocation
again.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
[scottwood@freescale.com: make offset long and non-negative in simple case]
Signed-off-by: Scott Wood <scottwood@freescale.com>
arch/powerpc/kernel/head_fsl_booke.S
arch/powerpc/mm/fsl_booke_mmu.c
arch/powerpc/mm/mmu_decl.h