Skip to content

Commit

Permalink
[PATCH] powerpc: Add back support for booting from BootX (#2)
Browse files Browse the repository at this point in the history
ARCH=powerpc couldn't boot from BootX as it uses a "different" way of
getting in the kernel. This patch adds the necessary trampolines,
creating a flattened device-tree from the tree passed from MacOS, and
initializing the btext engine early for really-early debugging.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Benjamin Herrenschmidt authored and Paul Mackerras committed Jan 9, 2006
1 parent 51d3082 commit d7f3945
Show file tree
Hide file tree
Showing 4 changed files with 729 additions and 0 deletions.
13 changes: 13 additions & 0 deletions arch/powerpc/kernel/head_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,19 @@ __start:
bl prom_init
trap

/*
* Check for BootX signature when supporting PowerMac and branch to
* appropriate trampoline if it's present
*/
#ifdef CONFIG_PPC_PMAC
1: lis r31,0x426f
ori r31,r31,0x6f58
cmpw 0,r3,r31
bne 1f
bl bootx_init
trap
#endif /* CONFIG_PPC_PMAC */

1: mr r31,r3 /* save parameters */
mr r30,r4
li r24,0 /* cpu # */
Expand Down
3 changes: 3 additions & 0 deletions arch/powerpc/platforms/powermac/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
CFLAGS_bootx_init.o += -fPIC

obj-y += pic.o setup.o time.o feature.o pci.o \
sleep.o low_i2c.o cache.o
obj-$(CONFIG_PMAC_BACKLIGHT) += backlight.o
Expand All @@ -6,5 +8,6 @@ obj-$(CONFIG_CPU_FREQ_PMAC64) += cpufreq_64.o
obj-$(CONFIG_NVRAM) += nvram.o
# ppc64 pmac doesn't define CONFIG_NVRAM but needs nvram stuff
obj-$(CONFIG_PPC64) += nvram.o
obj-$(CONFIG_PPC32) += bootx_init.o
obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_PPC_MERGE) += udbg_scc.o udbg_adb.o
Loading

0 comments on commit d7f3945

Please sign in to comment.