aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom.c
diff options
context:
space:
mode:
authorMichael Ellerman <michael@ellerman.id.au>2005-12-04 02:39:37 -0500
committerPaul Mackerras <paulus@samba.org>2006-01-08 22:52:21 -0500
commit0cc4746cadda16826a1b3214c042a2f75445b71c (patch)
treeec8decc81a3f9fd09454ff208fd3b82cf5bdb730 /arch/powerpc/kernel/prom.c
parent8c4f1f2958ff9d4a6760f3bdd0cfb7d2b9e12093 (diff)
[PATCH] powerpc: Reroute interrupts from 0 + offset to PHYSICAL_START + offset
Regardless of where the kernel's linked we always get interrupts at low addresses. This patch creates a trampoline in the first 3 pages of memory, where interrupts land, and patches those addresses to jump into the real kernel code at PHYSICAL_START. We also need to reserve the trampoline code and a bit more in prom.c Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kernel/prom.c')
-rw-r--r--arch/powerpc/kernel/prom.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 3bf968e74095..9aac77ca3167 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -37,6 +37,7 @@
37#include <asm/processor.h> 37#include <asm/processor.h>
38#include <asm/irq.h> 38#include <asm/irq.h>
39#include <asm/io.h> 39#include <asm/io.h>
40#include <asm/kdump.h>
40#include <asm/smp.h> 41#include <asm/smp.h>
41#include <asm/system.h> 42#include <asm/system.h>
42#include <asm/mmu.h> 43#include <asm/mmu.h>
@@ -1335,11 +1336,14 @@ void __init early_init_devtree(void *params)
1335 of_scan_flat_dt(early_init_dt_scan_memory, NULL); 1336 of_scan_flat_dt(early_init_dt_scan_memory, NULL);
1336 lmb_enforce_memory_limit(memory_limit); 1337 lmb_enforce_memory_limit(memory_limit);
1337 lmb_analyze(); 1338 lmb_analyze();
1338 lmb_reserve(0, __pa(klimit));
1339 1339
1340 DBG("Phys. mem: %lx\n", lmb_phys_mem_size()); 1340 DBG("Phys. mem: %lx\n", lmb_phys_mem_size());
1341 1341
1342 /* Reserve LMB regions used by kernel, initrd, dt, etc... */ 1342 /* Reserve LMB regions used by kernel, initrd, dt, etc... */
1343 lmb_reserve(PHYSICAL_START, __pa(klimit) - PHYSICAL_START);
1344#ifdef CONFIG_CRASH_DUMP
1345 lmb_reserve(0, KDUMP_RESERVE_LIMIT);
1346#endif
1343 early_reserve_mem(); 1347 early_reserve_mem();
1344 1348
1345 DBG("Scanning CPUs ...\n"); 1349 DBG("Scanning CPUs ...\n");