Commit Graph

65792 Commits

Author SHA1 Message Date
mrg 9e599bdb11 change PROM_getprop() from taking a "void **" for the storage, to a
"void *", and do the extra de-reference directly in the function.  this
avoids having to cast dozens of different types to "void **", which sets
of GCC3's strict-aliasing.  testing by martin@
2003-08-27 15:59:49 +00:00
mrg 9ff45a46f3 x[yd]_dmamem_alloc() takes a bus_addr_t *. don't pass the address of a
long!  found by GCC3.
2003-08-27 15:41:03 +00:00
thorpej c171c20800 Fix-up a few things missed in the rijndael_set_key() change. 2003-08-27 14:55:36 +00:00
thorpej d5d0a860bc Add missing RCS ID. 2003-08-27 14:49:44 +00:00
kleink 7433b99634 Regen. 2003-08-27 14:27:12 +00:00
itojun 725b73043b simplify rijndael.c API - always schedule encrypt/decrypt key.
reviewed by thorpej
2003-08-27 14:23:25 +00:00
kleink e33a696688 While here, add the AMD8111's ACPI controller. 2003-08-27 14:21:51 +00:00
kleink bfd961d6f6 Add AMD8111 USB and SMBus controller IDs; from Nicolas Joly in kern/22617. 2003-08-27 14:13:10 +00:00
tron 710886efc2 Fix build problem caused by adding "const", remove "register" usage. 2003-08-27 12:17:18 +00:00
itojun ffb2df7cd0 variable 'sc' needed in MPACPI case (what should we do about NIOAPIC?) 2003-08-27 11:38:54 +00:00
bsh 7726d33fed + fix the definition of timer #4 observation register. This change fixed
delay() bug.

+ match the names of timer registers to those in user's manual.
2003-08-27 03:57:05 +00:00
bsh 13543d215c move some definitions of register block size from s3c24[10]0reg.h
to s3c24x0reg.h when they are same for S3C2410 and 2400, and rename them as
S3C24X0_FOO_SIZE.
2003-08-27 03:46:05 +00:00
itojun 000061139d typo 2003-08-27 03:35:35 +00:00
itojun 880bf51285 check and panic if key with wrong dir is passed 2003-08-27 02:44:19 +00:00
itojun fb5acbcfc6 rijndael encryption context/scheduled key is assymmetric; need to setup two
(one for encryption, one for decryption)
2003-08-27 02:42:09 +00:00
itojun 5c39f4aaa7 don't intiialize m by m0, m0 is not initialized (by introduction of ip_fragment) 2003-08-27 02:09:59 +00:00
uwe 3a942f1015 cc_callout does not belong to struct cons_channel, as it's only used
by sparc for PROM console input channel.  Demote it to kd.c as a
static variable.

While there, use callout_schedule instead of callout_reset to
reschedule the PROM polling callout, and init prom_cons_channel
statically.
2003-08-27 01:37:38 +00:00
uwe 68f362b713 Kill __P(). 2003-08-27 00:23:32 +00:00
thorpej 7e87fbb23b Some const poisoning. 2003-08-27 00:20:56 +00:00
thorpej 538c811bc6 Tidy up the namespace of this a little. 2003-08-27 00:12:37 +00:00
thorpej 7b613a568e Use BF_ecb_encrypt() instead of using BF_encrypt()/BF_decrypt()
directly.  Reviewed by itojun.
2003-08-27 00:08:31 +00:00
thorpej 24b18cc20a Use the Blowfish in crypto/blowfish, which has hooks for using tuned
assembly for the transform.
2003-08-27 00:05:26 +00:00
thorpej e77423d998 * Const poison, ANSI'ify, like newer OpenSSL Blowfish code.
* Add a BF_ecb_encrypt(), which makes for a prettier interface than
  using BF_encrypt()/BF_decrypt() directly.
2003-08-26 23:51:12 +00:00
manu 41a89bc98d Fix a buffer overflow that was leading to various kernel crashes 2003-08-26 21:52:18 +00:00
manu e3ce76f536 Added a malloc freelist sanity check function, for debugging purposes 2003-08-26 21:48:53 +00:00
jdolecek 5d07f1b919 retain the FreeBSD RCS Id for xmaciireg.h for reference 2003-08-26 21:14:08 +00:00
jdolecek 98c6c56281 add commented out entries for skc/sk SysKonnect SK9821 driver 2003-08-26 21:12:48 +00:00
jdolecek 00603e639b Add driver for SysKonnect SK-9821 and 3COM 3C940 gigabit ethernet boards
From FreeBSD via OpenBSD, port to NetBSD done by Stephen Degler

Changes relative to submitted version:
* yukonreg.h and xmaciireg.h merged into if_skreg.h
* bhack[] constified + other small editing changes
* use 'Ethernet address' rather than 'address' in attach message

XXX completely untested by me, needs further cleanup

