summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/mmu_decl.h
diff options
context:
space:
mode:
authorKevin Hao <haokexin@gmail.com>2013-12-24 08:12:07 +0100
committerScott Wood <scottwood@freescale.com>2014-01-10 00:52:16 +0100
commit78a235efdc42ff363de81fdbc171385e8b86b69b (patch)
tree5e23fc68849e1ad9f86b10b019a6c844c75e2b54 /arch/powerpc/mm/mmu_decl.h
parentpowerpc: enable the relocatable support for the fsl booke 32bit kernel (diff)
downloadlinux-78a235efdc42ff363de81fdbc171385e8b86b69b.tar.xz
linux-78a235efdc42ff363de81fdbc171385e8b86b69b.zip
powerpc/fsl_booke: set the tlb entry for the kernel address in AS1
We use the tlb1 entries to map low mem to the kernel space. In the current code, it assumes that the first tlb entry would cover the kernel image. But this is not true for some special cases, such as when we run a relocatable kernel above the 64M or set CONFIG_KERNEL_START above 64M. So we choose to switch to address space 1 before setting these tlb entries. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch/powerpc/mm/mmu_decl.h')
-rw-r--r--arch/powerpc/mm/mmu_decl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index 83eb5d5f53d5..eefbf7bb4331 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -148,6 +148,8 @@ extern unsigned long calc_cam_sz(unsigned long ram, unsigned long virt,
extern void MMU_init_hw(void);
extern unsigned long mmu_mapin_ram(unsigned long top);
extern void adjust_total_lowmem(void);
+extern int switch_to_as1(void);
+extern void restore_to_as0(int esel);
#endif
extern void loadcam_entry(unsigned int index);