Commit Graph

70053 Commits

Author SHA1 Message Date
oster d4fe1a2103 - Introduce a 'dagnode' pool. Initialize it and allow for cleanup.
Provide rf_AllocDAGNode() and rf_FreeDAGNode() to handle
allocation/freeing.

- Introduce a "nodes" linked list of RF_DagNode_t's into the DAG header.
Initialize nodes in InitHdrNode().  Arrange for nodes cleanup in rf_FreeDAG().

- Add a "list_next" to RF_DagNode_t to keep track of nodes on the
above "nodes" list.  (This is distinct from the "next" field of
RF_DagNode_t, which keeps track of the firing order of nodes.)
"list_next" gets used in the cleanup routines, and in traversing
through a set of nodes that belong to a particular set of nodes
(e.g. those belonging to xorNodes for a given DAG).

- use rf_AllocDAGNode() instead of mallocs of variable-sized arrays of
RF_DagNode_t's.  Mostly mechanical changes to convert the DAG construction
from "access nodes via an array index" to "access nodes via a 'nextnode'
pointer".

- rework a couple of tricky spots where assumptions about the node order
was being abused.

- performance remains consistent with performance before these changes.

[Thanks to Simon Burge (simonb at you.know.where) for looking over
the mechanical changes to make sure I didn't biff anything.]
2004-03-18 16:40:05 +00:00
pk f72e36ac23 obp_v2_finddevice: bounds check on local char buffer.
prom_findnode: implement node name matching for device named containing
commas, cf. IEEE 1275, section 4.3.6.
2004-03-18 15:24:19 +00:00
pk bb3bbfa647 Implement OPIOCFINDDEVICE. 2004-03-18 15:14:33 +00:00
pk f52adf179f Remove unused `search_prom()' macro. 2004-03-18 15:13:59 +00:00
kleink 5ba92ad7be Normalize multiple inclusion protection symbol names. 2004-03-18 13:59:14 +00:00
hannken ac4d48d92e Rename PROM_getpropstring* => prom_getpropstring* 2004-03-18 12:26:51 +00:00
dan b912bfcc09 Fix a longstanding bug in key-handling for the blowfish cipher.
This is an incompatible change, and will break all existing cgd images
encrypted with blowfish. Users will need to dump their data before
booting a kernel with this change, and recreate cgd's and restore data
afterwards.

I believe this affects a very small number of users other than myself;
indeed after several alert mails in an attempt to find them, only 2
such users have come forward. They have both agreed the requirement
for backwards compatibility does not warrant the effort nor the mess
in the code.  This code does exist, if it should later prove to be
needed, but will not be in the tree.

Further, by the nature of the issue, I have strong reasons to believe
that, even if they missed these mails, there would be few other users
of blowfish who update their systems with any regularity; any such
users would have tripped over the problem in the same way I did when
it was first found over a year ago.

The problem stems from two issues with the underlying blowfish
encryption routines used by cgd:
 - they take key length arguments counted in bytes, rather than bits
   like all the opther ciphers.
 - they silently truncate any keys longer than an internal limit,
   rather than returning an error (which would have exposed the
   previous discrepancy immediately).

As a result, the kernel reads too much data as the key from cgdconfig,
and then truncates most of it. This can easily be demonstrated/tested.
Currently, Blowfish users will find that if they mis-enter the cgd
passphrase on the first attempt, when validation fails and cgdconfig
prompts for the passphrase again, the cgd will not correctly configure
even when given a correct passphrase.
2004-03-18 10:42:08 +00:00
sekiya 27be14d39c Checkpoint the GR2 wscons driver. Heavily derived from lonewolf@'s newport
driver.  Still some issues:

* framebuffer setup seems incomplete.  Some drawing primitives work 100%
  of the time, while others fail one in ten tries.  Perhaps my board is
  slightly broken, as the exact model as probed by ARCS seems to shift
  between Elan and XS24 from time to time.
* characters are drawn bottom-up rather than top-down (as the wsfont
  definitions expect).
2004-03-18 08:52:04 +00:00
sekiya 0ee588cc1c Add GR2. 2004-03-18 08:40:46 +00:00
sekiya bf7ef66f3b Add console attach glue for GR2. 2004-03-18 08:40:24 +00:00
sekiya a924cfbf24 Add register definitions and console prototype header for the SGI GR2 family
of framebuffers.
2004-03-18 08:39:17 +00:00
sekiya d1ae192917 Add console type for SGI GR2 family. 2004-03-18 08:30:58 +00:00
cgd 50d45978ec bump RX and TX ring sizes to 256 entries each. would be better to make
them larger, but then i'd need to tweak the allocation mechanism so they
were *guaranteed* to be physically contiguous.
2004-03-18 06:59:30 +00:00
cgd 49d5d889b3 in PERIPH_REV3 DMA code, fix calculation of pkt size (not that it matters
for <= 4k packets), and also interrupt on end of pkt only.  cuts tx intrs
by a factor of >3 for simon's fave 100Mbps ttcp test.
2004-03-18 06:30:03 +00:00
simonb 0c55ae72f4 Fix pass3 Tx DMA - when an mbuf spans a page boundary, make sure that
it either is sitting in contiguous physical RAM or split the mbuf
 into two Tx descriptors.  Not the prettiest patch, but works well in
 practice - gets about an 8% decrease on CPU time for a simple ttcp TCP
 Tx benchmark.  Thanks to Chris Demetriou for some debugging help.
Add some event counters.
Remove some #if 0'd debug code.
2004-03-18 05:57:58 +00:00
christos b4d69b5716 PR/24814: Colin Percival: sysv_sem waiter counting problem 2004-03-18 01:16:44 +00:00
uwe 0e524a56a1 Scandinavian keyboard layout for Jornada 680/690. 2004-03-18 01:11:58 +00:00
mycroft 2fef5d8dfc Something I posted to tech-kern a long time ago...
Slightly simplify uvm_map_extract() slightly by eliminating "oldstart".
2004-03-17 23:58:12 +00:00
mycroft 2d3bb76a10 A random patch that's been in my source tree...
Figure out whether the shared memory region is word-accessible in the same
place we figure out its size, and store this in the softc, rather than using a
series of comparisons later.
2004-03-17 23:47:16 +00:00
wrstuden 58472c3385 Have Locore zero out the bss (which includes our stack) BEFORE
we start calling into C code. Previously we called memset() in our
C code. Unfortunately the compiler would sometimes store local variables
on the statck, which got killed by the memset(). Oops!
2004-03-17 23:32:22 +00:00
wrstuden 86948e4bf1 Bump version to help track down issues with kernel loading. 2004-03-17 20:41:17 +00:00
scw 6946234e5e Use PRIu64 and PRIx64 in place of %llu and %llx format strings for
printing variables of type u_int64_t.
2004-03-17 20:27:57 +00:00
scw b4e83ea72c Re-enable COMPAT_NETBSD32 2004-03-17 20:24:40 +00:00
scw fe2418e50c Add COMPAT_16. 2004-03-17 20:24:18 +00:00
scw 62a0c71155 Make COMPAT_NETBSD32 build again. 2004-03-17 20:23:28 +00:00
scw fffcfa6444 Always check for the SHmedia entry point hack. The in-tree toolchain
doesn't need it, but SuperH's toolchain does.
2004-03-17 20:22:11 +00:00
scw 3b1323d3c7 Pass the ABI (32/64-bit) to the linker. 2004-03-17 20:20:43 +00:00
matt f9730c006d Fix typo (pckbort -> pckbport) 2004-03-17 18:10:51 +00:00
dyoung 9ef4dd42f2 Prevent a buffer overflow that's been seen in the wild. The firmware
will sometimes return 0; subtracting 1 from that yields a too-big
buffer length.
2004-03-17 17:19:13 +00:00
pk ea53363e84 Rename PROM_getprop*() => prom_getprop*(). 2004-03-17 17:04:58 +00:00
dyoung 73a618d5f3 In wi(4), wi_choose_rate used to contain device-independent code.
I have pulled that code into the function ieee80211_rssadapt_choose
so that I can re-use it in ath(4), atw(4), and in other drivers.

In rssadapt(9), I have also created a struct ieee80211_rssadapt_expavgctl
that contains parameters for rate adaptation. When IEEE80211_RSSADAPT_DEBUG
is enabled, I will using sysctl to expose an ieee80211_rssadapt_expavgctl
for each wireless device.

Also in rssadapt(9), I have introduced an interpolate() macro which
makes the exponential-averaging code more compact.
2004-03-17 17:00:34 +00:00
pk fcac5c14aa Pass the buffer size to PROM_getpropstringA(), as in sparc. 2004-03-17 15:22:57 +00:00
pk 370bb883e5 Print the host Id in mainbus_attach() instead of clock_attach(). 2004-03-17 14:35:53 +00:00
pk 00aaee7ade Drop myetheraddr(); 2004-03-17 14:26:59 +00:00
aymeric 3ddd2de94c defparam PMAP_MEMLIMIT 2004-03-17 14:14:02 +00:00
pk 8512c4b642 Use prom_getoption() and drop home-grown string-to-integer conversion code. 2004-03-17 14:03:22 +00:00
pk c188a40b85 Update previous change: set defaults properly. 2004-03-17 14:00:46 +00:00
pk 6c325ce299 ffb_attach: Use prom_getoption() and drop home-grown string-to-integer
conversion code.
2004-03-17 13:58:14 +00:00
martin fde39f7603 For sparc*: myetheraddr is no more 2004-03-17 13:54:09 +00:00
pk da415e73f9 De-__P(); 2004-03-17 11:00:19 +00:00
pk 6446b225e5 prom_getprop(): Make the `element size' argument a size_t (like sparc64). 2004-03-17 10:48:21 +00:00
yamt a2d33a3097 nfsrv_zapsock: zap an nfsd socket only if it's valid. 2004-03-17 10:43:35 +00:00
yamt 995e6c528b nfsrv_zapsock: remove slp from nfssvc_sockpending before zapping. 2004-03-17 10:42:37 +00:00
yamt ec3b565db1 nfs_sndlock: fix nfsd null dereference. 2004-03-17 10:40:34 +00:00
yamt fd4b77d30f SHUT_RDWR rather than bare 2. 2004-03-17 10:37:02 +00:00
yamt 639cdf812b sokvaalloc: unreserve kva if uvm_km_valloc_wait failed. 2004-03-17 10:30:18 +00:00
yamt 82b343cc81 - move kern.somaxkva sysctl stuff from init_sysctl.c to uipc_socket.c.
- when changing its value, wakeup sokva waiters.
2004-03-17 10:21:59 +00:00
yamt 097a3aea2e - fix locking of sosend kva allocation.
- some comments.
2004-03-17 10:03:26 +00:00
yamt 2429c10607 remove per-socket pendfree list. 2004-03-17 09:58:15 +00:00
martin ac3bee274a Fix hme for pci based sparcs (krups). 2004-03-17 08:58:23 +00:00