Thanks for taking this seriously! And yes, please apply the header, you mentioned, to the
test.
Here's a list of the host and target packages we use for the rootfs and the kernel,
respectively:
Host, rootfs (Linux XXX 3.13.0-78-generic #122-Ubuntu SMP Mon Feb 1 23:11:33 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux):
autoconf-2.69
automake-1.15
binutils-2.24
buildroot-2016.05-git
cmake-3.4.3
fakeroot_1.20.2
gcc-5.3.0
gmp-6.1.0
libtool-2.4.6
m4-1.4.17
mpc-1.0.3
mpfr-3.1.4
pkgconf-0.9.12
xz-5.2.2
Target, rootfs:
busybox-1.24.1
dropbear-2015.71
hiawatha-10.0
iptables-1.6.0
libevent-2.0.22-stable
libfcgi-2.4.0
libupnp-1.6.19
linux-headers-3.14.63
mbedtls-2.2.1
mtd-1.5.2
netsnmp-5.7.3
ntp-4.2.8p6
strace-4.11
uclibc-1.0.12
xz-embedded-20130513
zlib-1.2.8
Host, kernel:
autoconf-2.69
automake-1.15
binutils-2.24
buildroot-2016.05-git
cmake-3.4.3
fakeroot_1.20.2
gcc-5.3.0
gmp-6.1.0
kmod-22
libtool-2.4.6
lz4-r131
lzo-2.09
lzop-1.03
m4-1.4.17
mpc-1.0.3
mpfr-3.1.4
pkgconf-0.9.12
squashfs4.3
xz-5.2.2
zlib-1.2.8
Target, kernel:
linux-headers-3.14.63
mbedtls-2.2.1
uclibc-1.0.12
zlib-1.2.8
And here's a list of selected settings from the .config for the kernel:
CONFIG_MIPS=y
CONFIG_RWSEM_GENERIC_SPINLOCK=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
CONFIG_SCHED_OMIT_FRAME_POINTER=y
CONFIG_BOOT_RAW=y
CONFIG_CEVT_R4K=y
CONFIG_CSRC_R4K=y
CONFIG_DMA_NONCOHERENT=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_CPU_LITTLE_ENDIAN=y
CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
CONFIG_IRQ_CPU=y
CONFIG_MIPS_L1_CACHE_SHIFT=5
CONFIG_CPU_MIPS32_R2=y
CONFIG_SYS_HAS_CPU_MIPS32_R2=y
CONFIG_CPU_MIPS32=y
CONFIG_CPU_MIPSR2=y
CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
CONFIG_HARDWARE_WATCHPOINTS=y
CONFIG_32BIT=y
CONFIG_PAGE_SIZE_4KB=y
CONFIG_FORCE_MAX_ZONEORDER=11
CONFIG_CPU_HAS_PREFETCH=y
CONFIG_CPU_GENERIC_DUMP_TLB=y
CONFIG_CPU_R4K_FPU=y
CONFIG_CPU_R4K_CACHE_TLB=y
CONFIG_MIPS_MT_DISABLED=y
CONFIG_CPU_HAS_SYNC=y
CONFIG_CPU_SUPPORTS_HIGHMEM=y
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_HAVE_MEMBLOCK=y
CONFIG_HAVE_MEMBLOCK_NODE_MAP=y
CONFIG_ARCH_DISCARD_MEMBLOCK=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_COMPACTION=y
CONFIG_MIGRATION=y
CONFIG_ZONE_DMA_FLAG=0
CONFIG_VIRT_TO_BUS=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=4096
CONFIG_CROSS_MEMORY_ATTACH=y
CONFIG_NEED_PER_CPU_KM=y
CONFIG_HZ_250=y
CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
CONFIG_HZ=250
CONFIG_PREEMPT_NONE=y
CONFIG_SECCOMP=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_IRQ_WORK=y
CONFIG_BUILDTIME_EXTABLE_SORT=y
Please don't hesitate to write me, if you need additional info.
Thanks,
René
-----Original Message-----
From: Waldemar Brodkorb [mailto:wbx@uclibc-ng.org]
Sent: 26. april 2016 08:48
To: Rene Nielsen <rene.nielsen(a)microsemi.com>
Cc: Waldemar Brodkorb <wbx(a)uclibc-ng.org>rg>; devel(a)uclibc-ng.org
Subject: Re: [uclibc-ng-devel] memmove() is failing on MIPS CPU
EXTERNAL EMAIL
Hi Rene,
Rene Nielsen wrote,
Thanks for your swift reply, Waldemar!
We're using a flavor of MIPS32r2 called MIPS 24KEc. It's running little-endian
with soft-floats, kernel version 3.14.
I have attached a tiny program (test.c) that fails (see fail.txt) on uClibc v. 1.0.12
without the patch I attached to my previous post.
Reverting to v. 1.0.9 also solves the problem!
It is okay to apply your test with following header:
# Copyright (C) 2016 Rene Nielsen <rene.nielsen(a)microsemi.com> # Licensed under the
LGPL v2.1, see the file COPYING.LIB in this # tarball.
I couldn't reproduce the failure, yet. Tried mips32 little endian with soft-float and
MIPS32r2 in Qemu. binutils 2.25.1/gcc 5.3.0 and Linux Kernel 4.4.6.
Which binutils/gcc version are you using? Do you remove the FPU emulation from the
kernel?
I will try with older Kernels next as I am still unsure how to reproduce the failure.
best regards
Waldemar