Author: nwhitehorn
Date: Thu Feb 16 03:27:38 2012
New Revision: 231810
URL: http://svn.freebsd.org/changeset/base/231810

Log:
  Make sure to synchronize icache for the newly loaded loader. Not an issue
  on most systems, when the relevant icache lines are not full.
  
  MFC after:    2 weeks

Modified:
  head/sys/boot/powerpc/boot1.chrp/Makefile
  head/sys/boot/powerpc/boot1.chrp/boot1.c

Modified: head/sys/boot/powerpc/boot1.chrp/Makefile
==============================================================================
--- head/sys/boot/powerpc/boot1.chrp/Makefile   Thu Feb 16 03:18:28 2012        
(r231809)
+++ head/sys/boot/powerpc/boot1.chrp/Makefile   Thu Feb 16 03:27:38 2012        
(r231810)
@@ -8,16 +8,17 @@ BINDIR?=        /boot
 INSTALLFLAGS=   -b
 
 FILES=         boot1.hfs
-SRCS=          boot1.c ashldi3.c
+SRCS=          boot1.c ashldi3.c syncicache.c
 
 NO_MAN=
 
 CFLAGS= -ffreestanding -msoft-float -Os \
-       -I${.CURDIR}/../../common -I${.CURDIR}/../../../
+       -I${.CURDIR}/../../common -I${.CURDIR}/../../../ \
+       -D_STANDALONE
 LDFLAGS=-nostdlib -static -N
 
 .include "${.CURDIR}/../Makefile.inc"
-.PATH:  ${.CURDIR}/../../../libkern ${.CURDIR}
+.PATH:  ${.CURDIR}/../../../libkern 
${.CURDIR}/../../../../lib/libc/powerpc/gen ${.CURDIR}
 
 # The following inserts out objects into a template HFS 
 # created by generate-hfs.sh

Modified: head/sys/boot/powerpc/boot1.chrp/boot1.c
==============================================================================
--- head/sys/boot/powerpc/boot1.chrp/boot1.c    Thu Feb 16 03:18:28 2012        
(r231809)
+++ head/sys/boot/powerpc/boot1.chrp/boot1.c    Thu Feb 16 03:27:38 2012        
(r231810)
@@ -77,6 +77,8 @@ static int __sputc(char c, void *arg);
 static char *__uitoa(char *buf, u_int val, int base);
 static char *__ultoa(char *buf, u_long val, int base);
 
+void __syncicache(void *, int);
+
 /*
  * Open Firmware interface functions
  */
@@ -523,6 +525,7 @@ load(const char *fname)
                }
                if (ph.p_filesz != ph.p_memsz)
                        bzero(p + ph.p_filesz, ph.p_memsz - ph.p_filesz);
+               __syncicache(p, ph.p_memsz);
        }
        ofw_close(bootdev);
        (*(void (*)(void *, int, ofwfp_t, char *, int))eh.e_entry)(NULL, 0, 
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to