Driver provided in PR kern/22511 by Stephen Degler
2003-08-26 21:11:00 +00:00
jdolecek 72e5c7ee1b regen: add SysKonnect 9821 2003-08-26 21:02:22 +00:00
jdolecek a22db7c69f add SysKonnect SK9821 2003-08-26 21:01:35 +00:00
thorpej c8a0fb53df In Blowfish_initstate(), make the initstate static, otherwise the
compiler will emit code to first copy it onto the stack before
copying it into the destination context structure.  With this change,
it will only be copied once.
2003-08-26 20:20:17 +00:00
thorpej 850a45bf66 const an array. 2003-08-26 20:15:13 +00:00
thorpej e6430e4cf8 Const poison, use ANSI-style. 2003-08-26 20:12:22 +00:00
thorpej 793bc7ea32 Take a couple more opportunities to const poison. 2003-08-26 20:07:59 +00:00
thorpej 2d241878c0 Const poison. 2003-08-26 19:58:36 +00:00
thorpej afb044fa37 Duh, remove clock_subr attribute; I am blind today. 2003-08-26 19:23:49 +00:00
thorpej 324f3799d3 Slight cosmetic tweak to last. 2003-08-26 19:20:44 +00:00
thorpej 82c17c3e5e Define an attribute for clock_subr.c 2003-08-26 19:19:36 +00:00
tron e1ab9f5a04 Rework support for i845, i865 and i875P. agp(4) now doesn't "kill" the
i82547EI on my i865PE motherboard any longer.
2003-08-26 18:43:54 +00:00
thorpej 7fbfc60c3c Some slight cleanup. 2003-08-26 17:54:33 +00:00
tron 57c82d6312 Add support for i865G integrated graphics support to agp(4). Patches
contributed by Michael D. Allen in PR port-i386/22600.
2003-08-26 17:33:22 +00:00
tron 18b670bcac Replaces space with tabs. 2003-08-26 17:28:13 +00:00
tron f08364a168 Regen. 2003-08-26 17:25:32 +00:00
tron b411fda654 Add entry for Intel i865G Integrated Graphics Device. 2003-08-26 17:25:00 +00:00
pk e881551a43 VOP_PUTPAGES() must be called with the vnode's interlock held. 2003-08-26 16:40:10 +00:00
thorpej 6de9ce0437 Move the opencrypto CAST-128 implementation to crypto/cast128, removing
the old one.  Rename the functions/structures from cast_* to cast128_*.
Adapt the KAME IPsec to use the new CAST-128 code, which has a simpler
API and smaller footprint.
2003-08-26 16:37:36 +00:00
thorpej 2957d8dce6 Use the simplified rijndael API (which this was essentially a duplicate
of).  XXX This file can now be merged into esp_core.c.
2003-08-26 15:18:27 +00:00
yamt 91161caf3c use VM_PAGE_TO_PHYS macro instead of using phys_addr directly. 2003-08-26 15:12:18 +00:00
thorpej 4db0bbc2b8 Remove a bunch of unnecessary includes. 2003-08-26 15:01:38 +00:00
thorpej 4612234689 G/C extra /. 2003-08-26 14:24:35 +00:00
thorpej aa6632baa6 G/C opencrypto's local copy of rijndael. Adapt the extant rijndael
code for opencrypto's use by adding the simplified API that opencrypto
expects.
2003-08-26 14:24:05 +00:00
uwe 5c666394c9 Drop fbvar.h from INCS now that it's been cvs rm'ed here. 2003-08-26 11:51:13 +00:00
hannken 26d8cfe506 Finish last commit (Make this compile with options DEBUG).
NetBSD has no M_WRITABLE().
2003-08-26 10:17:02 +00:00
thorpej db3b5e3692 Remove extra /. 2003-08-26 02:54:11 +00:00
itojun 6d223cc3a4 KNF 2003-08-25 20:36:47 +00:00
cb 346280bc3c bump kernel version to 1.6X for systrace changes 2003-08-25 19:25:09 +00:00
uwe 5efaa48bea Framebuffer code common to sparc and sparc64 was merged and moved to
dev/sun 3 years ago.  Remove these redundant and out-of-date copies.
All code now uses dev/sun/fbvar.h
2003-08-25 19:24:49 +00:00
uwe 86b9436205 Use dev/sun/fbvar.h instead of machine/fbvar.h (which is just an out
of date copy of the former).

Compile tested with GENERIC32.
Ok by Martin Husemann <martin@netbsd>.
2003-08-25 19:03:41 +00:00
marcus afc21ff9d1 mulaw/alaw timing bugfix from Izumi Tsutsui. 2003-08-25 18:48:31 +00:00
uwe bb09aff859 Undo previous as it broke things.
There are some scattered implicit RASTERCONSOLE dependencies,
so there should be a better way.
2003-08-25 17:50:22 +00:00
tron c8232f0d0f Protect inclusion of "opt_vm86.h" with "#ifdef _KERNEL_OPT" as appropriate. 2003-08-25 13:11:30 +00:00
drochner 25df17af88 fix a deadlock during mount:
The client manager (venus) blocks in sys_mount() before entering its
event loop answering requests from the kernel device (cfs). sys_mount()
calls VFS_STATFS() internally which caused an upcall through cfs,
which was never answered.
Now don't consider the fs fully mounted before the VFS_START() was
called at the vey end of sys_mount(). So VFS_STATFS() will return
an error which is ignored.
2003-08-25 10:05:46 +00:00
drochner eacc9ee5ce nuke an over-zealous memset() which broke statfs() et al. completely 2003-08-25 09:24:53 +00:00
drochner 8085017e31 fix _UC_MACHINE_SP() for the vm86 case: we have to add the SS offset 2003-08-25 09:20:25 +00:00
cb 5f734a1850 fix a race condition between path resolution in userland
and the subsequent namei(): inform the kernel portion of
valid filenames and then disallow symlink lookups for
those filenames by means of a hook in namei().
with suggestions from provos@

