Commit graph

39 commits

Author SHA1 Message Date
Warner Losh a2f733abcf lib: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by:		Netflix
2023-11-26 22:23:59 -07:00
Warner Losh 1d386b48a5 Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
2023-08-16 11:54:42 -06:00
Warner Losh 4d846d260e spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.

Discussed with:		pfg
MFC After:		3 days
Sponsored by:		Netflix
2023-05-12 10:44:03 -06:00
Kornel Dulęba 6926e2699a arm: Add support for using VFP in kernel
Add missing logic to allow in-kernel VFP usage for ARMv7 NEON.
The implementation is strongly based on arm64 code.
It introduces a family of fpu_kern_* functions to enable the usage
of VFP instructions in kernel.
Apart from that the existing armv7 VFP logic was modified,
taking into account that the state of the VFP registers can now
be modified in the kernel.

Co-developed by: Wojciech Macek <wma@FreeBSD.org>
Sponsored by:	Stormshield
Obtained from:	Semihalf
Reviewed by:	andrew
Differential Revision: https://reviews.freebsd.org/D37419
2023-02-04 20:21:43 +01:00
Warner Losh cb264bc716 mips: Remove thread_db support
Sponsored by:		Netflix
2021-12-31 00:14:53 -07:00
Warner Losh f33b14f02e Remove libthr, csu, libthread_db and testfloat sparc64 specific directories.
Submitted by:	kib@ (libthr)
2020-02-27 04:44:58 +00:00
Kyle Evans e21f96a811 mips: hide regnum definitions behind _KERNEL/_WANT_MIPS_REGNUM
machine/regnum.h ends up being included by sys/procfs.h and sys/ptrace.h via
machine/reg.h. Many of the regnum definitions are too short and too generic
to be exposing to any userland application including one of these two
headers. Moreover, these actively cause build failures in googletest
(template <typename T1 ...> expanding to template <typename 9 ...>).

Hide the definitions behind _KERNEL or _WANT_MIPS_REGNUM, and patch all of
the userland consumers to define as needed.

Discussed with:	imp, jhb
Reviewed by:	imp, jhb
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D21330
2019-08-22 21:43:21 +00:00
Ruslan Bukin d8af1b6af6 Implement pt_fpreg_to_ucontext(), pt_ucontext_to_fpreg().
Sponsored by:	DARPA, AFRL
2018-08-02 12:24:34 +00:00
Pedro F. Giffuni 5e53a4f90f lib: further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using mis-identified many licenses so this was mostly a manual - error
prone - task.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
2017-11-26 02:00:33 +00:00
Pedro F. Giffuni 8a16b7a18f General further adoption of SPDX licensing ID tags.
Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.
2017-11-20 19:49:47 +00:00
Michal Meloun 6fc9f4dbc8 Preserve VFP state across signal delivery.
We don't have enouch space to store full VFP context within mcontext
stucture. Due to this:
 - follow i386/amd64 way and store VFP state outside of the mcontext_t
   but point to it. Use the size of VFP state structure as an 'magic'
   indicator of the saved VFP state presence.
 - teach set_mcontext() about this external storage.
 - for signal delivery, store VFP state to expanded 'struct sigframe'.

Submited by:	Andrew Gierth (initial version)
PR:		217611
MFC after:	2 weeks
2017-03-26 08:36:56 +00:00
Michal Meloun dfe5f22fd7 Cleanup structures related to VFP and/or mcontext_t.
- in mcontext_t, rename newer used 'union __vfp' to equaly sized 'mc_spare'.
  Space allocated by 'union __vfp' is too small and cannot hold full
  VFP context.
- move structures defined in fp.h to more appropriate headers.
- remove all unused VFP structures.

MFC after:	2 weeks
2017-03-24 11:46:49 +00:00
Ruslan Bukin c9a2d57082 Add the RISC-V MD parts of libthread_db.
Sponsored by:	DARPA, AFRL
Sponsored by:	HEIF5
Differential Revision:	https://reviews.freebsd.org/D5064
2016-01-27 10:34:07 +00:00
Andrew Turner f03b8244b4 Add the arm64 parts of libthread_db.
Differential Revision:	https://reviews.freebsd.org/D2184
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2015-04-01 08:37:50 +00:00
Dimitry Andric c7d7e597b4 Constify a struct savexmm pointer in pt_ucontext_to_fpreg(), to silence
a -Wcast-qual warning from clang 3.6.0.
2015-01-27 18:56:46 +00:00
Marcel Moolenaar e7d939bda2 Remove ia64.
This includes:
o   All directories named *ia64*
o   All files named *ia64*
o   All ia64-specific code guarded by __ia64__
o   All ia64-specific makefile logic
o   Mention of ia64 in comments and documentation

