Date: Sat, 3 Mar 2012 02:20:46 +0000 (UTC) From: Nathan Whitehorn <nwhitehorn@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r232432 - stable/9/sys/boot/powerpc/boot1.chrp Message-ID: <201203030220.q232KkMr058591@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: nwhitehorn Date: Sat Mar 3 02:20:46 2012 New Revision: 232432 URL: http://svn.freebsd.org/changeset/base/232432 Log: MFC r231810: Make sure to synchronize icache for the newly loaded loader. Not an issue on most systems, when the relevant icache lines are not full. Modified: stable/9/sys/boot/powerpc/boot1.chrp/Makefile stable/9/sys/boot/powerpc/boot1.chrp/boot1.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/boot/ (props changed) stable/9/sys/boot/powerpc/boot1.chrp/ (props changed) Modified: stable/9/sys/boot/powerpc/boot1.chrp/Makefile ============================================================================== --- stable/9/sys/boot/powerpc/boot1.chrp/Makefile Sat Mar 3 02:19:33 2012 (r232431) +++ stable/9/sys/boot/powerpc/boot1.chrp/Makefile Sat Mar 3 02:20:46 2012 (r232432) @@ -8,17 +8,18 @@ BINDIR?= /boot INSTALLFLAGS= -b FILES= boot1.hfs -SRCS= boot1.c ashldi3.c +SRCS= boot1.c ashldi3.c syncicache.c INTERNALPROG= 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: stable/9/sys/boot/powerpc/boot1.chrp/boot1.c ============================================================================== --- stable/9/sys/boot/powerpc/boot1.chrp/boot1.c Sat Mar 3 02:19:33 2012 (r232431) +++ stable/9/sys/boot/powerpc/boot1.chrp/boot1.c Sat Mar 3 02:20:46 2012 (r232432) @@ -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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201203030220.q232KkMr058591>