This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

powerpc 860 and glibc sysdeps/powerpc/power3/memset.S: CPU15 "dcbX" errata


I am working on a powerpc 860 toolchain, but I am having problems convincing glibc to not emit code that uses the dcbz instruction (CPU15 dcbX bug). The source of the problem is sysdeps/powerpc/power3/memset.S

in crosstool, we had something like this:

Index: crosstool.sh
===================================================================
--- crosstool.sh	(.../vendor/crosstool/current)	(revision 6652)
+++ crosstool.sh	(.../trunk/tools/crosstool)	(revision 6652)
@@ -529,6 +529,11 @@
	export libc_cv_forced_unwind libc_cv_c_cleanup
    fi

+    case ${TARGET} in
+       # remove inline asm powerpc memset, which is broken for 8xx
+        powerpc-8* ) rm -f ${GLIBC_DIR}/sysdeps/powerpc/powerpc32/memset.S ;;
+    esac
+
    BUILD_CC=gcc CFLAGS="$TARGET_CFLAGS $EXTRA_TARGET_CFLAGS" CC="${TARGET}-gcc $GLIBC_EXTRA_CC_ARGS" \
    AR=${TARGET}-ar RANLIB=${TARGET}-ranlib \
        ${GLIBC_DIR}/configure --prefix=/usr \

but i dont know what the proper place is to put the equivalent in crosstool-ng

see also my crosstool patch here

http://sourceware.org/ml/crossgcc/2006-12/msg00057.html

and a discussion of the CPU15 errata here

http://mlblog.osdir.com/linux.ports.ppc.embedded/2005-04/index.shtml

It is worth noting that according to freescale, dcbi, dcibst, dcbf, and icbi are similarly affected, whch means sysdeps/powerpc/powerpc32/dl-machine.c might also cause problems, since it uses dcbst and icbi.

the glibc maintainers seem aware of the problem, but don't seem to think anybody uses glibc with the 860 series. wolfgang denk is also apparently doing his own workarounds for the toolchains he builds for eldk.




-- For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]