diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2006-06-23 04:20:13 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-06-27 21:59:48 -0400 |
commit | 458148c00b97864a27ecf528a1d45a8e5ebd9bbc (patch) | |
tree | cd32ceb1cddc32e501a1aeebd0f0f88dbdd950a5 /arch/powerpc/kernel/prom.c | |
parent | ab3ab74d9b6b3920be70f502b40cb3f7f08d23fa (diff) |
[POWERPC] Setup RTAS values earlier, to enable rtas_call() earlier
Althought RTAS is instantiated when we enter the kernel, we can't actually
call into it until we know its entry point address. Currently we grab that
in rtas_initialize(), however that's quite late in the boot sequence.
To enable rtas_call() earlier, we can grab the RTAS entry etc. values while
we're scanning the flattened device tree. There's existing code to retrieve
the values from /chosen, however we don't store them there anymore, so remove
that code.
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.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index efed4bc2b454..ce02c056ac3f 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -1125,24 +1125,6 @@ static int __init early_init_dt_scan_chosen(unsigned long node, | |||
1125 | tce_alloc_end = *lprop; | 1125 | tce_alloc_end = *lprop; |
1126 | #endif | 1126 | #endif |
1127 | 1127 | ||
1128 | #ifdef CONFIG_PPC_RTAS | ||
1129 | /* To help early debugging via the front panel, we retrieve a minimal | ||
1130 | * set of RTAS infos now if available | ||
1131 | */ | ||
1132 | { | ||
1133 | u64 *basep, *entryp, *sizep; | ||
1134 | |||
1135 | basep = of_get_flat_dt_prop(node, "linux,rtas-base", NULL); | ||
1136 | entryp = of_get_flat_dt_prop(node, "linux,rtas-entry", NULL); | ||
1137 | sizep = of_get_flat_dt_prop(node, "linux,rtas-size", NULL); | ||
1138 | if (basep && entryp && sizep) { | ||
1139 | rtas.base = *basep; | ||
1140 | rtas.entry = *entryp; | ||
1141 | rtas.size = *sizep; | ||
1142 | } | ||
1143 | } | ||
1144 | #endif /* CONFIG_PPC_RTAS */ | ||
1145 | |||
1146 | #ifdef CONFIG_KEXEC | 1128 | #ifdef CONFIG_KEXEC |
1147 | lprop = (u64*)of_get_flat_dt_prop(node, "linux,crashkernel-base", NULL); | 1129 | lprop = (u64*)of_get_flat_dt_prop(node, "linux,crashkernel-base", NULL); |
1148 | if (lprop) | 1130 | if (lprop) |
@@ -1327,6 +1309,11 @@ void __init early_init_devtree(void *params) | |||
1327 | /* Setup flat device-tree pointer */ | 1309 | /* Setup flat device-tree pointer */ |
1328 | initial_boot_params = params; | 1310 | initial_boot_params = params; |
1329 | 1311 | ||
1312 | #ifdef CONFIG_PPC_RTAS | ||
1313 | /* Some machines might need RTAS info for debugging, grab it now. */ | ||
1314 | of_scan_flat_dt(early_init_dt_scan_rtas, NULL); | ||
1315 | #endif | ||
1316 | |||
1330 | /* Retrieve various informations from the /chosen node of the | 1317 | /* Retrieve various informations from the /chosen node of the |
1331 | * device-tree, including the platform type, initrd location and | 1318 | * device-tree, including the platform type, initrd location and |
1332 | * size, TCE reserve, and more ... | 1319 | * size, TCE reserve, and more ... |