also, add (currently unused) seqnr field to struct
systrace_replace, from provos@
2003-08-25 09:12:42 +00:00
he 2dfc91641e Remove duplicate entry for ``pf''. 2003-08-25 09:05:13 +00:00
mrg 0e001a53fa make it "static long nil;" as it's used as &nil in an array wanting long *'s.
makes GCC3 happy.
2003-08-25 04:51:10 +00:00
thorpej b6ff7ed864 It's bad form to use the <opencrypto/rmd160.h> header file while
using the crypto/ripemd160/rmd160.c implementation.  Remove the
opencrypto-local copies of these files entirely.
2003-08-25 04:09:57 +00:00
thorpej 7c0f1119d1 These are unused; remove them. 2003-08-25 04:09:05 +00:00
itojun 356aebd768 g/c unused member. use in6p_ip6 more effectively. 2003-08-25 00:14:30 +00:00
itojun 9569786c95 deref member in in6p directly, don't rely on existence of macro 2003-08-25 00:11:52 +00:00
itojun ff512e5035 don't commit value into ip6_ptkopts until the validation is done.
(note: the code will be updated with 2292bis definition soon, hopefully)
2003-08-25 00:10:27 +00:00
marcus 9010cdf728 LINEAR and LINEAR_LE need to be interchangeable (fixes 8bit unsigned bug). 2003-08-24 19:52:46 +00:00
marcus f436d156b4 Added some encodings which were supported but not listed. 2003-08-24 19:44:29 +00:00
thorpej a7b80200d3 crypto_mbuf.c is unused; remove it. 2003-08-24 19:29:09 +00:00
thorpej 6c52220ed3 G/C some unused config definitions. 2003-08-24 19:28:32 +00:00
thorpej 633cb7d73e Make opencrypto depend on the "ripemd160" and "sha2" attributes, rather
than polluting the crypto algorithm config info with opencrypto knowledge.
2003-08-24 19:26:54 +00:00
thorpej 35479644a7 Move the opencrypto defpseudo into files.opencrypto. 2003-08-24 19:21:11 +00:00
atatat 2768d776d4 Use pfind() in proc_sysctl() to find the target process instead of a
home-grown routine.  Remove defcorenamelen, since it's not used
anywhere.
2003-08-24 19:20:40 +00:00
thorpej 06b1e7a0f1 Make opencrypto explicitly depend on the "des" attribute. Also pull
in zlib.c explicitly if opencrypto is included.
2003-08-24 19:19:54 +00:00
chs 12f04351ad fix some indentation. 2003-08-24 18:12:25 +00:00
chs 14ee4005a1 make sp_tlb_flush() work for profiling kernels:
when we're profiling, the compiler creates a stack frame for us,
so doing a "retl" isn't so good in that case.
2003-08-24 18:10:31 +00:00
chs f217b85c1f make this build with GEM_DEBUG. fix rxhist counters. 2003-08-24 18:07:03 +00:00
chs 2ab420f918 recognize the latest version of the GMAC. 2003-08-24 18:02:00 +00:00
chs 939df36e55 add support for non-executable mappings (where the hardware allows this)
and make the stack and heap non-executable by default.  the changes
fall into two basic catagories:

 - pmap and trap-handler changes.  these are all MD:
   = alpha: we already track per-page execute permission with the (software)
	PG_EXEC bit, so just have the trap handler pay attention to it.
   = i386: use a new GDT segment for %cs for processes that have no
	executable mappings above a certain threshold (currently the
	bottom of the stack).  track per-page execute permission with
	the last unused PTE bit.
   = powerpc/ibm4xx: just use the hardware exec bit.
   = powerpc/oea: we already track per-page exec bits, but the hardware only
	implements non-exec mappings at the segment level.  so track the
	number of executable mappings in each segment and turn on the no-exec
	segment bit iff the count is 0.  adjust the trap handler to deal.
   = sparc (sun4m): fix our use of the hardware protection bits.
	fix the trap handler to recognize text faults.
   = sparc64: split the existing unified TSB into data and instruction TSBs,
	and only load TTEs into the appropriate TSB(s) for the permissions.
	fix the trap handler to check for execute permission.
   = not yet implemented: amd64, hppa, sh5

 - changes in all the emulations that put a signal trampoline on the stack.
   instead, we now put the trampoline into a uvm_aobj and map that into
   the process separately.

