summaryrefslogtreecommitdiffstats
path: root/sys/lib (follow)
Commit message (Collapse)AuthorAgeFilesLines
* bye bye SCCSderaadt2012-07-133-14/+2
|
* Add strnlen() to libkern.matthew2012-04-262-1/+38
| | | | ok deraadt
* Remove assembly version of strlen from i386 and amd64, where it'smikeb2012-01-172-38/+0
| | | | | | | up to 3 times slower than the C code most of the time. This was brought up by DragonflyBSD guys initially. ok deraadt, guenther. miod will not miss it.
* Regen.kettenis2011-11-272-68/+68
|
* Switch to proper PA-RISC 2.0 mnemonics. Works around a bug in the assemblerkettenis2011-11-271-22/+22
| | | | getting rid of the (hopefully) last bug in this code.
* Regen.kettenis2011-11-271-3/+3
|
* Fix return value of memcpy.kettenis2011-11-271-4/+3
|
* Oops, jsing@ changed spcopy.S without realizing that that file is generatedkettenis2011-11-271-7/+3
| | | | from bcopy.m4. Fix that.
* Regen.kettenis2011-11-272-41/+40
|
* Replace a few more 32-bit instructions with the proper 64-bit equivalent.kettenis2011-11-271-22/+21
| | | | | Also fix the return value of memcpy. With these changes, this seems to work as advertised now.
* Oops, forgot to remove that reference to now dead saioctl.hmiod2011-09-201-2/+1
|
* Remove unused libsa error code and descriptions. Anything shrinkingmiod2011-09-202-7/+2
| | | | boot blocks is worth having.
* Remove unused file before deranged boot blocks writer get ideas from it.miod2011-09-201-49/+0
|
* Regen.kettenis2011-09-192-4/+4
|
* Avoid sign-extension when extracting the low bits of addresses when checkingkettenis2011-09-191-3/+3
| | | | | | if the addresses are 4-byte aligned. ok jsing@
* we need to alias __movstr* as __movmem* for gcc4jsg2011-07-191-2/+2
| | | | from NetBSD. ok miod@ drahn@
* Make the updated zlib compile with a debug kernel.jsing2011-07-164-28/+28
| | | | ok deraadt@
* Replace the cruddy old sys/net/zlib.[ch]. We now use the sys/lib/libzderaadt2011-07-0712-10/+3853
| | | | | | | | | | | | code. Missing chunks of the API are imported from the libc version, with a few #ifdef's to port it into the kernel environment. The bootblocks already used the newer code, and should encounter no surprises since there are so few changes to the existing files. In the kernel, ipcomp and kernel ppp are changed to the new API. ipcomp has been tested. ok tedu the brave
* Do not leak memory if ufs_open() fails; reported by and ok martynas@miod2011-05-281-6/+13
|
* Regen.jsing2011-04-142-9/+9
|
* Use 64-bit operations for address manipulation.jsing2011-04-141-4/+4
|
* Correctly load p_addr and avoid trashing the source address.jsing2011-04-141-4/+4
|
* Change daddr_t to daddr32_t. The bootblocks on our architectures onlyderaadt2011-03-135-21/+21
| | | | | | | do 32-bit block spanning. If later on we get some that can/should do 64-bit, that can be done now using daddr64_t (but of course, we are taking this step to finalize the daddr_t 64-bit conversion). ok miod krw
* syncderaadt2011-03-124-32/+32
|
* In the original sparc V7 book (and in the v8 book), the divrem leaf code usedderaadt2011-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | local registers for a few temporaries. This was changed to use two global registers. Maybe to permit use in-kernel without conflicting with the register V7 register window handlers. (Was this done by Chris Torek? Is this related to Gordon Irlam's work? Or was it in NetBSD? Hard to tell because NetBSD removed their original cvs tree.) In V8 the ABI was tightened; more global registers became offlimits in different ways. We started supporting sun4m, and did not consider this. As a result, the global registers chosen are the wrong choice. In particular, %g7 is a poor choice for upcoming TLS work. It looks like it is safer to use %g5 and %g6 since these functions are "system software". All re-entrant parts of the system save it. On sparc64 these functions are in libc per ABI requirement, but are unused. On sparc, they occur in bootblocks (no reentrancy), kernel (reentrancy saves globals; kernel is not ABI compliant), userland libc (signal handlers save globals), and ld.so (symbol binding is not re-entrant on its own). Discussed rather extensively with guenther, kettenis, miod and drahn.
* s/DST/DEST/ to avoid warnings when building RAMDISK kernels, which definemiod2011-01-271-60/+60
| | | | TIMEZONE and DST...
* add a new function, explicit_bzero, to be used for erasing "secret" stuff.tedu2011-01-102-1/+22
| | | | | | | unlike normal bzero, we guarantee that the compiler will not optimize out calls to this function for otherwise dead variables. to be adjusted as needed when compilers and linkers get smarter. ok deraadt miod
* - properly remove NENTS now after fixing the fallout.jasper2010-12-061-2/+1
| | | | ok deraadt@
* - partially revert previous NENTS removal for arches which got busted.jasper2010-12-061-1/+2
|
* - drop NENTS(), which was yet another copy of nitems().jasper2010-12-061-2/+1
| | | | | | | no binary change ok deraadt@
* Add OpenSSH's timingsafe_bcmp() to libkern.matthew2010-07-202-1/+35
| | | | ok djm@, deraadt@
* shuffle an extern around so gcc4 doesn't whinge about incomplete typesjsg2010-05-092-3/+4
| | | | | | as suggested by miod. ok miod@
* destintation -> destinationmiod2010-04-201-3/+3
|
* Allow for multiple CPUs by moving to an array of cpu_info.jsing2010-04-011-6/+2
| | | | ok kettenis@
* Provide a correct version for little endian kernels... sighmiod2009-12-122-3/+13
|
* Allow the bootblocks to provide an optional Elfxx_Phdr check, and abort themiod2009-11-301-2/+8
| | | | file load if necessary. Will be used very shortly.
* remove gcc 1 workaround we no longer care about whichjsg2009-11-071-11/+1
| | | | | | | was breaking non GNUC defining compilers. Came up during a conversation with ragge@, positive comments from several.
* rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andderaadt2009-10-2736-168/+15
| | | | | | | unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
* <machine/macros.h> would provide inline version of a few of the functionsmiod2009-08-198-5/+459
| | | | | | | | | | | | traditionnaly found in libkern. However, the memcmp() flavour would behave as bcmp() with only two possible return values: zero and positive non-zero. This broke the name cache RB trees which now rely upon proper memcmp() semantics(negative value, zero, or positive value). Just give up on these macros and provide the same code as libc, in libkern. As a side effect, this no longer uses the cmpc3 instruction, which is not implemented and requires (slow) kernel emulation, on the original uVax.
* ansi func declsjsg2009-05-241-19/+10
|
* Add two hooks allowing MD code get a MD header to be included if needed,miod2009-05-141-1/+16
| | | | and to override the way HEAP_START and HEAP_LIMIT are defined.
* Send valid ERROR packets to prematurely terminate a transfer.krw2009-03-022-3/+5
| | | | | | | | | | | | According to RFC1350 there should be always be a terminating NUL. Andre Gillibert on bugs@ pointed out that the misformed packets caused Gentoo Linux's tftpd (atftpd) to crash trying to transfer pxeboot to an OpenBSD machine. This is slightly different diff than the one proposed by Andre, but he confirms it also fixes the problem. "looks like a better diff to me" deraadt@.
* memcpy needs a prototype which is in systm.hgrange2009-01-251-1/+2
| | | | ok form@ kettenis@
* If open() failed because the file does not exist, a struct sd for this filemiod2009-01-181-5/+6
| | | | | won't be allocated. Check for this in close() so as not to free() bogus pointers.
* make random(9) return per-cpu values (by saving the seed in the cpuinfo),deraadt2008-10-153-53/+21
| | | | | | | which are uniform for the profclock on each cpu in a SMP system (but using a different seed for each cpu). on all cpus, avoid seeding with a value out of the [0, 2^31-1] range (since that is not stable) ok kettenis drahn
* Use the MI random() for all cases; no need for a MD version since itderaadt2008-10-101-1/+0
| | | | | has never been performance sensitive. Running on all platforms, discussed with millert and kettenis, ok toby
* unbreak ieeefp emulation code wrt converting double to unsignedmartynas2008-10-072-2/+90
| | | | | | | | | | | | | | | | long ints for alpha. we've got only one instruction (cvttq) to convert double-t to quadword, and float64_to_int64 did not take into account the unsigned conversions therefore, overflow always occured, and half of the unsigned range (LONG_MAX .. ULONG_MAX) was broken introduce roundAndPackInt64NoOverflow and float64_to_int64_no_overflow for softfloat, that works with unsigned integers as well. note that this will return zero for nan/inf/oflow/uflow, raising exception flag perl is happy now looked over by miod@ tested by naddy@, and by me on nick@'s alpha
* First pass at removing clauses 3 and 4 from NetBSD licenses.ray2008-06-2614-109/+11
| | | | | | | | | Not sure what's more surprising: how long it took for NetBSD to catch up to the rest of the BSDs (including UCB), or the amount of code that NetBSD has claimed for itself without attributing to the actual authors. OK deraadt@
* These files are not used (and some of them would not compile anyway).miod2008-05-143-300/+0
|
* KNFjsing2008-05-081-9/+11
|