aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/boot/main.c
Commit message (Collapse)AuthorAgeFilesLines
* [POWERPC] Cleanup zImage handling of kernel entry with flat device treeDavid Gibson2006-12-041-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes 2 changes to clean up the flat device tree handling logic in the zImage wrapper. First, there were two callbacks from the dt_ops structure used for producing a final flat tree to pass to the kerne: dt_ops.ft_pack() which packed the flat tree (possibly a no-op) and dt_ops.ft_addr() which retreived the address of the final blob. Since they were only ever called together, this patch combines the two into a single new callback, dt_ops.finalize(). This new callback does whatever platform-dependent things are necessary to produce a final flat device tree blob, and returns the blob's addres. Second, the current logic calls the kernel with a flat device tree if one is build into the zImage wrapper, otherwise it boots the kernel with a PROM pointer, expecting the kernel to copy the OF device tree itself. This approach precludes the possibility of the platform wrapper code building a flat device tree from whatever platform-specific information firmware provides. Thus, this patch takes the more sensible approach of invoking the kernel with a flat tree if the dt_ops.finalize callback provides one (by whatever means). So, the dt_ops.finalize callback can be NULL, or can be a function which returns NULL. In either case, the zImage wrapper logic assumes that this is a platform with OF and invokes the kernel accordingly. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Small clarification of initrd handlingDavid Gibson2006-12-041-7/+14
| | | | | | | | | | | | | | | | | This patch makes the handling of the initrd (or initramfs) in the zImage wrapper a little easier to follow. Instead of passing the initrd addresses out from prep_kernel() via the cryptic a1 and a2 parameters, use the global struct add_range, 'initrd'. prep_kernel() already passes information through the 'vmlinux' addr_range struct, so this seems like a reasonable extension. Some comments also clarify the logic with prep_kernel(): we use an initrd included in the zImage if present, otherwise we use an initrd passed in by the bootloader in the a1 and a2 parameters (yaboot, at least, uses this mechanism to pass an initrd). Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] More bootwrapper reorganizationMark A. Greer2006-10-181-21/+6
| | | | | | | | | | | | | More reorganization of the bootwrapper: - Add dtb section to zImage - ft_init now called by platform_init - Pack a flat dt before calling kernel - Remove size parameter from free - printf only calls console_ops.write it its not NULL - Some cleanup Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Start arch/powerpc/boot code reorganizationMark A. Greer2006-09-201-121/+129
| | | | | | | | | | | | | | | This abstracts the operations used in the bootwrapper, and defines the operations needed for the bootwrapper to run on an OF platform. The operations have been divided up into platform ops (platform_ops), firmware ops (fw_ops), device tree ops (dt_ops), and console ops (console_ops). The proper operations will be hooked up at runtime to provide the functionality that you need. Signed-off-by: Mark A. Greer <mgreer@mvista.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Editable kernel command-line in zImage binary.mostrows@watson.ibm.com2006-06-151-0/+27
| | | | | | | | | | | zImage will set /chosen/bootargs (if it is otherwise empty) with the contents of a buffer in the section "__builtin_cmdline". This permits tools to edit zImage binaries to set the command-line eventually processed by vmlinux. -- Signed-off-by: Michal Ostrowski <mostrows@watson.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [PATCH] powerpc: remove check for ELF offset in powerpc bootimageOlaf Hering2006-02-071-2/+2
| | | | | | | Do not check for offset, it is always set. Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Make COFF zImages for old 32-bit powermacsPaul Mackerras2006-01-141-24/+22
| | | | | | | | | This adds code to build zImage.coff and/or zImage.initrd.coff when CONFIG_PPC32 and CONFIG_PPC_PMAC are defined. It also restructures the OF client code and adds some workarounds for OF quirks on the older machines. Signed-off-by: Paul Mackerras <paulus@samba.org>
* powerpc: Move ppc64 boot wrapper code over to arch/powerpcPaul Mackerras2005-11-161-0/+321
This also extends the code to handle 32-bit ELF vmlinux files as well as 64-bit ones. This is sufficient for booting on new-world 32-bit powermacs (i.e. all recent machines). Signed-off-by: Paul Mackerras <paulus@samba.org>