summaryrefslogtreecommitdiff
path: root/sys/lib
AgeCommit message (Collapse)Author
2021-12-13revert rev 1.4 ("Add garbage instructions at end of kern_assert after vpanic.")chs
that change had no effect because vpanic() is marked __dead / noreturn and thus the compiler would optimize away everything after a call to vpanic(). the original problem has now been fixed differently (but only for x86 so far).
2021-11-24Teach the LLVM-derived unwinder about the DWARF pseudo-registers definedthorpej
by GCC for SuperH for GBR, MACH, MACL, and SR.
2021-11-22Revert unintended commit.thorpej
2021-11-22Gah, fix two typos.thorpej
2021-11-22Teach the LLVM-derived unwinder about the DWARF pseudo-register definedthorpej
by GCC for AArch64 to hold the return address where the signal trampoline will resume.
2021-11-21Teach the LLVM-derived unwinder about the alternate DWARF pseudo-registerthorpej
that GCC defines for the PC / return address. This is simply an alias for the same internal PC register number.
2021-11-21Teach the LLVM-derived unwinder about the DWARF pseudo-register definedthorpej
by GCC for PPC32 to hold the return address where the signal trampoline will resume, as well as for the CTR and XER registers.
2021-11-21Add parenthesesskrll
2021-11-20Teach the LLVM-derived unwinder about the DWARF pseudo-register definedthorpej
by GCC for Alpha to hold the return address where the signal trampoline will resume.
2021-11-20- Teach the LLVM-derived unwinder about the DWARF pseudo-registers definedthorpej
by GCC for MIPS64 to hold the MDHI and MDLO registers, as well as the return address where the signal trampoline will resume. - In the MIPS64 validFloatVectorRegister(), compare against the internal register numbers, not the DWARF register numbers.
2021-11-18- Teach the LLVM-derived unwinder about the DWARF pseudo-registers definedthorpej
by GCC for MIPS to hold the MDHI and MDLO registers, as well as the return address where the signal trampoline will resume. XXX Same treatment is needed for MIPS64, but not done as part of this commit. - In the MIPS validFloatVectorRegister(), compare against the internal register numbers, not the DWARF register numbers.
2021-10-27revert previous: ↵ryo
http://mail-index.netbsd.org/source-changes/2021/10/25/msg133295.html going to add __always_inline to the functions called from _mcount() discussed on http://mail-index.netbsd.org/source-changes-d/2021/10/25/msg013480.html
2021-10-25In some arch, _mcount() would be called recursively when built with COPTS=-O0.ryo
Normally, functions called from mcount.c are expected to be expanded inline, so _mcount() will never be called recursively. But when build with COPTS=-O0, `static inline' functions aren't inlined, and _mcount() will be called recursively. Even if _mcount() has `__attribute__((__no_ instrument_function__))', it has no effect on the calling external (no-inlined) function. To avoid this, PROF.<fn> is added can be set the profiling flag of any file. "PROF.mcount.c" is set to blank by default, mcount.c itself is compiled without -pg.
2021-10-17Only define DEFAULT_TIMEOUT if it is not already defined.jmcneill
2021-09-07Remove banner printing code from bootloaders, add it to libsa.nia
This harmonizes efiboot and the various x86 bootloaders to use shared code for printing the banner. By friendly coincidence, it also adds support for specifying 'banner=' in arm efiboot's boot.cfg, as on x86.
2021-08-17fix multiplei repetitive typos in comments, messages and documentation. ↵andvar
mainly because copy paste code big amount of files are affected.
2021-08-09s/aligment/alignment/ + one more typo fix in comments.andvar
2021-08-09fix typos in asymmetry, asymmetric(al), symmetrical.andvar
2021-07-26Improve previous:rin
- Add suffix ``d'' for mkdep(1). - Improve comment a little...
2021-07-24For evbppc, use C version of memcpy(3), memcmp(3), and memmove(3)rin
consistently for *.{po,pico,go} (for RUMP), in order to avoid alignment faults for 403.
2021-06-16PR port-arm/55897rin
Fix ABI mismatch for armhf runtime routines for floating-point arithmetics; For hard-float arm variants, provide (1) generic runtime routines with correct calling convention, and (2) EABI runtime routines at the same time. I've confirmed that no binary changes for kernels. LGTM by skrll
2021-05-31PR toolchain/55837rin
Stop using enum for flags, as per request from joerg. #define constants and #undef after use.
2021-05-31PR toolchain/55837rin
Bump LAST_REGISTER and LAST_RESTORE_REG to REGNO_ARM32_S31 for arm. There are two numbering schemes for VFPv2 registers: s0-s31 and d0-d15. The former is used by GCC, and the latter is by LLVM. Since libunwind was derived from LLVM, it has never supported the former. This results in crashes for GCC-compiled binaries in exception handler of C++, if it encounters VFPv2 registers when unwinding frames. This commit adds support for s0-s31 numbering to libunwind. I choose an implementation in which VFPv2 registers are ``double-counted'' as s0-s31 AND d0-d15. This does not cause real problems, since the former is only used by GCC, and the later is by LLVM. That is, different numbering schemes cannot appear in a same frame. To make sure, assertions are added in order to check this. I've confirmed that no regression for ATF both for GCC- and LLVM-compiled userlands.
2021-05-31PR toolchain/55837rin
Fix logic error in copyFloatVectorRegister() for arm; copy s0-s31 or d0-d31, not both.
2021-05-31PR toolchain/55837rin
Fix pointer arithmetic when copying s0-s31 registers for arm.
2021-05-31PR toolchain/55837rin
Fix DWARF/internal register numbers of s31 for arm.
2021-05-31PR toolchain/55837rin
Fix for jumpto() armeb; use word-wise load for flags, instead of byte-wise one.
2021-05-31PR toolchain/55837rin
copyFloatVectorRegister(): Assert register number is valid to make sure.
2021-05-31PR toolchain/55837rin
Misc style fixes for clarity: - Rename lazyVFP1() and lazyVFP3() to lazyVFPv2() and lazyVFPv3(), respectively. Note that VFPv1 was obsoleted and replaced by VFPv2. - Introduce enum for flags. - Add few comments. No functional changes.
2021-05-30Add "root" command to provide a BTINFO_ROOTDEVICE parameter.mlelstv
2021-05-27add bi-endian support to the libsa ufs reader and enable it in efiboot.mrg
ffs frontends to "ufs.c" now also define ufs_dinode_swap, ufs_indp_swap, and FS_MAGIC (moved from ufs.c #if segments.) these are used to call the right (32/64 bit) ffsv1/v2 version. ufs.c 'struct file' gains f_swapped member. accessors for d_magic, d_reclen, and d_ino are introduced (they need to be swapped.) sfter reading an inode from disk, read_inode() may call ufs_dinode_swap(). indirect block number and caches may be swapped. error handling in ffs_find_superblock() is cleaned up. (size is slightly reduced on some ports with this part.) defaults for new defines added to ufs.c. (XXX: we build ufs.c but i think all the consumers don't use it, and we can stop building it.) LFS support is not included. add a cut-down copy of ffs_bswap.c from the kernel. also enable bi-endian disklabel support in efiboot. most ports build and sizes compared for platforms that don't enable this code and all but one saw reduced code size. booted several platforms with new boot code.
2021-05-26in getdisklabel() swap the other-endian disklabel, #ifdef LIBSA_DISKLABEL_EImrg
2021-05-21Capture the endianness of the ELF file loaded in 'netbsd_elf_data', thejmcneill
same way we do already for the class in 'netbsd_elf_class'.
2021-05-17move bi-endian disklabel support from the kernel and libsa into libkern.mrg
- dkcksum() and dkcksum_sized() move from subr_disk.c and from libsa into libkern/dkcksum.c (which is missing _sized() version), using the version from usr.sbin/disklabel. - swap_disklabel() moves from subr_disk_mbr.c into libkern, now called disklabel_swap(). (the sh3 version should be updated to use this.) - DISKLABEL_EI becomes a first-class option with opt_disklabel.h. - add libkern.h to libsa/disklabel.c. this enables future work for bi-endian libsa/ufs.c (relevant for ffsv1, ffsv2, lfsv1, and lfsv2), as well as making it possible for ports not using subr_disk_mbr.c to include bi-endian disklabel support (which, afaict, includes any disk on mbr-supporting platforms that do not have an mbr as well as disklabel.) builds successsfully on: alpha, i386, amd64, sun2, sun3, evbarm64, evbarm64-eb, sparc, and sparc64. tested in anita on i386 and sparc, testing in hardware on evbarm64*.
2021-05-12push the FFSv1 superblock code into ffs_find_superblock() andmrg
hide all the ugliness in this function, out of ufs_open(). NFC, objects same size if not identical.
2021-03-26Twiddle also for data transfer for seek.rin
2021-02-28Defer acquiring the FDE lock until after the allocation. This can avoidjoerg
nesting issues between malloc and backtrace when using LSan.
2021-02-23Redo the aarch64 support in libunwind. This included a number of bugsjoerg
starting from returning the wrong value from the constructor to completely bogus offset computations. Drop the ELR support for now.
2021-02-23The return address register entry is the DWARF register. On PowerPC,joerg
this is not the same as the internal encoding, since the Link Register is deliberately non-continous from the other general purpose register values. To handle this, always translate the value into the internal format.
2021-01-25Build strlist.c.thorpej
(Sigh, missed in original commit.)
2021-01-23Fix building in the _STANDALONE case.thorpej
2021-01-21Allow this to be built for the strlist.c unit tests.thorpej
2021-01-21Add a generic set of routines for interacting with OpenFirmware-stylethorpej
string lists.
2021-01-16remove unused "_DIAGNOSTIC" option and opt_diagnostic.h.chs
note that this is unrelated to the widely used "DIAGNOSTIC" option.
2020-12-19Fix previous; define missing lfs_version.rin
2020-12-19ufs_open(): Check fs->lfs_version ifdef LIBSA_*L*FS, not LIBSA_*F*FS.rin
This was harmless for FFS variants, that define LIBSA_FFSv[12], not LIBSA_FFS.
2020-12-04Build x86emu.c with -fno-inline, otherwise all of the auto-inliningthorpej
the compiler does causes stack usage to exceed the limits we've set.
2020-09-29Add a slow twiddle option. This speeds up a pmax netboot by 15% andsimonb
is only 1% slower than no twiddle.
2020-09-28Whitespace alignment nit.simonb
2020-09-13Elf64_Phdr::p_offset is 64 bits, not 32jmcneill