From patchwork Fri Oct 2 14:24:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yann Sionneau X-Patchwork-Id: 1375795 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=uclibc-ng.org (client-ip=2a00:1828:2000:679::23; helo=helium.openadk.org; envelope-from=devel-bounces@uclibc-ng.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=quarantine dis=none) header.from=kalray.eu Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=kalray.eu header.i=@kalray.eu header.a=rsa-sha256 header.s=32AE1B44-9502-11E5-BA35-3734643DEF29 header.b=RV6mIrii; dkim-atps=neutral Received: from helium.openadk.org (helium.openadk.org [IPv6:2a00:1828:2000:679::23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4C2sjD4y6Fz9s1t for ; Sat, 3 Oct 2020 00:25:32 +1000 (AEST) Received: from helium.openadk.org (localhost [IPv6:::1]) by helium.openadk.org (Postfix) with ESMTP id 95C4D10350; Fri, 2 Oct 2020 16:25:23 +0200 (CEST) X-Original-To: devel@uclibc-ng.org Delivered-To: devel@helium.openadk.org Received: from mib.mailinblack.com (mib.mailinblack.com [185.7.73.95]) by helium.openadk.org (Postfix) with ESMTPS id 6748110352 for ; Fri, 2 Oct 2020 16:25:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mib.mailinblack.com (Postfix) with ESMTP id DDD0932EDDC for ; Fri, 2 Oct 2020 14:25:19 +0000 (UTC) Received: from mib.mailinblack.com (localhost [127.0.0.1]) by mib.mailinblack.com with SMTP (Mib Daemon ) id KFSCALBT for devel@uclibc-ng.org; Fri, 02 Oct 2020 14:25:19 +0000 (UTC) Received: from zimbra2.kalray.eu (zimbra2.kalray.eu [92.103.151.219]) by mib.mailinblack.com (Postfix) with ESMTPS id 5FF5932EDD5 for ; Fri, 2 Oct 2020 14:25:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 2686827E071F for ; Fri, 2 Oct 2020 16:25:19 +0200 (CEST) Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id TcpSruZebsdU; Fri, 2 Oct 2020 16:25:18 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zimbra2.kalray.eu (Postfix) with ESMTP id 6CF9F27E072A; Fri, 2 Oct 2020 16:25:18 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 zimbra2.kalray.eu 6CF9F27E072A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kalray.eu; s=32AE1B44-9502-11E5-BA35-3734643DEF29; t=1601648718; bh=cwPUn6iprUY8LxVEfFNL0VLLxSoCkBIFKU9z1esrhNI=; h=From:To:Date:Message-Id:MIME-Version; b=RV6mIriiU6WwDG2l8F23EQw3UEcD8t4qK9ryNrZyHOImSMQaCQAeqHKHzZYkBHSkl 4vTxGRExW78G4RULjfYVZH2dzd4NSRdDI/Vs536G6Sx/qZ6pwu9XPq5EMOMqLO3CU+ 8qFyciNt2eQzOM5lo3kO82AgKAD7s6iuTlOcYsy0= X-Virus-Scanned: amavisd-new at zimbra2.kalray.eu Received: from zimbra2.kalray.eu ([127.0.0.1]) by localhost (zimbra2.kalray.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id s91YiXQDi_xf; Fri, 2 Oct 2020 16:25:18 +0200 (CEST) Received: from junon.lin.mbt.kalray.eu (unknown [192.168.37.161]) by zimbra2.kalray.eu (Postfix) with ESMTPSA id 4D32B27E071F; Fri, 2 Oct 2020 16:25:18 +0200 (CEST) From: Yann Sionneau To: devel@uclibc-ng.org Date: Fri, 2 Oct 2020 16:24:54 +0200 Message-Id: <20201002142455.31261-1-ysionneau@kalray.eu> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201001004257.sop6jjc5ir2zrsts@waldemar-brodkorb.de> References: <20201001004257.sop6jjc5ir2zrsts@waldemar-brodkorb.de> MIME-Version: 1.0 Subject: [uclibc-ng-devel] [PATCH 0/1] Support for Kalray KVX architecture X-BeenThere: devel@uclibc-ng.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: uClibc-ng Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devel-bounces@uclibc-ng.org Sender: "devel" This adds support for Kalray kvx arch to uClibc-ng To check that it builds fine you can do: git clone https://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng.git # Apply this patch to uclibc-ng upstream's master branch cd uclibc-ng patch -p1 < path/to/0001-kvx-add-support-for-kvx-arch-to-uClibc-ng.patch cd - git clone https://github.com/kalray/buildroot cd buildroot # The following line forces to use your local copy of patch'ed uClibc-ng # this way you make sure that the patch results in something that builds echo 'UCLIBC_OVERRIDE_SRCDIR = $(TOPDIR)/../uclibc-ng/' > local.mk make kvx_defconfig make Yann Sionneau (1): kvx: add support for kvx arch to uClibc-ng MAINTAINERS | 4 + README | 2 +- Rules.mak | 6 +- extra/Configs/Config.in | 8 + extra/Configs/Config.kvx | 18 ++ extra/Configs/defconfigs/kvx/defconfig | 1 + include/elf.h | 87 ++++- ldso/ldso/kvx/dl-startup.h | 104 ++++++ ldso/ldso/kvx/dl-syscalls.h | 1 + ldso/ldso/kvx/dl-sysdep.h | 99 ++++++ ldso/ldso/kvx/dl-tlsdesc.S | 33 ++ ldso/ldso/kvx/elfinterp.c | 302 ++++++++++++++++++ ldso/ldso/kvx/resolve.S | 17 + libc/string/kvx/Makefile | 13 + libc/string/kvx/memcpy.S | 221 +++++++++++++ libc/string/kvx/memset.S | 146 +++++++++ libc/sysdeps/linux/kvx/Makefile | 13 + libc/sysdeps/linux/kvx/Makefile.arch | 10 + libc/sysdeps/linux/kvx/__longjmp.S | 53 +++ libc/sysdeps/linux/kvx/__syscall_error.c | 19 ++ libc/sysdeps/linux/kvx/bits/atomic.h | 141 ++++++++ libc/sysdeps/linux/kvx/bits/endian.h | 13 + libc/sysdeps/linux/kvx/bits/fcntl.h | 226 +++++++++++++ libc/sysdeps/linux/kvx/bits/fenv.h | 106 ++++++ libc/sysdeps/linux/kvx/bits/kernel_types.h | 42 +++ libc/sysdeps/linux/kvx/bits/posix_types.h | 14 + libc/sysdeps/linux/kvx/bits/sem.h | 84 +++++ libc/sysdeps/linux/kvx/bits/setjmp.h | 46 +++ libc/sysdeps/linux/kvx/bits/stackinfo.h | 29 ++ libc/sysdeps/linux/kvx/bits/statfs.h | 64 ++++ libc/sysdeps/linux/kvx/bits/syscalls.h | 80 +++++ .../linux/kvx/bits/uClibc_arch_features.h | 41 +++ libc/sysdeps/linux/kvx/bits/wordsize.h | 9 + libc/sysdeps/linux/kvx/bsd-_setjmp.S | 18 ++ libc/sysdeps/linux/kvx/bsd-setjmp.S | 17 + libc/sysdeps/linux/kvx/cachectl.c | 15 + libc/sysdeps/linux/kvx/clone.S | 100 ++++++ libc/sysdeps/linux/kvx/crt1.S | 83 +++++ libc/sysdeps/linux/kvx/crti.S | 31 ++ libc/sysdeps/linux/kvx/crtn.S | 33 ++ libc/sysdeps/linux/kvx/jmpbuf-offsets.h | 50 +++ libc/sysdeps/linux/kvx/jmpbuf-unwind.h | 30 ++ libc/sysdeps/linux/kvx/setjmp.S | 59 ++++ libc/sysdeps/linux/kvx/sys/cachectl.h | 21 ++ libc/sysdeps/linux/kvx/sys/procfs.h | 101 ++++++ libc/sysdeps/linux/kvx/sys/ucontext.h | 29 ++ libc/sysdeps/linux/kvx/sys/user.h | 27 ++ libc/sysdeps/linux/kvx/sysdep.h | 49 +++ libc/sysdeps/linux/kvx/vfork.S | 47 +++ libm/kvx/Makefile.arch | 22 ++ libm/kvx/feclearexcept.c | 20 ++ libm/kvx/fegetenv.c | 21 ++ libm/kvx/fegetexceptflag.c | 24 ++ libm/kvx/fegetround.c | 16 + libm/kvx/feholdexcept.c | 26 ++ libm/kvx/feraiseexcept.c | 24 ++ libm/kvx/fesetenv.c | 23 ++ libm/kvx/fesetexceptflag.c | 24 ++ libm/kvx/fesetround.c | 21 ++ libm/kvx/fetestexcept.c | 21 ++ libm/kvx/feupdateenv.c | 24 ++ libpthread/nptl/sysdeps/kvx/Makefile.arch | 9 + libpthread/nptl/sysdeps/kvx/dl-tls.h | 47 +++ libpthread/nptl/sysdeps/kvx/libc-tls.c | 26 ++ .../nptl/sysdeps/kvx/pthread_spin_lock.c | 60 ++++ .../nptl/sysdeps/kvx/pthread_spin_trylock.c | 26 ++ libpthread/nptl/sysdeps/kvx/pthreaddef.h | 26 ++ libpthread/nptl/sysdeps/kvx/tcb-offsets.sym | 6 + libpthread/nptl/sysdeps/kvx/tls.h | 160 ++++++++++ .../nptl/sysdeps/kvx/unwind-forcedunwind.c | 165 ++++++++++ libpthread/nptl/sysdeps/pthread/Makefile.in | 2 + .../nptl/sysdeps/unix/sysv/linux/kvx/Makefile | 13 + .../sysdeps/unix/sysv/linux/kvx/Makefile.arch | 14 + .../unix/sysv/linux/kvx/bits/pthreadtypes.h | 166 ++++++++++ .../unix/sysv/linux/kvx/bits/semaphore.h | 30 ++ .../unix/sysv/linux/kvx/createthread.c | 14 + .../nptl/sysdeps/unix/sysv/linux/kvx/fork.c | 11 + .../unix/sysv/linux/kvx/pthread_once.c | 77 +++++ .../unix/sysv/linux/kvx/sysdep-cancel.h | 43 +++ utils/ldd.c | 5 + 80 files changed, 3925 insertions(+), 3 deletions(-) create mode 100644 extra/Configs/Config.kvx create mode 100644 extra/Configs/defconfigs/kvx/defconfig create mode 100644 ldso/ldso/kvx/dl-startup.h create mode 100644 ldso/ldso/kvx/dl-syscalls.h create mode 100644 ldso/ldso/kvx/dl-sysdep.h create mode 100644 ldso/ldso/kvx/dl-tlsdesc.S create mode 100644 ldso/ldso/kvx/elfinterp.c create mode 100644 ldso/ldso/kvx/resolve.S create mode 100644 libc/string/kvx/Makefile create mode 100644 libc/string/kvx/memcpy.S create mode 100644 libc/string/kvx/memset.S create mode 100644 libc/sysdeps/linux/kvx/Makefile create mode 100644 libc/sysdeps/linux/kvx/Makefile.arch create mode 100644 libc/sysdeps/linux/kvx/__longjmp.S create mode 100644 libc/sysdeps/linux/kvx/__syscall_error.c create mode 100644 libc/sysdeps/linux/kvx/bits/atomic.h create mode 100644 libc/sysdeps/linux/kvx/bits/endian.h create mode 100644 libc/sysdeps/linux/kvx/bits/fcntl.h create mode 100644 libc/sysdeps/linux/kvx/bits/fenv.h create mode 100644 libc/sysdeps/linux/kvx/bits/kernel_types.h create mode 100644 libc/sysdeps/linux/kvx/bits/posix_types.h create mode 100644 libc/sysdeps/linux/kvx/bits/sem.h create mode 100644 libc/sysdeps/linux/kvx/bits/setjmp.h create mode 100644 libc/sysdeps/linux/kvx/bits/stackinfo.h create mode 100644 libc/sysdeps/linux/kvx/bits/statfs.h create mode 100644 libc/sysdeps/linux/kvx/bits/syscalls.h create mode 100644 libc/sysdeps/linux/kvx/bits/uClibc_arch_features.h create mode 100644 libc/sysdeps/linux/kvx/bits/wordsize.h create mode 100644 libc/sysdeps/linux/kvx/bsd-_setjmp.S create mode 100644 libc/sysdeps/linux/kvx/bsd-setjmp.S create mode 100644 libc/sysdeps/linux/kvx/cachectl.c create mode 100644 libc/sysdeps/linux/kvx/clone.S create mode 100644 libc/sysdeps/linux/kvx/crt1.S create mode 100644 libc/sysdeps/linux/kvx/crti.S create mode 100644 libc/sysdeps/linux/kvx/crtn.S create mode 100644 libc/sysdeps/linux/kvx/jmpbuf-offsets.h create mode 100644 libc/sysdeps/linux/kvx/jmpbuf-unwind.h create mode 100644 libc/sysdeps/linux/kvx/setjmp.S create mode 100644 libc/sysdeps/linux/kvx/sys/cachectl.h create mode 100644 libc/sysdeps/linux/kvx/sys/procfs.h create mode 100644 libc/sysdeps/linux/kvx/sys/ucontext.h create mode 100644 libc/sysdeps/linux/kvx/sys/user.h create mode 100644 libc/sysdeps/linux/kvx/sysdep.h create mode 100644 libc/sysdeps/linux/kvx/vfork.S create mode 100644 libm/kvx/Makefile.arch create mode 100644 libm/kvx/feclearexcept.c create mode 100644 libm/kvx/fegetenv.c create mode 100644 libm/kvx/fegetexceptflag.c create mode 100644 libm/kvx/fegetround.c create mode 100644 libm/kvx/feholdexcept.c create mode 100644 libm/kvx/feraiseexcept.c create mode 100644 libm/kvx/fesetenv.c create mode 100644 libm/kvx/fesetexceptflag.c create mode 100644 libm/kvx/fesetround.c create mode 100644 libm/kvx/fetestexcept.c create mode 100644 libm/kvx/feupdateenv.c create mode 100644 libpthread/nptl/sysdeps/kvx/Makefile.arch create mode 100644 libpthread/nptl/sysdeps/kvx/dl-tls.h create mode 100644 libpthread/nptl/sysdeps/kvx/libc-tls.c create mode 100644 libpthread/nptl/sysdeps/kvx/pthread_spin_lock.c create mode 100644 libpthread/nptl/sysdeps/kvx/pthread_spin_trylock.c create mode 100644 libpthread/nptl/sysdeps/kvx/pthreaddef.h create mode 100644 libpthread/nptl/sysdeps/kvx/tcb-offsets.sym create mode 100644 libpthread/nptl/sysdeps/kvx/tls.h create mode 100644 libpthread/nptl/sysdeps/kvx/unwind-forcedunwind.c create mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/kvx/Makefile create mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/kvx/Makefile.arch create mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/kvx/bits/pthreadtypes.h create mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/kvx/bits/semaphore.h create mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/kvx/createthread.c create mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/kvx/fork.c create mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/kvx/pthread_once.c create mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/kvx/sysdep-cancel.h