Commit Graph

691 Commits

Author SHA1 Message Date
pgoyette d03b2461a3 Remove kern_assert.c - it's not needed here cuz it's already pulled in
by sys/lib/libkern/Makefile.libkern

OK pooka@
2010-01-20 18:13:40 +00:00
pooka 793cda8e13 __assert.c -> kern_assert.c
(I don't fully understand why __assert.c is needed here.  maybe it
can be removed, but I don't have time to do a full set of mips builds
tonight)
2010-01-20 03:36:26 +00:00
pooka 654415b2b7 Get rid of last "easy" kernel symbols starting with __:
__assert -> kern_assert
__sigtimedwait1 -> sigtimedwait1
__wdstart -> wdstart1

The rest are MD and/or shared with userspace, so they will require
a little more involvement than what is available for this quick
"ride the 5.99.24 bump" action.
2010-01-19 22:28:30 +00:00
joerg 5591cac167 Keep arc4_i and arc4_j synchronised after a rekeying. This prevents
accidentally ending up in a short ARC4 cycle.
2010-01-18 20:54:54 +00:00
joerg 56da4fa7b5 Move AMD64's bswap64 implementation from libc to src/common and share it
with the kernel.
2010-01-14 02:09:46 +00:00
uebayasi e3ac1d9304 Build fix for the mips64 merge:
- If memset2.c is in ${SRCS}, exclude conflicting memset.c.
- If MD byte_swap_8.* is in ${SRCS}, exclude conflicting bswap64.c.
2009-12-14 12:18:14 +00:00
matt e110dba586 Merge from matt-nb5-mips64 2009-12-14 00:47:10 +00:00
skrll af4728306c Rename L_ADDR to L_PCB 2009-12-10 07:57:02 +00:00
skrll b7b0345e3d Remove U_PCB as requested by rmind.
Same code before and after.
2009-12-01 09:06:16 +00:00
uebayasi 619d7bed3d Redo the previous inverted logic. Sort alphabetically. 2009-11-21 13:37:18 +00:00
uebayasi dd7316895f Don't build quad support code on 64-bit platforms. 2009-11-21 13:30:23 +00:00
pooka 5e1c61c660 Don't build spcopy for rumpkern. Fixes hp700 build failure pointed
out by nick.

