summaryrefslogtreecommitdiff
path: root/sys/lib
AgeCommit message (Collapse)Author
2023-06-14Add /* FALLTHROUGH */ comment for sure.rin
2023-05-29libsa/printf: Do not fetch long va_arg as long long.rin
This does real harm iff all of the following conditions are satisfied: (1) On ILP32 architectures. (2) Both LIBSA_PRINTF_LONGLONG_SUPPORT and LIBSA_PRINTF_WIDTH_SUPPORT compile-time options are enabled. (3) Width field is used with 'l' modifier. This is an implicit-fallthrough bug, but unfortunately, GCC 10.4 cannot find this out somehow... XXX Pull up to netbsd-10 and netbsd-9. netbsd-8 is not affected.
2022-12-01fix clang buildchristos
2022-11-17Restore backward compatibility of UFS2 with previous NetBSD releases bychs
disabling support in UFS2 for extended attributes (including ACLs). Add a new variant of UFS2 called "UFS2ea" that does support extended attributes. Add new fsck_ffs operations "-c ea" and "-c no-ea" to convert file systems from UFS2 to UFS2ea and vice-versa (both of which delete all existing extended attributes in the process).
2022-08-07Consistently use ntohs() instead of htons() when converting fromrin
network to host byte order. No binary changes both for big and little endian.
2022-07-08alredy -> alreadyskrll
2022-06-27Fix editing mishap, should fix the buildmartin
2022-06-26Teach the LLVM-derived unwinder about the DWARF pseudo-registers definedskrll
by GCC for HPPA to hold the return address where the signal trampoline will resume. XXX Same treatment is needed for HPPA64, but not done as part of this commit. Thanks to thorpej for help with this. (ages ago)
2022-06-19libkern: fix wrong escaping in makefilerillig
In the unlikely event that KERNDIR contains a '$' character, that '$' should not be doubled to '$$'. It only needs the usual shell quoting.
2022-06-15Fix a dumb typo/thinkoskrll
Thanks to Tom Lane for spotting it.
2022-06-13Provide a __canonicalize_funcptr_for_compare which only needs to returnskrll
the passed value as the kernel doesn't do PLABELS. PR/56878 (hppa: kernel module lua fails to load)
2022-06-13Don't need $$sh_func_adrsskrll
2022-05-30Restrict strictly-aligned versions of memcmp(9), memcpy(9), andrin
memmove(9) to 403, instead of all evbppc machines. Introduce strict-align LIBKERN_MD_FLAGS for this purpose.
2022-05-30Introduce LIBKERN_MD_FLAGS to pass some MD flags for libkern.rin
This is necessary since libkern is built by coprocess, and threfore subsets of make(1) variables are passed.
2022-04-30Now, NULL is always defined correctly, as we include <sys/param.h> above.rin
2022-04-29Re-introduce SA_HARDCODED_SECSIZE hack, by which hardcoded DEV_BSIZE isrin
used instead of secsize obtained by SAIOSECSIZE ioctl. This hack avoids divdi3 and friends from being linked, in order to support variable secsize for some archs. Should be useful for ancient archs, for which secsize is fixed. Thanks christos@ for comment.
2022-04-27Revert previous at the moment.rin
This is wrong reasoning; 68020 and above (incl. 040 and 060) support 32-bit displacements for PC relative addressing (via "fully extension addressing mode" with null index register). I've still not figured out what goes wrong with amiga/boot(8) when compiled without -l option for gas(1)... On 2022/04/27 20:48, Rin Okuyama wrote: > Module Name: src > Committed By: rin > Date: Wed Apr 27 11:48:26 UTC 2022 > > Modified Files: > src/sys/lib/libsa: ext2fs.c minixfs3.c stand.h ufs.c > > Log Message: > Introduce SA_HARDCODED_SECSIZE hack, by which hardcoded DEV_BSIZE is > used instead of secsize obtained by SAIOSECSIZE ioctl. > > This hack avoids divdi3 and friends from being linked, in order to > support variable secsize. > > This is useful for amiga/boot(8); it is loaded by firmware into > unpredictable address, and therefore all symbols should be > addressable by PC relative mode with only 16-bit displacements. > > See sys/arch/amiga/stand/bootblock/{boot/bbstart.s,elf2bb,txlt} for > more details. > > > To generate a diff of this commit: > cvs rdiff -u -r1.31 -r1.32 src/sys/lib/libsa/ext2fs.c > cvs rdiff -u -r1.10 -r1.11 src/sys/lib/libsa/minixfs3.c > cvs rdiff -u -r1.83 -r1.84 src/sys/lib/libsa/stand.h src/sys/lib/libsa/ufs.c > > Please note that diffs are not public domain; they are subject to the > copyright notices on the relevant files.
2022-04-27Introduce SA_HARDCODED_SECSIZE hack, by which hardcoded DEV_BSIZE isrin
used instead of secsize obtained by SAIOSECSIZE ioctl. This hack avoids divdi3 and friends from being linked, in order to support variable secsize. This is useful for amiga/boot(8); it is loaded by firmware into unpredictable address, and therefore all symbols should be addressable by PC relative mode with only 16-bit displacements. See sys/arch/amiga/stand/bootblock/{boot/bbstart.s,elf2bb,txlt} for more details.
2022-04-24Don't load filessytem module for filesystem that was found but isn't usedmlelstv
for booting.
2022-04-24Ask driver about sector size to support reading superblocks from fixedmlelstv
byte offsets.
2022-04-19Typo in comment. avoinds -> avoidsskrll
2022-01-05fix typos, mainly s/comand/command/andvar
2021-12-31libkern: Make KASSERT verify expression is valid if !DIAGNOSTIC.riastradh
This way it is no longer necessary to mark variables __diagused if they are used in KASSERT conditions. Fix fallout from this by removing now-unnecessary and `#ifdef DIAGNOSTIC'. Don't do the same for KDASSERT if !DEBUG -- unlike KASSERT and DIAGNOSTIC, variables needed by KDASSERT and DEBUG are likely to be expensive to compute (and potentially difficult for a compiler to prove flushable), so we don't want to require them under !DEBUG.
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.