originally from openbsd, adapted for netbsd by me.
2003-08-24 17:52:28 +00:00
uwe 4b28d28d70 defflag RASTERCONSOLE. 2003-08-24 17:36:32 +00:00
marcus 7973c3321c Added AICA sound driver contributed by Ryo Shimizu. 2003-08-24 17:33:27 +00:00
uwe 65aeb1d742 #include "opt_rcons.h" 2003-08-24 17:31:59 +00:00
chs fd825b0f1e avoid taking the kernel lock for MPSAFE syscalls.
add missing unlock in fancy case.
2003-08-24 16:36:10 +00:00
chs 3cf764618d remove bogus code that terminates stack trace too early on OEA. 2003-08-24 16:33:41 +00:00
chs 4ffa07757d mprotect()'s "len" is really a size_t, and we can't do any useful
bounds-checking on it.
2003-08-24 16:32:50 +00:00
he cb53c3ac12 The new ufs.o also needs memset, so add it. 2003-08-24 15:19:46 +00:00
he d871277d7d Adapt to new ufs.c needing memcmp and memmove. 2003-08-24 15:11:18 +00:00
he 47a6e783ff Adapt to const-ification of the first arg of the open function of fs_ops. 2003-08-24 14:43:29 +00:00
tron 6948b33a95 Add a missing blank line between two functions. 2003-08-24 09:38:53 +00:00
itojun e5255bfd47 make proc.curproc.* check more strict. atatat 2003-08-24 06:11:19 +00:00
mrg b5076a98db 64 bit number literals need a "ULL" suffix 2003-08-24 00:41:43 +00:00
cjep a94f967897 Make this compile with options DEBUG (part of PR#22582 from Frank Kardel). 2003-08-23 20:37:18 +00:00
martin f5a54fd742 When trying to (re-)establish a session cope with intermediate output
failures of the underlying ethernet interface - just keep trying.
2003-08-23 16:42:41 +00:00
he 75219318a9 Add memmove.c, needed by new ufs.c. 2003-08-23 09:10:51 +00:00
uwe 8dccb95e85 French keydesc for Jornada 680/690. Written based on photos and
descriptions of WinCE behavior from Ge'rard Gambaro (jornada.free.fr).
Not tested on an actual ABF unit.

Hidden under #if 0, as we don't have a platform id for French Jornadas yet.
But I think it's better off committed before it's got lost.
2003-08-23 02:48:47 +00:00
itojun 3e76200c67 need sys/domain.h for FAST_IPSEC case; jonathan 2003-08-23 01:41:10 +00:00
dogcow 80f2705ab1 regen (add VIA VT6105) 2003-08-23 00:14:42 +00:00
dogcow 171b7c3fa5 add VT6105 support to vr(4) 2003-08-23 00:14:28 +00:00
itojun a3bad645a4 make sure so is properly initialized 2003-08-22 22:49:34 +00:00
itojun 58f57a60fd tp could be null in tcp_respond() 2003-08-22 22:27:07 +00:00
itojun 4e6aca94c2 correct missing inclusion of opt_ipsec.h 2003-08-22 22:11:44 +00:00
itojun cabb25918f no need for opt_ipsec.h any longer 2003-08-22 22:05:11 +00:00
itojun 11ede1ed88 remove ipsec_set/getsocket. now we explicitly pass socket * to ip{,6}_output. 2003-08-22 22:00:36 +00:00
itojun 82eb4ce914 change the additional arg to be passed to ip{,6}_output to struct socket *.
this fixes KAME policy lookup which was broken by the previous commit.
2003-08-22 21:53:01 +00:00
itojun 9329caaf20 typo in log message 2003-08-22 21:50:42 +00:00
dsl db4706faf9 Reduce memory footprint:
- use file buffer for all block reads
- only save a small amount of the indirect block list
Allows i386 bootxx_ufs code to load /boot from a filesystem with 32k blocks
while still fitting inside 64k of memory.
Code size reduced as well (by ~1k on i386).
It ought to be possible to use a buffer that is smaller than a filesystem
block.  This might be needed in order to boot from filesystems with larger
block sizes.
2003-08-22 21:33:52 +00:00
dsl f3404c9f63 Fix same breakage as previous (need memmove for symlink handling in ufs.c)
but use (probably) smaller footprint code from libsa.
2003-08-22 21:14:35 +00:00
dsl 6c51a53afa Add memmove - needed for symlink processing in ufs.c 2003-08-22 21:00:26 +00:00
jonathan e3ec783e41 (Accidentally-omitted change): update for ip6_output() to match commit below.
replace the set_socket() method of passing an extra struct socket*
argument to ip6_output() with a new explicit struct in6pcb* argument.
(The underlying socket can be obtained via in6pcb->inp6_socket.)

In preparation for fast-ipsec.  Reviewed by itojun.
2003-08-22 20:49:03 +00:00
jonathan 9339ef0381 Change KAME code for ip_output()/ip6_output() to obtain struct socket*
from the explicit inpcb*/in6pcb* argument.  set_socket() becomes redundant.
2003-08-22 20:29:00 +00:00
jonathan 902669955f Replace the set_socket() method of passing an extra struct socket*
argument to ip6_output() with a new explicit struct in6pcb* argument.
(The underlying socket can be obtained via in6pcb->inp6_socket.)

In preparation for fast-ipsec.  Reviewed by itojun.
2003-08-22 20:20:09 +00:00
he b372f2beaa Adapt to const-ification of first arg of open function in fs_ops. 2003-08-22 08:06:19 +00:00
itojun 8ebd15f8cd add udav* 2003-08-22 07:52:48 +00:00
itojun 52f8075c5a allow userland to specify SPD ID. more readable debugging messages. 2003-08-22 06:22:21 +00:00
itojun 80e0659dae KNF 2003-08-22 06:21:09 +00:00
itojun 616adf38ee backout; committed by mistake 2003-08-22 05:48:27 +00:00
itojun 190b098134 do not quit from key_sendup() even if writes to non-target socket fails.
from SEIL team
2003-08-22 05:46:37 +00:00
itojun 96467c96c7 add udav* 2003-08-22 05:14:00 +00:00
itojun 413787298f udav*, for ether w/ Davicom DM9601 chipset. Shingo WATANABE 2003-08-22 05:13:29 +00:00
itojun 714f2369d3 on netbsd, major # for /dev/crypto depends on arch 2003-08-22 05:07:26 +00:00
itojun 4440262659 create /dev/crypto 2003-08-22 05:06:22 +00:00
jonathan 215937cb45 Check in hooks to fix checksum offload on bge devices. Empirical
observation is that some 570x devices can get themselves into a state
where they miscompute off-loaded TCP or UDP checksums on packets so
small that Ethernet padding is required.  Further obsevation suggests
that the bge checksum-offload hardware is adding those padding bytes
into its TCP checksum computation. (Once a 5700 gets in this state,
even a warm boot won't fix it: it needs a hard powerdown.)

Work around the problem by padding such runts with zeros: even if the
checksum-offload adds in extra zeros, the resulting sum will be correct.

Also, dont trust the checksum-offload on received packets smaller than
the minimum ethernet frame, in case the Rx-side has a similar bug.

Finally, on packets where we do trust the outboard Rx-side TCP or UDP
checksum, the bge did not include the pseudo-header. Set the
M_CSUM_NO_PSEUDOHDR bit as well as M_CSUM_DATA, and rely on
udp_input() or tcp_input() adding in the sum via in_cksum_phdr().
2003-08-22 03:32:35 +00:00
jonathan 25eeb02c06 Fix a bug in compaction of `DMA runt' fragmented packet chains:
if we m_dup() a packet to compactify it, and later run out of DMA
descriptors, bge_encap() will return ENOBUFS, hoping the driver will
try again later.  But we have just m_freem()'d the original chain
which was m_dup()'d, leaving a pointer to the just-freed packet header
in the tx queue.

Fix by always walking the chain, shuffling data towards the head;
except if we find a runt in the very last mbuf, we must borrow data
from its predecessor.

(Patch is verbatim from a third-party tree, apologies for any style woes.)
2003-08-22 03:03:20 +00:00
junyoung d366db246b TNF & remove trailing spaces. 2003-08-22 02:01:32 +00:00
petrov 53514f157f Don't set and check absent interrupts on sabre. 2003-08-22 00:46:25 +00:00
petrov 051f6b8a9a Cosmetic: move DEBUG defines. 2003-08-22 00:45:40 +00:00
he 1c6c843936 Adapt to const-ification of first arg of open function in fs_ops. 2003-08-21 23:28:27 +00:00
he 09c6022868 Add memcmp, memmove and bcmp to handle the new ufs.c. 2003-08-21 23:24:36 +00:00
he b6643fd4d3 Adapt to const-ification of first arg of open function in fs_ops. 2003-08-21 23:15:18 +00:00
he 25d9b10ee9 Add casts of LINUX_USRSTACK and USRSTACK to handle the cases
where these are not constants.
2003-08-21 23:00:07 +00:00
he 241ad00001 Adapt to const'ing of the first argument of the open function in fs_ops. 2003-08-21 22:34:48 +00:00
jonathan 9dbddd495b Remove #ifdef _OpenBSD__ code which sets the softc pointer `sc' by
passing an index into ubsec_cd.cd_devs[]: that causes too much
confusion with the checks that sc is non-null.
2003-08-21 20:00:15 +00:00
jonathan 6f179aea24 Pull in FreeBSD sys/opencrypto/cryptodev.h, revision 1.2.2.5 -> 1.2.2.6.
Sam Leffler's FreeBSD commit message was
  ``to eliminate context switch when returning results from the
     software crypto driver''
but the patch also contains the CRYPTO_SESID*() macros used in newer
ubsec and hifn drivers.
2003-08-21 19:44:14 +00:00
jonathan 412d30185b Pull up `done' flag for crypto operations from FreeBSD. FreeBSD deltas:
cryptodev.c: 1.4.2.3 -> 1.4.2.4
  cryptodev.h: 1.4.2.4 -> 1.4.2.5
2003-08-21 16:08:05 +00:00
yamt a7f9b1d8e0 don't make zero-sized mappings. 2003-08-21 15:17:03 +00:00
dsl dc46f864d1 Hide prototype of linux_exec_setup_stack() inside #ifdef _KERNEL so
that sbin/sysctl will compile.
2003-08-21 15:08:25 +00:00
jonathan 6196bbe72d Honour the M_CSUM_NO_PSEUDOHDR, if set on inbound TCP and UDP packets.
Tested against  bcm5700 with patched if_bge.c.
2003-08-21 14:49:49 +00:00
dsl 92c5eba410 Split CGSIZE definition so it can be used with 64bit fpg values.
Split cg_start so magic can be done in libsa when it is known that the
filesystem isn't UFS2.
2003-08-21 14:41:00 +00:00
he 395b0c6682 Now that ufsboot / ufs.c uses memmove(), we need to include it here. 2003-08-21 13:12:32 +00:00
pk 84ab67f557 sun4/sun4c DIAGNOSTIC: fix tally of locked down pmegs.
pmap_page_protect: DIAGNOSTIC: show `pg' argument in panic.
pmap_unwire: for now, only used for sun4/sun4c MMUs.
2003-08-21 09:36:28 +00:00
hannken 1a2d1be737 Fix syscall_vm86 argument:
struct trapframe -> struct trapframe *
2003-08-21 08:36:56 +00:00
elric 72e3ec4b0c Should call ufs_close() if it isn't being built in. 2003-08-21 00:01:28 +00:00
elric 2a56d40c5c make 'path' argument to cd9660_open 'const char *' and fix the fallout. 2003-08-21 00:00:52 +00:00
itojun 109461480a expose CBQ_MAXPRI to userland 2003-08-20 23:32:25 +00:00
jonathan 65d419641b regen from pcidevs 1.567 with fix for typo in bcm5823 product-id. 2003-08-20 22:58:22 +00:00
jonathan fcc087c11d Fix typo (s/5822/5823/) in line for bcm5823 device. 2003-08-20 22:56:13 +00:00
jonathan c23a2c9c86 opt_inet6.h is FreeBSD-specific, so wrap it with #ifdef __FreeBSD__/#endif. 2003-08-20 22:33:40 +00:00
fvdl c43b35423e Pass pointers to frames from assembly, do not use the 'frame on stack
as argument passed by value' trick, as gcc 3.3.x makes (valid) assumptions
about the stack that will not be true. Costs 2 instructions per trap/syscall
on i386, 4 per interrupt for MP. One instruction per trap/syscall on amd64,
2 per interrupt for MP. I expect gcc 3.3.1 to make up for this by better
optimization (it'd better..)

While here, make amd64 compile again by using subr_mbr_disk.c
2003-08-20 21:48:35 +00:00
drochner 544307ba64 make the vlan stuff work 2003-08-20 17:41:38 +00:00
matt a1bba8f344 Relax things so that OFW implementations that don't conform to the OFW PCI
bindings will work.
2003-08-20 14:41:56 +00:00
yamt 7847549d35 use LSDEAD instead of SDEAD for lwp state. 2003-08-20 14:04:00 +00:00
yamt 611b0b9f15 don't use a space char in wmesg.
it makes outputs of SIGINFO confusing.
2003-08-20 13:54:48 +00:00
yamt be09ed029e fix indent. 2003-08-20 13:50:53 +00:00
itojun 1403d9d920 KNF 2003-08-20 13:32:33 +00:00
ragge e7bd9c8c0f Add Makefile. 2003-08-20 12:29:08 +00:00
erh a22558465d Add entry for Intel 82801EB AC-97 audio. Audio sounds fine with this,
although the mixer settings are a bit odd: outputs.master doesn't do anything,
but outputs.surround does.
2003-08-19 21:04:22 +00:00
dsl 40bac1084c When writing the disklabel:
- Write label to all netbsd (type 169) mbr partitions (even if they don't
  already have a label).
- Update any label found in sector LABELSECTOR and sector 0.
Latter change makes DIOCWDINFO (etc) work on raidframe (fixing bin/22529).
2003-08-19 11:49:24 +00:00
ragge a9e5513c6b Kerner library files for pdp10. 2003-08-19 10:59:26 +00:00
ragge 7ea6b903f5 Basic machine-dependent code for pdp10.
Lots of stuff here not yet finished.
2003-08-19 10:54:59 +00:00
ragge a08c4b9e22 Header files for pdp10. 2003-08-19 10:53:04 +00:00
ragge 7a599d2c3e Simple ebus, Massbus adapter and Massbus disk drivers.
The Massbus disk drivers should be merged with the vax Massbus disk drivers
when the 4.4BSD Massbus code gets free.
2003-08-19 10:51:57 +00:00
ragge ab103e8af7 Configuration files for pdp10. 2003-08-19 10:49:57 +00:00
itojun b83dd2f98b remove unneeded #ifdef __NetBSD__ 2003-08-19 08:00:54 +00:00
itojun ade8129bdc make ip_fragment public (it is for coming PF integration) 2003-08-19 01:20:03 +00:00
christos ae572737ba make ip_fragment static and add prototype. 2003-08-19 00:54:41 +00:00
itojun 4f8ba921cd correct ip_multicast_if fix to always set ifp (tnx Shiva) 2003-08-19 00:17:38 +00:00
eeh 677644de4b Increase the size for the symbol table so we don't overflow anymore. 2003-08-18 23:20:06 +00:00
itojun 449b5c43d4 since we cope with packets with addess on !IFF_UP interface in ip_input()
properly, IFF_UP check in INADDR_TO_IA is obsolete (or too much).
2003-08-18 22:28:51 +00:00
itojun 122edbc337 fix problem we can't drop membership on !IFF_UP interface.
reported by Shiva Shenoy

while we're here, fix another problem when the same interface address is
assigned to !IFF_MULTICAST and IFF_MULTICAST interface.  if ip_multicast_if()
returns the first one, join/leave will fail, which is not an desired effect.
2003-08-18 22:23:22 +00:00
matt 121c8942a6 Not all PPC ports (e.g. macppc) equate IPL_NONE with 0. 2003-08-18 22:10:33 +00:00
eeh 26ed6e652b Do not rely on an address from one particular firmware version. 2003-08-18 21:34:11 +00:00
eeh e898bed96b Use the only documented method to get the board data from the firmware. 2003-08-18 21:30:51 +00:00
he 6d211e7dbf Re-balance parens. 2003-08-18 20:34:18 +00:00
dsl fc94061686 Further fallout from making 'path' arg to 'ufs_open' 'constchar *'.
There may be fallout in other builds....
2003-08-18 15:47:41 +00:00
dsl 8453fb0040 make 'path' argument to ufs_open 'const char *' and fix the fallout. 2003-08-18 15:45:27 +00:00
taca 88b2ae484d make ahc(4) to recognize Adaptec 2915LP Ultra160 SCSI adapter. 2003-08-18 09:16:22 +00:00
oki f3dd49b44c Add exec_setup_stack in execsw for lkm. Hi christos! 2003-08-18 09:04:45 +00:00
dsl d678060c05 KNF, fix a comment or two 2003-08-18 08:00:52 +00:00
matt 93b63570a0 Properly walk the OF tree to map a PCI node's interrupt property into the
proper settings for the interrupt-controller.
2003-08-18 07:08:11 +00:00
itojun dc4bf37abf support new quirk bits on debug output 2003-08-18 05:39:07 +00:00
elric 73d81f8b40 Ensure that the IV is aligned for strict alignment machines. 2003-08-18 02:36:17 +00:00
mrg ef0f504703 allow DEBUG to be set to "-gstabs" or "-gstabs+", to enable building
netbsd.gdb.  (you need "-gstabs" for gcc3.3 and old gdb.)
2003-08-18 00:15:41 +00:00
hannken d56baf4735 Add a placeholder for lpt, char 20.
Requested by: Matt Thomas
2003-08-17 19:15:50 +00:00
chs e02e4ecc2b lots-o-stuff:
- fix opcodes_base[10] to allow us to find "cmpli".
 - fix "cmp" definition.
 - add various missing SPRs.
 - use the right bits for the "BI" operand.
 - fix operand calculation for "rlwinm" and friends, and display
   the operands in the same order as the manuals do.
 - make the buffer bigger to avoid overflow.
2003-08-17 18:23:17 +00:00
chs f96eebf908 use the value of the "soft-reset" property (if it exists) to locate
the reset vector (needed on my shiny new G4).  from tsubai.
2003-08-17 18:12:34 +00:00
chs 86bd9c4a5e recognize the product ID used on the latest G4s. 2003-08-17 18:10:09 +00:00
chs 4ba6255f14 add some 745x-specific MSSCR0 bits. 2003-08-17 18:08:17 +00:00
chs f19809f0fa remove an unused proto. 2003-08-17 18:07:11 +00:00
chs 0e431087e5 regen 2003-08-17 18:06:22 +00:00
chs b27931b073 add the uninorth ATA found in the latest G4s, and a highpoint IDE. 2003-08-17 18:03:29 +00:00
pk dd51ebce3f sun4/sun4c MMU: keep `wired' status per page, implemented by defining a bit
in the PTE word that is not used by the hardware. Use it to unlock a `pmeg'
if the wired count in a segment drops to zero.
2003-08-17 18:00:51 +00:00
bouyer 1f8e327374 Add support for VIA VT8237 (KT600) IDE controller. From Stephen Degler in
PR port-i386/22453.
2003-08-17 15:52:06 +00:00
bouyer 104faa2485 Regen: Add 3com 3c940 Gigabit Ethernet, and VIA KT600 PCI devices. 2003-08-17 15:48:41 +00:00
bouyer 1a1c011785 Add 3com 3c940 Gigabit Ethernet, and VIA KT600 PCI devices. From Stephen Degler
in PR port-i386/22453
2003-08-17 15:47:11 +00:00
kochi 35312b5efa make shutdown error messages clearer (idea from Christoph Egger) 2003-08-17 14:23:16 +00:00
kochi 1cc19c34e0 Try shutdown with ACPI only when ACPI is enabled.
Patch from Masanori Kanaoka (with a little modification by me).
2003-08-17 14:15:43 +00:00
hannken efc0a23c7d Add lpt (for explora) as char 20.
This major number is unused in macppc.
2003-08-17 11:06:46 +00:00
kochi 42ade8383d check return value of AcpiEnterSleepStatePrep() to catch
any failure
2003-08-17 03:45:19 +00:00
pk fda797e0a4 sun4/sun4c MMU: keep `wired' status per page, implemented by defining a bit
in the PTE word that is not used by the hardware. Use it to unlock a `pmeg'
if the wired count in a segment drops to zero.
2003-08-16 19:21:21 +00:00
yamt 1877d60129 use sizeof() instead of a hardcorded constant. 2003-08-16 18:09:14 +00:00
yamt 3fcbf88d41 current trylater/jukebox retry delay is way too long and
it has a bug in the backoff calculation. so,
- clip it to 1-60 sec. (suggested by Rick Macklem)
- use a constant multiplier instead of nfs_backoff, which
  is already exponential.
- move some related constant definations to nfs.h from nqnfs.h and
  prefix with NFS_ instead of NQ_ because they are not nqnfs-specific.
2003-08-16 18:08:27 +00:00
hannken af69915880 Add bus_dmamap_sync as dma regions are no longer uncached. 2003-08-16 15:40:41 +00:00
itojun 3bcba4f62b do not disconnect L4 connections on IP address removal. the behavior
is too extreme (consider DHCP/PPP-based fixed address allocation).
see tech-net for more info.
2003-08-16 11:30:35 +00:00
dsl 72fa43211e gcc for sparc seems to barf at 'int_var * 0x100000000ull' so do
'(uint64_t)(uint)int_var << 32' even though it generates twice as many
instructions on i386!
2003-08-16 07:04:17 +00:00
itojun 8fb8c94387 regen 2003-08-16 06:39:12 +00:00
itojun 9a9c255e39 Corega USB-TXC (uses Davicom DM9601E, does not work with existing driver) 2003-08-16 06:36:29 +00:00
jonathan f4c2260f8a Make if_loop MTU settable via SIOCSFMTU/ifconfig. Useful for testing,
and for regression-testing performance at various MTUs.

NB: route MTU may not track MTU changes, which may cause problems for
AF_ISO if loopback MTU is decreased. I've never seen problems with IP,
in various tests going back to around NetBSD 1.3.
2003-08-15 19:22:08 +00:00
kochi e7df232658 'struct acpi_resources' will have references to malloc'ed memory.
So it's better to not to allocate on stack.
2003-08-15 17:22:23 +00:00
jonathan 2ea4c76684 Fix bug with IP_DF handling which was breaking TCP: on FreeBSD, ip_off
is assumed to be in host byteorder during the input(?) path.  NetBSD
keeps ip_off and ip_len in network order.  Add (or remove) byteswaps
accordingly.  TCP over fast_ipsec now works with PMTU, as well as without.
2003-08-15 17:14:31 +00:00
kochi 77db8900ab Correct calculation of timeout. 2003-08-15 17:07:04 +00:00
martti 03506a6ef3 Fix return-rst for IPv6 (PR#22157 by Peter Postma). 2003-08-15 08:11:09 +00:00
itojun f80fd2c5ea accept 1518-byte frames (needed for vlan). Valtteri Vuorikoski 2003-08-15 07:29:34 +00:00
itojun c2ab035d77 - check HDRTYPE early, and ignore if it is not supported (n > 2).
- defer access to interrupt configuration register, as its existence depends on
  HDRTYPE.
- add "skip particular funtion in multifunction device" functionality
  to quirk table.
- add GEODE/NS SC1100 quirk (now boots on soekris Net4801).
2003-08-15 07:17:21 +00:00
jonathan f3ab6286e9 Change ipsec4_common_input() to return void (not int with errno,
as in FreeBSD), to match NetBSD protosw prototype.
2003-08-15 03:50:20 +00:00
jonathan 28b5f5dfab (fast-ipsec): Add hooks to pass IPv4 IPsec traffic into fast-ipsec, if
configured with ``options FAST_IPSEC''.  Kernels with KAME IPsec or
with no IPsec should work as before.

All calls to ip_output() now always pass an additional compulsory
argument: the inpcb associated with the packet being sent,
or 0 if no inpcb is available.

Fast-ipsec tested with ICMP or UDP over ESP. TCP doesn't work, yet.
2003-08-15 03:42:00 +00:00
simonb bc73aa40f5 Return NULL instead of 0 for functions that return pointers.
Sprinkle some KNF whitespace.
2003-08-15 02:59:32 +00:00
itojun 277f295364 regen 2003-08-14 23:39:47 +00:00
itojun 7f5e474ef7 s,PCI/ISA,PCI-ISA, 2003-08-14 23:39:22 +00:00
itojun 17b77b454e add National Semiconductors SC1100 (GEODE) PCI devices. 2003-08-14 23:38:34 +00:00
hannken 58f4f18578 Fix a typo: sm->sg_npte -> sp->sg_npte 2003-08-14 11:00:02 +00:00
itojun 7094514d4d aha and le uses isadma 2003-08-14 10:03:03 +00:00
tsutsui 143adabe3d If BUS_DMA_ALLOCNOW is specified with nsegments > 1
in jazz_bus_dmamap_create() disable BUS_DMA_ALLOCNOW for now
rather than return ENOMEM.  Required by some PCI devices (like pciide(4)).
XXX needs re-think how BUS_DMA_ALLOCNOW should be handled.
XXX (we should use another flag for the jazz internal DMAC?)
2003-08-14 09:35:26 +00:00
nonaka fcfc3fe7cb Add support for another Intel Pro/100 variant. 2003-08-14 07:59:39 +00:00
itojun fd3f06dabb enforce ipsec policy on raw wildcard. 2003-08-14 07:57:40 +00:00
itojun 230da08946 correct number range handling. David Young 2003-08-14 07:39:22 +00:00
itojun 95758d3554 avoid oldlenp mixup (in-kernel pointer and userland pointer). from atatat 2003-08-14 05:14:52 +00:00
christos 329946a58b remove the args from the macro. 2003-08-14 02:17:07 +00:00
itojun 25e6c004c4 fix INT_MAX check in if_clone_lookup 2003-08-14 00:19:43 +00:00
itojun 326e7bdf59 correct if_clone_lookup(). based on diff from Quentin Garnier 2003-08-14 00:13:34 +00:00
jonathan 23f68da565 Make sure one (potentially) overlapping copy is safe. 2003-08-13 20:13:59 +00:00
jonathan 740290313e Initial import of Sam Leffler's `Fast-IPsec' from FreeBSD 4.
Fast-IPsec is a rework of the OpenBSD and KAME IPsec code, using the
OpenCryptoFramework (and thus hardware crypto accelerators) and
numerous detailed performance improvements.

This import is (aside from SPL-level names) the FreeBSD source,
imported ``as-is'' as a historical snapshot, for future maintenance
and comparison against the FreeBSD source.  For now, several minor
kernel-API differences are hidden by macros a shim file, ipsec_osdep.h,
which (aside from SPL names) can be targeted at either NetBSD or FreeBSD.
2003-08-13 20:06:49 +00:00
wrstuden 2d11b64df0 Include correct file for defopt. 2003-08-13 19:44:12 +00:00
yamt e6483a7858 - leave a compiler which register is used for an asm argument.
- use correct asm constraints.
- eliminate usage of dummy variables.
2003-08-13 12:40:31 +00:00
yamt fd72624430 use correct asm operand indexes.
(previously 'GLptr' was used as mask.)
this long standing bug seems to be uncovered by
my previous change(rev.1.2) on some machines.

PR/22457 from Matthias Scheler, and tested by him.
2003-08-13 12:38:35 +00:00
ragge 303f533292 sys/types.h -> sys/param.h to get vax inlines correct. 2003-08-13 11:35:25 +00:00
ragge bc830a1980 Do not use the builtins for the mem* functions on vax, the compiler gets
confused with the static inline functions vax uses.
2003-08-13 11:34:24 +00:00
ragge f69577d50c Include the C versions of the string instructions.
Replace blkcpy() with a version that can handle overlapping data areas.
2003-08-13 11:32:23 +00:00
ragge 923106363e Some of the vax-specific mem*() functions did not check for len > 65535,
and when MAXDSIZ were increased memcpy() length sometimes were larger
than 64k (like in amap_extend()) All functions now checks the length.
This fixes PR#19968.

Disable the inline string functions and use the C versions instead.
2003-08-13 11:30:50 +00:00
ragge c049e276e3 Improved driver with much better error handling, from Jochen Kunz
(the original author of the driver).
2003-08-13 08:08:48 +00:00
itojun 4d754cb259 in6_pcbrtentry() now returns IPv4 rtentry if in6pcb is connected to IPv4 mapped
address.  PR kern/22431 from Andreas Gustafsson
2003-08-13 04:59:34 +00:00
scw 031f751a7d Lmapped_start is used in db_trace, so mark as a 'function'. 2003-08-12 21:48:07 +00:00
martin c52fa54bfe Make it compile on alpha. 2003-08-12 19:49:27 +00:00
matt 1d1029332d Remove this. The architecture specific ones are now used. 2003-08-12 18:35:51 +00:00
matt 47483092bd Cleanup/rework cpu_switch*, switch_exit, Idle routine. Remove pcb_psl
since it was write-only.  When setting up a process, make sure the fake
callframes are properly linked together.

Only lower SPL when in Idle loop.  Raise spl to previous level (which would
be IPL_SCHED) when exiting Idle loop.  Never lower SPL anyplace else.
2003-08-12 18:34:47 +00:00