summaryrefslogtreecommitdiff
path: root/sys/lib
AgeCommit message (Collapse)Author
2009-12-12Provide a correct version for little endian kernels... sighMiod Vallat
2009-11-30Allow the bootblocks to provide an optional Elfxx_Phdr check, and abort theMiod Vallat
file load if necessary. Will be used very shortly.
2009-11-07remove gcc 1 workaround we no longer care about whichJonathan Gray
was breaking non GNUC defining compilers. Came up during a conversation with ragge@, positive comments from several.
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
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
2009-08-19<machine/macros.h> would provide inline version of a few of the functionsMiod Vallat
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.
2009-05-24ansi func declsJonathan Gray
2009-05-14Add two hooks allowing MD code get a MD header to be included if needed,Miod Vallat
and to override the way HEAP_START and HEAP_LIMIT are defined.
2009-03-02Send valid ERROR packets to prematurely terminate a transfer.Kenneth R Westerback
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@.
2009-01-25memcpy needs a prototype which is in systm.hAlexander Yurchenko
ok form@ kettenis@
2009-01-18If open() failed because the file does not exist, a struct sd for this fileMiod Vallat
won't be allocated. Check for this in close() so as not to free() bogus pointers.
2008-10-15make random(9) return per-cpu values (by saving the seed in the cpuinfo),Theo de Raadt
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
2008-10-10Use the MI random() for all cases; no need for a MD version since itTheo de Raadt
has never been performance sensitive. Running on all platforms, discussed with millert and kettenis, ok toby
2008-10-07unbreak ieeefp emulation code wrt converting double to unsignedMartynas Venckus
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
2008-06-26First pass at removing clauses 3 and 4 from NetBSD licenses.Ray Lai
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@
2008-05-14These files are not used (and some of them would not compile anyway).Miod Vallat
2008-05-08KNFJoel Sing
2008-05-08Fix alignment - sizeof(long) does not always match the address size of theJoel Sing
ELF image being loaded. ok miod@
2008-04-20Catch up with dismantled libkern.Mark Kettenis
2008-04-20Remove the random() function from locore.s (which used sparcv7 instructions,Mark Kettenis
including mulscc to do multiplications) and switch to the generic random.c code.
2008-04-19Change ELF loader to use the LMA as the load address for theTobias Weingartner
various segments. Hopefully this will help remove various hacks in the boot loader in the future. This should have no effect on most architectures (as we tend to have LMA == VMA). ok drahn@, soft ok's various others.
2008-03-31Correctly load ZMAGIC a.out binaries.Miod Vallat
2008-03-31Fix format strings in a.out loader.Miod Vallat
2008-03-30Let this compile with BOOT_AOUT defined.Miod Vallat
2008-02-25delete prototypes for functions which the kernel does not haveTheo de Raadt
from brynet@gmail.com
2008-01-23Cleanup cn_pri. Change constants to more meaningful names, rather thanJoel Sing
the hp300 related ones currently in use. CN_NORMAL becomes CN_LOWPRI, CN_INTERNAL becomes CN_MIDPRI and CN_REMOTE becomes CN_HIGHPRI. ok miod@
2008-01-06repair build of boot code where it uses an undefind __ashldi3 on some archsOtto Moerbeek
boot code uses 32-bit blknos anyway
2007-12-29Override SoftFloat's countLeadingZeros32() with a faster, ff1-based, versionMiod Vallat
on m88k.
2007-12-29Unifdef NO_IEEE in the libkern softfloat code, and put an appropriate ruleMiod Vallat
in files.alpha to compensate for NO_IEEE kernels. This will allow the softfloat code to be used by other platforms than alpha.
2007-11-28place a comment as to why these are otherwise emptyTheo de Raadt
2007-11-27mips64 also needs memcpy.S, otherwise memcpy.c gets built, which conflictsJoel Sing
with bcopy.S ok miod@
2007-11-26mips64 needs at least these to build; spotted by jsingTheo de Raadt
2007-11-25libkern, begone. Move to a new mechanism where config(8)'s "file"Theo de Raadt
directive can select between MI and MD versions of these files. At the same time, adjust the boot programs to pick exactly what they need, instead of the 7 or 8 mechanisms previously used. There will be some fallout from this, but testing it all by myself is a ridiculously slow process; it will be finished in-tree. Various developers were very nice and avoided making fun of me when I was gibbering in the corner..
2007-11-24SCCS junk, bit by bitTheo de Raadt
2007-11-24junk RCSTheo de Raadt
2007-11-24junk SCCSTheo de Raadt
2007-11-24more junk SCCSTheo de Raadt
2007-11-24junk SCCSTheo de Raadt
2007-11-24delete unused junk RCS idsTheo de Raadt
2007-11-24ansi CTheo de Raadt
2007-10-13Uncomment rule to build bcopy.S, and use that as our bcopy(9) implementation.Mark Kettenis
2007-10-13Make this actually work by using the right register numbers. In the conversionMark Kettenis
from hppa the fact that t1-t4 actually number down from r22-r19 got somehow lost.
2007-09-10Make function pointer calls look all alike; from Holger Mikolon.Miod Vallat
No change in generated code.
2007-06-26Fix the description of loadfile() semantics in comment (and kill "andTom Cosgrove
and" at the same time).
2007-05-30Pull out the ELF loadfile pieces from the standalone libraries, so thatTom Cosgrove
both 32- and 64-bit versions can be created (previously only one or the other could be built for a given boot loader). Use this to allow the i386 and amd64 boot blocks to boot both ELF32 and ELF64 kernels (i.e. amd64 boot blocks can now load i386 kernels, and vice versa). Obviously the system must support LONG mode in order to successfully run the amd64 kernel once it is loaded. Advice and discussions from/with dale@ (going back three years). Much testing nick@ and todd@; thanks.
2007-05-25"boundries" -> "boundaries" in various comments. Started by Diego Casati.Kenneth R Westerback
2007-05-14move hppa to __HAVE_CPUINFOMartin Reindl
input from miod@, ok kettenis@
2007-05-04more locc() diesTheo de Raadt
2007-05-04locc() is dead, spotted by miodTheo de Raadt
2007-05-04move bcd tables to the only place that uses them (the unused mcd driver);Theo de Raadt
ok miod
2007-05-04remove strcpy and strcat from the kernel; they are dead and unused code.Reyk Floeter
(OpenBSD does not use strcat/strcpy in the kernel, if people do it in external modules they should update their code) ok deraadt@