MFC r345703:Fix initial exec TLS mode for dynamically loaded shared objects.
Fix setjmp for RISC-V:o The correct value for _JB_SIGMASK is 27.o The storage size for double-precision floating point register is 8 bytes.Submitted by: "James Clarke" <[email protected]>Reviewe
Fix setjmp for RISC-V:o The correct value for _JB_SIGMASK is 27.o The storage size for double-precision floating point register is 8 bytes.Submitted by: "James Clarke" <[email protected]>Reviewed by: markj@Sponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D16344
show more ...
Reimplement brk() and sbrk() to avoid the use of _end.Previously, libc.so would initialize its notion of the break addressusing _end, a special symbol emitted by the static linker followingthe bs
Reimplement brk() and sbrk() to avoid the use of _end.Previously, libc.so would initialize its notion of the break addressusing _end, a special symbol emitted by the static linker followingthe bss section. Compatibility issues between lld and ld.bfd couldcause the wrong definition of _end (libc.so's definition rather thanthat of the executable) to be used, breaking the brk()/sbrk()interface.Avoid this problem and future interoperability issues by simply notrelying on _end. Instead, modify the break() system call to returnthe kernel's view of the current break address, and have libcinitialize its state using an extra syscall upon the first use of theinterface. As a side effect, this appears to fix brk()/sbrk() usagein executables run with rtld direct exec, since the kernel and libc.sono longer maintain separate views of the process' break address.PR: 228574Reviewed by: kib (previous version)MFC after: 2 monthsDifferential Revision: https://reviews.freebsd.org/D15663
Don't export _end on arm64 and riscv.These platforms don't support brk() and sbrk(), which are the reasonfor exporting _end in the first place.MFC after: 1 week
Replace SOFTFLOAT with __riscv_float_abi_*.With SOFTFLOAT, libc and libm were built correctly, but any programincluding fenv.h itself assumed it was on a hardfloat systen and emittedinline fpu in
Replace SOFTFLOAT with __riscv_float_abi_*.With SOFTFLOAT, libc and libm were built correctly, but any programincluding fenv.h itself assumed it was on a hardfloat systen and emittedinline fpu instructions for fedisableexcept() and friends.Unlike r315424 which did this for MIPS, I've used riscv_float_abi_softand riscv_float_abi_double macros as appropriate rather than using__riscv_float_abi_soft exclusively. This ensures that attempts to use anunsupported hardfloat ABI will fail.Reviewed by: brSponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D10039
Remove architecture specific shmat.S files.These files are identical to the generated system calls.In the case of MIPS, the file was already disconnected from the build.Submitted by: Ali Mashtiz
Remove architecture specific shmat.S files.These files are identical to the generated system calls.In the case of MIPS, the file was already disconnected from the build.Submitted by: Ali Mashtizadeh <[email protected]>Reviewed by: kibDifferential Revision: https://reviews.freebsd.org/D14976
Remove architecture specific sigreturn.S files.All of these files are identical (modulo license blocks and VCS IDs) tothe files generated by lib/libc/sys/Makefile.inc and serve no purpose.Report
Remove architecture specific sigreturn.S files.All of these files are identical (modulo license blocks and VCS IDs) tothe files generated by lib/libc/sys/Makefile.inc and serve no purpose.Reported by: Ali Mashtizadeh <[email protected]>Reviewed by: kibSponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D14953
Move softfloat symbol map entries to softfloat/Symbol.map.The arm, mips, and riscv MD Symbol.map files listed some (but not all)of the softfloat symbols that were actually defined in softfloat.c.
Move softfloat symbol map entries to softfloat/Symbol.map.The arm, mips, and riscv MD Symbol.map files listed some (but not all)of the softfloat symbols that were actually defined in softfloat.c.While here, also remove entries for __fixuns[sd]fsi which are providedby libcompiler_rt and not by libc.Sponsored by: DARPA / AFRL
Support for v1.10 (latest) of RISC-V privilege specification.New version is not compatible on supervisor mode with v1.9.1(previous version).Highlights: o BBL (Berkeley Boot Loader) provides
Support for v1.10 (latest) of RISC-V privilege specification.New version is not compatible on supervisor mode with v1.9.1(previous version).Highlights: o BBL (Berkeley Boot Loader) provides no initial page tables anymore allowing us to choose VM, to build page tables manually and enable MMU in S-mode. o SBI interface changed. o GENERIC kernel. FDT is now chosen standard for RISC-V hardware description. DTB is now provided by Spike (golden model simulator). This allows us to introduce GENERIC kernel. However, description for console and timer devices is not provided in DTB, so move these devices temporary to nexus bus. o Supervisor can't access userspace by default. Solution is to set SUM (permit Supervisor User Memory access) bit in sstatus register. o Compressed extension is now turned on by default. o External GCC 7.1 compiler used. o _gp renamed to __global_pointer$ o Compiler -march= string is now in use allowing us to choose required extensions (compressed, FPU, atomic, etc).Sponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D11800
Use unconditional jr (jump register) so cerror relocation offset fits.This fixes libc build on riscv64sf.Reviewed by: jhbSponsored by: DARPA, AFRL
Correct an misunderstanding of MDSRCS.MDSRCS it intended to allow assembly versions of funtions with Cimplementations listed in MISRCS. The selection of the correctmachdep_ldis?.c for a given arc
Correct an misunderstanding of MDSRCS.MDSRCS it intended to allow assembly versions of funtions with Cimplementations listed in MISRCS. The selection of the correctmachdep_ldis?.c for a given architecture does not follow this patternand the file should be added to SRCS directly.Reviewed by: emaste, imp, jhbMFC after: 1 weekSponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D9841
Add full softfloat and hardfloat support for RISC-V.Hardfloat is now default (use riscv64sf as TARGET_ARCHfor softfloat).Sponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.
Add full softfloat and hardfloat support for RISC-V.Hardfloat is now default (use riscv64sf as TARGET_ARCHfor softfloat).Sponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D8529
Reduce duplicate NOASM and PSEUDO definitionsThe initial value of NOASM is nearly the same in all cases and theinitial value of PSEUDO is the same in all cases so reduce duplication(and hopefully
Reduce duplicate NOASM and PSEUDO definitionsThe initial value of NOASM is nearly the same in all cases and theinitial value of PSEUDO is the same in all cases so reduce duplication(and hopefully, future merge conflicts) by machine independent defaults.Also document the PSEUDO variable.Reviewed by: jhb, kibObtained from: CheriBSDSponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D7820
Remove unusedd and obsolete openbsd_poll system call. (Phase 1)Reported by: brooksReviewed by: brooks,jhbDifferential Revision: https://reviews.freebsd.org/D7548
Replace use of the pipe(2) system call with pipe2(2) with a zero flagsvalue.This eliminates the need for machine dependant assembly wrappers forpipe(2).It also make passing an invalid address t
Replace use of the pipe(2) system call with pipe2(2) with a zero flagsvalue.This eliminates the need for machine dependant assembly wrappers forpipe(2).It also make passing an invalid address to pipe(2) return EFAULT ratherthan triggering a segfault. Document this behavior (which was alreadytrue for pipe2(2), but undocumented).Reviewed by: andrewApproved by: re (gjb)Sponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D6815
Do not generate code for sbrk syscall -- sbrk support was removed.Pointed out by: andrew
Remove legacy brk and sbrk from RISC-V.Discussed with: andrewSponsored by: DARPA, AFRLSponsored by: HEIF5
libc: stop exporting curbrk and minbrk in the private namespaceThey are not used anywhere else in the base system and are an internalimplementation detail that does not need to be exposed.Review
libc: stop exporting curbrk and minbrk in the private namespaceThey are not used anywhere else in the base system and are an internalimplementation detail that does not need to be exposed.Reviewed by: kibSponsored by: The FreeBSD FoundationDifferential Revision: https://reviews.freebsd.org/D5728
Bring in initial libc and libstand support for RISC-V.Reviewed by: andrew, emaste, kibSponsored by: DARPA, AFRLSponsored by: HEIF5Differential Revision: https://reviews.freebsd.org/D4943
Start support for the RISC-V 64-bit architecture developed by UC Berkeley.RISC-V is a new ISA designed to support computer research and education, andis now become a standard open architecture for
Start support for the RISC-V 64-bit architecture developed by UC Berkeley.RISC-V is a new ISA designed to support computer research and education, andis now become a standard open architecture for industry implementations.This is a minimal set of changes required to run 'make kernel-toolchain'using external (GNU) toolchain.The FreeBSD/RISC-V project home: https://wiki.freebsd.org/riscv.Reviewed by: andrew, bdrewery, emaste, impSponsored by: DARPA, AFRLSponsored by: HEIF5Differential Revision: https://reviews.freebsd.org/D4445