XXX: spcopy should be in the main kernel instead of libkern in any case
2009-09-22 09:57:16 +00:00
dsl eaf64f1b6c Move that majority of the 'SRCS+= foo.c' into the main Makefile.libkern.
Any .S files added by the arch/*/Makefile.inc cause the .c file to
be excluded.
Specific exclusions added using NO_SRCS to match previous files.
At least sparc, sparc64, i386, amd64 and vax GENERIC still build.
(There is a fubar with the naming of the byte-swap files ...)
2009-08-14 19:23:53 +00:00
skrll 89ec5e3d9c Put back random.S. Hi dsl! 2009-08-12 22:49:37 +00:00
dsl e46010532d Remove some .c files accidentally left on the .S lines 2009-08-12 21:24:57 +00:00
dsl cfac8834d7 Split the lines that add .c to SRCS from those that add .S
No changes (apart from the order) intended.
2009-08-12 21:20:40 +00:00
dsl 6f5236b423 Use stuff from libc/Makefile to auto-remove .c files if a .S has been added.
Use it to dispose of tne .c files that were already only conditionally
added.
2009-08-12 21:18:42 +00:00
joerg 0578c2ad0f Move popcount et al to src/common and add popcount32/popcount64.
Requested by rmind@. MD should now override popcount32/popcount64 and
provide the aliases as fitting.
2009-07-21 14:55:32 +00:00
kiyohara b922a542ab Fix little bit, and add a few files.
current status is to see following thread.
    http://mail-index.netbsd.org/port-ia64/2009/06/18/msg000102.html
2009-07-20 11:23:04 +00:00
he b1946a6b32 Back out the addition of memset.c to the vax libkern, and instead do
as tsutsui@ suggested, and include <sys/param.h> in sha2.c instead.
On the vax, this causes <machine/macros.h> to be included, and it contains
that machine's memset() macro+inline.
2009-06-18 15:22:24 +00:00
he 78443215c7 Add memset.c, so that the references from sha2.c can be satisfied, and
so that the kernel and puffs applications can link again.
2009-06-18 07:56:04 +00:00
pgoyette 28469fc250 Implement snprintb_m(3) to provide multi-line bit/bit-field decode.
Discussed on tech-kern.
2009-05-13 02:50:31 +00:00
skrll 8516d55745 Merge nick-hppapmap.
This is a port of the OpenBSD pmap and trap handling code to get us

        - Performance boost on some/all machines.
        - Well on the way to PA2.0 (in 32bit mode) support. Several
          machines probe hardware, but fail sometime after interrupts
          are enabled.

Other things changed / fixed on the branch are

        - update autoconf to use the OpenBSD code.
        - com @ dino is very close to being supported.
        - HPPA_REDZONE has been replaced with a working redzone which
          is enabled with DIAGNOSTIC.
        - UPAGES has been halved in size.
        - power(4) from OpenBSD to fix a few bugs.
        - updated list of modules from OpenBSD.
	- initial ports of uturn(4), astro(4) and elroy(4).
	- update some copyrights (remove advertising clause, etc.)

Thanks to mjf for some of the above, testing and listening.
2009-04-30 07:01:26 +00:00
he c05f1c0f90 Make the function declaration the same for the big-endian case as
for the little-endian case, and consistent with the libkern.h
declaration.  Fixes build problem for at least hp700 and evbbarm-eb.
2009-03-26 22:18:14 +00:00
tls 3559a90485 Fix compilation error on 64-bit platforms. 2009-03-25 19:21:39 +00:00
tls a34cd18b76 Fix build problems caused by crc32 addition to libkern. Also, this makes
the i386 bootblocks about 2K smaller than they were before we monkeyed
with crc32 at all.
2009-03-25 18:41:06 +00:00
darran 36ea3668b9 Fixes PR kern/41069 and PR kern/41070.
Extends the Opencrypto API to allow the destination buffer size to be
specified when its not the same size as the input buffer (i.e. for
operations like compress and decompress).
The crypto_op and crypt_n_op structures gain a u_int dst_len field.
The session_op structure gains a comp_alg field to specify a compression
algorithm.
Moved four ioctls to new ids; CIOCGSESSION, CIOCNGSESSION,  CIOCCRYPT,
and CIOCNCRYPTM.
Added four backward compatible ioctls; OCIOCGSESSION, OCIOCNGSESSION,
OCIOCCRYPT, and OCIOCNCRYPTM.

Backward compatibility is maintained in ocryptodev.h and ocryptodev.c which
implement the original ioctls and set dst_len and comp_alg to 0.

Adds user-space access to compression features.

Adds software gzip support (CRYPTO_GZIP_COMP).

Adds the fast version of crc32 from zlib to libkern. This should be generally
useful and provide a place to start normalizing the various crc32 routines
in the kernel.  The crc32 routine is used in this patch to support GZIP.

With input and support from tls@NetBSD.org.
2009-03-25 01:26:12 +00:00
tsutsui 9c6c3c68dd Don't use gcc's __builtin_*() functions #if defined(_STANDALONE)
because they could be larger than __OPTIMIZE_SIZE__'ed libsa ones and
__builtin_memcpy() on vax rejects NULL (i.e. copying from/to address 0x0).

No particular comments on tech-toolchain.

Tested on alpha, arc, cobalt, hp300, i386, landisk, macppc, news68k, sgimips,
sparc, sparc64, sun3, and vax (on simh).
2009-03-23 13:41:00 +00:00
tsutsui d0b9e6c924 - remove bcmp(9), bcopy(9), and bzero(9) from libkern since <sys/systm.h> has
macro which replace them with mem*() functions in #ifdef _KERNEL as noted
  in man pages
- move declarations of bcopy(3) and bzero(3) into <lib/libsa/stand.h>
  since they are still in libsa for some MD standalone sources
  (I guess all bcmp(3) in standalone sources have been replaced with memcmp(3)
   but they should be replaced with memcmp() anyway)
2009-03-18 12:25:06 +00:00
cegger 248cdce283 ansify function definitions 2009-03-15 21:33:51 +00:00
dsl 82357f6d42 ANSIfy another 1261 function definitions.
The only ones left in sys are beyond by sed script!
(or in sys/dist or sys/external)
Mostly they have function pointer parameters.
2009-03-14 21:04:01 +00:00
dsl 454af1c0e8 Change about 4500 of the K&R function definitions to ANSI ones.
There are still about 1600 left, but they have ',' or /* ... */
in the actual variable definitions - which my awk script doesn't handle.
There are also many that need () -> (void).
(The script does handle misordered arguments.)
2009-03-14 15:35:58 +00:00
dsl 02cdf4d2c8 Remove all the __P() from sys (excluding sys/dist)
Diff checked with grep and MK1 eyeball.
i386 and amd64 GENERIC and sys still build.
2009-03-14 14:45:51 +00:00
he fddc3457b2 Change the use of formally undocumented features, which have now been
made to fail.  Specifically, change
.ifdef(SYMBOL) -> .ifdef SYMBOL or .if defined(SYMBOL),
and corresponding for .ifndef.

