aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/prom_init.c
Commit message (Collapse)AuthorAgeFilesLines
* [PATCH] powerpc: incorrect rmo_top handling in prom_initBenjamin Herrenschmidt2006-03-031-1/+1
| | | | | | | | | | | | | | | | | | On Thu, 2006-03-02 at 19:55 +0100, Olaf Hering wrote: > My iBook1 has 2 memory regions in reg. Depending on how I boot it > (vmlinux+initrd) or zImage.initrd, it will not boot with current Linus > tree. > rmo_top should be 160MB instead of 32MB. On logically-partitioned machines the first element of the reg property in the memory node is defined to be the "RMO" region, i.e. the memory that the processor can access in real mode. On other machines the first element has no special meaning, so only take it to be the RMO region on LPAR machines. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc64: remove broken/bitrotted HMT supportAnton Blanchard2006-02-241-38/+0
| | | | | | | | | | | HMT support is currently broken and needs to be reworked to play nicely with the SMT scheduler. Remove the bit rotten bits for the time being. I also updated an incorrect comment, we enter __secondary_hold with the physical cpu id in r3. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Refuse to boot a kdump kernel via OFMichael Ellerman2006-02-071-0/+4
| | | | | | | | | | | | You can't boot a kdump kernel via OF, not reliably anyway, the kernel being at 32 MB conflicts with the zImage wrapper etc. and it blows up. It's trivial to check in prom_init though, and this is early enough that we can actually drop back to OF where a reset-all will get you going again, which is kinda nice. I think this should go in for 2.6.16. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Fix kdump copy regs and dynamic allocate per-cpu crash notesHaren Myneni2006-01-151-1/+2
| | | | | | | | | | | | | | | | - This contains the arch specific changes for the following the kdump generic fixes which were already accepted in the upstream. . Capturing CPU registers (for the case of 'panic' and invoking the dump using 'sysrq-trigger') from a function (stack frame) which will be not be available during the kdump boot. Hence, might result in invalid stack trace. . Dynamically allocating per cpu ELF notes section instead of statically for NR_CPUS. - Fix the compiler warning in prom_init.c. Signed-off-by: Haren Myneni <haren@us.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Fixed memory reserve map layoutKumar Gala2006-01-121-4/+4
| | | | | | | | | | | | | | powerpc: Fixed memory reserve map layout The memory reserve map is suppose to be a pair of 64-bit integers to represent each region. On ppc32 the code was treating the pair as two 32-bit integers. Additional the prom_init code was producing the wrong layout on ppc32. Added a simple check to try to provide backwards compatibility. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Remove device_node addrs/n_addrBenjamin Herrenschmidt2006-01-091-1/+2
| | | | | | | | | | | | The pre-parsed addrs/n_addrs fields in struct device_node are finally gone. Remove the dodgy heuristics that did that parsing at boot and remove the fields themselves since we now have a good replacement with the new OF parsing code. This patch also fixes a bunch of drivers to use the new code instead, so that at least pmac32, pseries, iseries and g5 defconfigs build. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] cell: add platform detection codeArnd Bergmann2006-01-091-0/+2
| | | | | | | | | | | I can't really get a conclusive answer from the firmware people what to check for, so I just try scanning for anything that starts with "IBM,CPB", which should be correct for all hardware produced so far and for systemsim. Signed-off-by: Arnd Bergmann <arndb@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Parse crashkernel= parameter in first kernelMichael Ellerman2006-01-091-0/+53
| | | | | | | | | This patch adds code to parse and setup the crash kernel resource in the first kernel. PPC64 ignores the @x part, we always run at 32 MB. Signed-off-by: Haren Myneni <haren@us.ibm.com> Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Add a is_kernel_addr() macroMichael Ellerman2006-01-091-1/+1
| | | | | | | | | | | There's a bunch of code that compares an address with KERNELBASE to see if it's a "kernel address", ie. >= KERNELBASE. The proper test is actually to compare with PAGE_OFFSET, since we're going to change KERNELBASE soon. So replace all of them with an is_kernel_addr() macro that does that. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: prevent stack corruption in call_prom_retOlaf Hering2005-11-301-1/+1
| | | | | | | | Use the correct pointer to clear the memory of the return values, to prevent stack corruption in the callers stackframe. Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: merge code values for identifying platformsPaul Mackerras2005-11-101-6/+2
| | | | | | | | | | | | This patch merges platform codes. systemcfg->platform is no longer used, systemcfg use in general is deprecated as much as possible (and renamed _systemcfg before it gets completely moved elsewhere in a future patch), _machine is now used on ppc64 along as ppc32. Platform codes aren't gone yet but we are getting a step closer. A bunch of asm code in head[_64].S is also turned into C code. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* ppc/powerpc: workarounds for old Open Firmware versionsPaul Mackerras2005-11-101-43/+127
| | | | | | | | | | | | | | This adds code to work around some problems with old versions of Open Firmware, such as on the early powermacs (7500 etc.) and the "Longtrail" CHRP machine. On these machines we have to claim the physical and virtual address ranges explicitly when claiming memory and then set up a V->P mapping. The Longtrail has more problems: setprop doesn't work, and we have to set an "allow-reclaim" variable to 0 in order to get claim on physical memory ranges to fail if the memory is already claimed. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Fix crash in early boot on some powermacsPaul Mackerras2005-11-081-2/+7
| | | | | | | | | Some powermac machines were crashing in the quiesce firmware call in prom_init.c because we have just closed the OF stdin device; notably my 1999 G3 powerbook does this. To avoid this, don't close the OF stdin device on powermacs. Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] ppc: fix a bunch of warningsBenjamin Herrenschmidt2005-11-081-4/+5
| | | | | | | | Building a PowerMac kernel with ARCH=powerpc causes a bunch of warnings, this fixes some of them Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] ppc64: More U3 device-tree fixesBenjamin Herrenschmidt2005-11-081-1/+1
| | | | | | | | Some more U3 revisions have the missing "interrupts" property in U3, this adds them to the fixup code in prom_init.c Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Rename BPA to CellArnd Bergmann2005-11-011-1/+1
| | | | | | | | | The official name for BPA is now CBEA (Cell Broadband Engine Architecture). This patch renames all occurences of the term BPA to 'Cell' for easier recognition. Signed-off-by: Arnd Bergmann <arndb@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Purge bootinfo.hDavid Gibson2005-10-271-1/+0
| | | | | | | | | | | | | | | | | With ARCH=powerpc we assume the presence of a device tree, so we don't require any support for the old bi_recs method of passing boot parameters. Likewise, we've never needed it for ppc64, but we still had an include/asm-ppc64/bootinfo.h from which nothing was used. This patch removes that file, and all references to it in arch/ppc64 and arch/powerpc. A related, unused variable 'boot_mem_size' is also removed from setup_32.c. The bootinfo stuff remains in ARCH=ppc for the time being. Built and booted on Power5 (ARCH=ppc64 and ARCH=powerpc), built for 32-bit powermac (ARCH=powerpc and ARCH=ppc). Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Fixes to get the Longtrail CHRP a bit furtherPaul Mackerras2005-10-261-14/+28
| | | | | | | | | | | | | | | | | Talk about buggy firmware... the OF on the Longtrail returns 0 from the claim client service rather than -1 when the claim fails. It also has no device_type on the /memory node and blows up if the output buffer for package-to-path is too big. This also fixes a bug with calling alloc_up with align == 0, where we did _ALIGN_UP(alloc_bottom, 0) which will end up as 0. Lastly, we now check the return value (in r3) from calling the prom, and return -1 from call_prom if we get a negative value back. That is supposed to indicate that the requested client service doesn't exist. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Merge 32-bit CHRP support.Paul Mackerras2005-10-261-31/+23
| | | | | | | SMP still needs more work but UP gets as far as starting userspace at least. This uses the 64-bit-style code for spinning up the cpus. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Run on old powermacs.Paul Mackerras2005-10-231-24/+63
| | | | | | | | | | | | | | | | Old powermacs have a number of differences from current machines: - there is no interrupt tree in the device tree, just interrupt or AAPL,interrupt properties - the chosen node in the device tree is called /chosen@0 - the OF claim method doesn't map the memory, so we have to do an explicit map call as well - there is no /chosen/cpu property on SMP machines - the NVRAM isn't structured as a set of partitions. This adapts the merged powermac support code to cope with these issues. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Merge in 64-bit powermac support.Paul Mackerras2005-10-221-2/+2
| | | | | | | | | | This brings in a lot of changes from arch/ppc64/kernel/pmac_*.c to arch/powerpc/platforms/powermac/*.c and makes various minor tweaks elsewhere. On the powermac we now initialize ppc_md by copying the whole pmac_md structure into it, which required some changes in the ordering of initializations of individual fields of it. Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: Another maple merge tree fixDavid Gibson2005-10-171-3/+1
| | | | | | | | | With ARCH=powerpc, a spurious ifdef in prom_init prevented the seconday hold loop being correctly copied down on Maple. With this patch, Maple boots with ARCH=powerpc Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Initialize btext subsystem later, after prom_initPaul Mackerras2005-10-171-59/+0
| | | | | | | | | | | | We were initializing the btext stuff from prom_init(), thus breaking the rule that all communication between prom_init() and the rest of the kernel has to be via the flattened device tree. This removes the btext initialization calls from prom_init() and initializes it instead after the device tree is unflattened. It would be nice to do it earlier, but that needs some more infrastructure to find the properties we need in the flattened device tree. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Fix off-by-one error in prom_init.cPaul Mackerras2005-10-101-1/+1
| | | | | | | This was preventing us from recognizing that we did actually instantiate RTAS successfully on pSeries. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Fix bug caused by negation of 64-bit reloc_offset valuePaul Mackerras2005-10-101-1/+1
| | | | | | | | Although both ppc32 and ppc64 have a reloc_offset function, the ppc64 one produced the opposite sign to the ppc32 one. This standardizes on the ppc32 sign and fixes the merged 64-bit code to account for that. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Make prom_init.c suitable for both 32-bit and 64-bitPaul Mackerras2005-10-101-1/+1
| | | | Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Merge in the ppc64 version of the prom code.Paul Mackerras2005-10-061-0/+2126
This brings in the ppc64 version of prom_init.c, prom.c and btext.c and makes them work for ppc32. This also brings in the new calling convention, where the first entry to the kernel (with r5 != 0) goes to the prom_init code, which then restarts from the beginning (with r5 == 0) after it has done its stuff. For now this also brings in the ppc32 version of setup.c. It also merges lmb.h. Signed-off-by: Paul Mackerras <paulus@samba.org>