This excludes:
o   Everything under contrib/
o   Everything under crypto/
o   sys/xen/interface
o   sys/sys/elf_common.h

Discussed at: BSDcan
2014-07-07 00:27:09 +00:00
Andrew Turner b013dea54e Ensure we set all fpu registers to zero by using the address and size of
the union over one of its members.
2013-08-17 14:42:40 +00:00
Marius Strobl 85338755c1 Prefix the alias macros for members of struct __mcontext with an underscore
in order to avoid a clash in the net80211 code.
2013-07-12 14:24:52 +00:00
Marius Strobl 70b9a9a9f6 Implement
Reviewed by:	marcel
Approved by:	re (kib)
MFC after:	1 week
2011-08-06 17:50:37 +00:00
Marius Strobl 21a305d4af Use the size of struct fpreg rather than of the pointer to it when copying
the FPU state.

Reviewed by:	marcel
Approved by:	re (kib)
MFC after:	1 week
2011-08-06 17:49:21 +00:00
Nathan Whitehorn b12277d1d4 Repair some build breakage introduced in r211725 and garbage collect some
code made obsolete in the same commit.
2010-08-28 15:03:11 +00:00
Nathan Whitehorn 65801ce52d Powerpc64 thread libraries support. 2010-07-10 15:13:49 +00:00
Attilio Rao 8655c70597 libc_r_* library is no more required, so just axe it.
Approved by:	marcel, emaste
Sponsored by:	Sandvine Incorporated
2009-03-05 18:27:16 +00:00
David E. O'Brien 3337af98b4 Add the needed libpthread_md.c for MIPS.
Obtained from:	Juniper Networks
2008-08-28 15:41:12 +00:00
Marcel Moolenaar f60a5b31c8 Cleanup for WARNS 6. 2008-08-06 03:14:18 +00:00
Marcel Moolenaar 820c1c554f Cleanup for WARNS 3. 2008-07-31 16:26:58 +00:00
Marcel Moolenaar 2f6a179eb9 Cleanup for WARNS 2. 2008-07-31 05:25:52 +00:00
Olivier Houchard ebbcec3ad2 Add arm support in libthread_db. 2007-11-17 21:27:53 +00:00
Xin LI ec5430045b Include string.h for memcpy() and memcmp(). 2007-05-25 13:43:14 +00:00
Marcel Moolenaar 85999a0155 Roughly implement libpthread support. 2007-05-01 18:28:08 +00:00
Ruslan Ermilov 2d05c776ef Remove alpha-specific stuff. 2006-08-23 12:12:56 +00:00
Marcel Moolenaar e4e9813eb9 Add stub functions. This allows libthread_db to be built and installed,
which means that we also have <thread_db.h>.
2006-08-04 17:55:55 +00:00
Doug Rabson 8d7681bb7f Add support for XMM registers in GDB for x86 processors that support
SSE (or its successors).

Reviewed by: marcel, davidxu
MFC After: 2 weeks
2005-05-31 09:43:04 +00:00
David Xu 6cc695d3b2 Add code to implement register structure converter. 2004-08-01 02:08:39 +00:00
Marcel Moolenaar c465e9a1f0 prgregset_t changed type from being a typedef of struct reg to an
array of one element of type struct reg. Change the argument to
libc_r_md_getgregs() accordingly.
2004-07-19 16:54:52 +00:00
Marcel Moolenaar a7092d3091 Correct the mess I made by committing from the wrong tree. Most
notably, this restores some of the contents in thread_db.h as well
as David Xu's copyright notice. This also fixes the includes in
the MD libpthread files which Scott tried to provide a quick fix
for.

Pointy hat: marcel
2004-07-18 19:29:38 +00:00
Scott Long 7a76c247bd Try to fix ia64 and alpha compiles. I don't have either equipment fired
up now, but it appears to be the same problem and solution as sparc64.
2004-07-18 15:24:37 +00:00
Scott Long 4bfe920594 Add missing #includes so that this can compile. Obtained from the i386 version. 2004-07-18 15:20:03 +00:00
Marcel Moolenaar 3c1e38ea6e Add rudimentary support and stubs for libthr and libc_r on alpha, amd64,
i386, ia64 and sparc64. Add stubs for alpha, amd64, ia64 and sparc64 for
libpthread.

Restructure the source files to avoid unnecessary use of subdirectories
that also force us to use non-portable compilation flags to deal with
the uncommon compilation requirements (building archive libraries for
linkage into a shared library).

The libpthread support has been copied from the original local and
cleaned-up to make them WARNS=2 clean.
that also force us to use non-portable compilation flags to deal with
the uncommon compilation requirements (building archive libraries for
linkage into a shared library).

The libpthread support has been copied from the original local and
cleaned-up to make them WARNS=2 clean.

Tested on: amd64, i386, ia64
2004-07-18 04:17:15 +00:00