From: <aot...@us...> - 2004-04-24 18:32:23
|
Update of /cvsroot/gc-linux/linux/arch/ppc/boot/simple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24035/arch/ppc/boot/simple Modified Files: Makefile head.S Log Message: Merged 2.6.5 Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/boot/simple/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile 18 Feb 2004 20:01:57 -0000 1.4 +++ Makefile 24 Apr 2004 18:31:43 -0000 1.5 @@ -26,11 +26,12 @@ utils := $(boot)/utils bootlib := $(boot)/lib images := $(boot)/images +of1275 := $(boot)/of1275 tftpboot := /tftpboot # Normally, we use the 'misc.c' file for decompress_kernel and # whatnot. Sometimes we need to override this however. -misc-y := misc.o ../common/bootinfo.o +misc-y := misc.o # Normally, we have our images end in .elf, but something we want to # change this. @@ -89,6 +90,7 @@ # Overrides previous assingment extra.o-$(CONFIG_PPLUS) := legacy.o + extra.o-$(CONFIG_LOPEC) := mpc10x_memory.o zimage-$(pcore) := zImage-STRIPELF zimageinitrd-$(pcore) := zImage.initrd-STRIPELF @@ -96,6 +98,12 @@ end-$(pcore) := pcore cacheflag-$(pcore) := -include $(clear_L2_L3) + zimage-$(CONFIG_PPC_PREP) := zImage-PPLUS +zimageinitrd-$(CONFIG_PPC_PREP) := zImage.initrd-PPLUS + extra.o-$(CONFIG_PPC_PREP) := legacy.o + misc-$(CONFIG_PPC_PREP) += misc-prep.o mpc10x_memory.o + end-$(CONFIG_PPC_PREP) := prep + end-$(CONFIG_SANDPOINT) := sandpoint cacheflag-$(CONFIG_SANDPOINT) := -include $(clear_L2_L3) @@ -106,7 +114,7 @@ misc-$(CONFIG_SPRUCE) += misc-spruce.o # SMP images should have a '.smp' suffix. - end-$(CONFIG_SMP) += .smp + end-$(CONFIG_SMP) := $(end-y).smp # This is a treeboot that needs init functions until the # boot rom is sorted out (i.e. this is short lived) @@ -139,6 +147,9 @@ endif LIBS := $(common)/lib.a $(bootlib)/lib.a +ifeq ($(CONFIG_PPC_PREP),y) +LIBS += $(of1275)/lib.a +endif OBJS := $(addprefix $(obj)/,$(boot-y)) @@ -200,10 +211,10 @@ $(MKTREE) $(obj)/zvmlinux.initrd $(images)/zImage.initrd.$(end-y) \ $(ENTRYPOINT) -$(images)/zImage-PPLUS: $(obj)/zvmlinux $(MKPREP) $(MKBUGBOOT) - $(MKPREP) -pbp $(obj)/zvmlinux $(images)/zImage.pplus +$(images)/zImage-PPLUS: $(obj)/zvmlinux $(utils)/mkprep $(MKBUGBOOT) + $(MKPREP) -pbp $(obj)/zvmlinux $(images)/zImage.$(end-y) $(MKBUGBOOT) $(obj)/zvmlinux $(images)/zImage.bugboot -$(images)/zImage.initrd-PPLUS: $(obj)/zvmlinux.initrd $(MKPREP) $(MKBUGBOOT) - $(MKPREP) -pbp $(obj)/zvmlinux.initrd $(images)/zImage.initrd.pplus +$(images)/zImage.initrd-PPLUS: $(obj)/zvmlinux.initrd $(utils)/mkprep $(MKBUGBOOT) + $(MKPREP) -pbp $(obj)/zvmlinux.initrd $(images)/zImage.initrd.$(end-y) $(MKBUGBOOT) $(obj)/zvmlinux.initrd $(images)/zImage.initrd.bugboot Index: head.S =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/boot/simple/head.S,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- head.S 23 Jan 2004 03:26:19 -0000 1.1.1.1 +++ head.S 24 Apr 2004 18:31:43 -0000 1.2 @@ -7,7 +7,7 @@ * tr...@mv... * Derived from arch/ppc/boot/prep/head.S (Cort Dougan, many others). * - * 2001-2003 (c) MontaVista, Software, Inc. This file is licensed under + * 2001-2004 (c) MontaVista, Software, Inc. This file is licensed under * the terms of the GNU General Public License version 2. This program * is licensed "as is" without any warranty of any kind, whether express * or implied. @@ -57,10 +57,11 @@ isync #endif -#if defined(CONFIG_MBX) || defined(CONFIG_RPX6) +#if defined(CONFIG_MBX) || defined(CONFIG_RPX6) || defined(CONFIG_PPC_PREP) mr r29,r3 /* On the MBX860, r3 is the board info pointer. - * On the RPXSUPER, r3 points to the - * NVRAM configuration keys. + * On the RPXSUPER, r3 points to the NVRAM + * configuration keys. + * On PReP, r3 is the pointer to the residual data. */ #endif @@ -76,9 +77,39 @@ stw r5, 0x2024(r4) #endif #ifdef CONFIG_6xx + /* On PReP we must look at the OpenFirmware pointer and sanity + * test it. On other platforms, we disable the MMU right now + * and other bits. + */ +#ifdef CONFIG_PPC_PREP +/* + * Save the OF pointer to r25, but only if the entry point is in a sane + * location; if not we store 0. If there is no entry point, or it is + * invalid, we establish the default MSR value immediately. Otherwise, + * we defer doing that, to allow OF functions to be called, until we + * begin uncompressing the kernel. + */ + lis r8,0x0fff /* r8 = 0x0fffffff */ + ori r8,r8,0xffff + + subc r8,r8,r5 /* r8 = (r5 <= r8) ? ~0 : 0 */ + subfe r8,r8,r8 + nand r8,r8,r8 + + and. r5,r5,r8 /* r5 will be cleared if (r5 > r8) */ + bne+ haveOF + + li r8,MSR_IP|MSR_FP /* Not OF: set MSR immediately */ + mtmsr r8 + isync +haveOF: + mr r25,r5 +#else bl disable_6xx_mmu +#endif #ifndef CONFIG_GAMECUBE bl disable_6xx_l1cache + CLEAR_CACHES #endif #endif @@ -107,7 +138,7 @@ mr r3, r29 #endif -#if defined(CONFIG_MBX) || defined(CONFIG_RPX6) +#if defined(CONFIG_MBX) || defined(CONFIG_RPX6) || defined(CONFIG_PPC_PREP) mr r4,r29 /* put the board info pointer where the relocate * routine will find it */ @@ -120,7 +151,6 @@ /* Get the load address. */ - #ifdef CONFIG_GAMECUBE clrlwi r3, r3, 3 #endif |