Also correct one error in lib/libm/Makefile (.ifdef (${MKCOMPLEX} != "no")?!?).
2009-01-18 20:42:11 +00:00
uwe 533bbdff7e These copy of gcc millicode routines is now included in librump (that
sucks in all libkern sources), so mark them ".hidden".  I'm not sure
if this is the best course of action (dropping millicode from librump
might be a better idea), but it's the quickest fix to get sh3 builds
going again for now.
2009-01-07 22:15:18 +00:00
pooka fed3c1df66 Fix PIC version, it was missing one dereference. Thanks to spz
for access to m68k hardware for testing.
2009-01-06 01:24:56 +00:00
pooka cbd549e79b Fix previous. I have no idea what crack I was on when I "tested" them. 2009-01-05 01:16:09 +00:00
pooka 59f8fc8f6e Split variables out of Makefile into Makefile.libkern so that we
can easily just .include it for the proper SRCS etc. definitions
in case we're interested in the files but not in building an actual
libkern.{a,o}.  for librump
2009-01-04 18:00:55 +00:00
pooka c5889d575e Support PIC for inclusion in librump. (m68k untested) 2009-01-04 17:10:46 +00:00
christos 9a5d3f2817 replace bitmask_snprintf(9) with snprintb(3) 2008-12-16 22:35:21 +00:00
matt 0ad7281825 Add new ptree (Patricia / RADIX tree) implementation to NetBSD. 2008-11-20 23:50:08 +00:00
ad c6555ead19 Our qsort() is inappropriate for kernel use because it makes recursive
calls. Replace it with a kheapsort() function in kernel. Pointed out
by tron@.
2008-11-16 16:15:58 +00:00
ad e5c4df967a Make qsort() available in libkern. 2008-11-16 15:01:26 +00:00
matt 74b13f5d12 Use RET/RETc as appropriate 2008-10-15 18:07:46 +00:00
matt 02ed53f8f6 Need to be __clz[sd]i2 2008-10-14 17:23:33 +00:00
matt 01a00ce83a Add a _clzsi2 for armv4 platforms. 2008-10-14 03:16:20 +00:00
gmcgarry 0de5da9678 Replace most gcc-specific __attribute__ uses with BSD-style sys/cdef.h
preprocessor macros.
2008-09-08 23:36:53 +00:00
matt 41f74018fd Add KASSERTMSG(e, msg) for umass.c. XXX directly calls panic. 2008-07-02 15:25:08 +00:00
matt 67b10687dc Add CTASSERT (compile time assert) from FreeBSD.
Causes sources to fail to compile:
<file>:<line>: error: size of array '__ctassert<line>' is negative
2008-07-02 14:39:20 +00:00
matt 48717a981d Move rb.c from sys/lib/libkern to common so it can be in both libc and libkern. 2008-06-30 19:03:59 +00:00