summaryrefslogtreecommitdiffstats
path: root/sys/dev/ubsec
Commit message (Collapse)AuthorAgeFilesLines
* Cast the bus_size_t to a intmax_t rather than assuming type-punning toimp2010-03-291-2/+2
| | | | a size_t. Switch from %z to %j.
* strict kobj sigs: fix assortment of device_detach and device_shutdown implsavg2009-06-111-2/+3
| | | | | | | with common issue of having void return type instead of int Reviewed by: imp, current@ Approved by: jhb (mentor)
* Add PCI IDs for the Broadcom 5825 incarnation.philip2009-05-072-2/+6
| | | | | Submitted by: Brian A. Seklecki <bseklecki -at- collaborativefusion.com> MFC after: 1 day
* Overhaul driver/subsystem api's:sam2007-03-211-25/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | o make all crypto drivers have a device_t; pseudo drivers like the s/w crypto driver synthesize one o change the api between the crypto subsystem and drivers to use kobj; cryptodev_if.m defines this api o use the fact that all crypto drivers now have a device_t to add support for specifying which of several potential devices to use when doing crypto operations o add new ioctls that allow user apps to select a specific crypto device to use (previous ioctls maintained for compatibility) o overhaul crypto subsystem code to eliminate lots of cruft and hide implementation details from drivers o bring in numerous fixes from Michale Richardson/hifn; mostly for 795x parts o add an optional mechanism for mmap'ing the hifn 795x public key h/w to user space for use by openssl (not enabled by default) o update crypto test tools to use new ioctl's and add cmd line options to specify a device to use for tests These changes will also enable much future work on improving the core crypto subsystem; including proper load balancing and interposing code between the core and drivers to dispatch small operations to the s/w driver as appropriate. These changes were instigated by the work of Michael Richardson. Reviewed by: pjd Approved by: re
* o break newbus api: add a new argument of type driver_filter_t topiso2007-02-231-1/+1
| | | | | | | | | | | | | bus_setup_intr() o add an int return code to all fast handlers o retire INTR_FAST/IH_FAST For more info: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=465712+0+current/freebsd-current Reviewed by: many Approved by: re@
* Switch to using STAILQ_REMOVE_HEAD() instead of STAILQ_REMOVE_HEAD_UNTIL().ru2006-10-241-11/+11
| | | | | | | | | | | | | Submitted by: Stepan A. Baranov This corresponds to OpenBSD rev. 1.134: : revision 1.134 : date: 2004/05/04 16:59:31; author: grange; state: Exp; lines: +10 -10 : Remove useless ``elm'' argument from the SIMPLEQ_REMOVE_HEAD macro. : This matches our SLIST behaviour and NetBSD's SIMPLEQ as well. : : ok millert krw deraadt
* Trim trailing whitespace.jhb2006-10-021-11/+11
|
* - Use m_getcl(), m_get(), and m_gethdr() rather than the older macros forjhb2006-08-021-37/+26
| | | | | | | | | | | | alloc'ing mbufs so that there is less error handling required. - Go ahead and account for the data space in the first mbuf before entering the loop to alloc more mbuf's. This simplifies the loop logic and avoids confusing Coverity. CID: 817 Reviewed by: sam Tested by: pjd Found by: Coverity Prevent (tm)
* Handle errors in the same way it is done in safe(4).pjd2006-06-061-2/+4
|
* Don't increase hst_obytes field twice - it is already done at the beginingpjd2006-06-061-1/+0
| | | | | | of the function. It was wrong anyway, because we also support uio's structures, not only mbufs.
* Use newly added functions to simplify the code.pjd2006-06-041-34/+12
|
* Use defines from cryptodev.h.pjd2006-06-041-2/+2
|
* - Remove HMAC_BLOCK_LEN, it serves no purpose.pjd2006-06-041-4/+6
| | | | - Use defines of used algorithm instead of HMAC_BLOCK_LEN.
* Add support for the CRD_F_KEY_EXPLICIT flag for both encryption andpjd2006-06-041-67/+79
| | | | authentication operations.
* Don't forget to destroy the sc_freeqlock mutex on detach.pjd2006-06-041-0/+1
|
* Forgot to remove the line.pjd2006-05-231-1/+0
|
* Fix HMACs handling with uio's by not using crp_mac for storing calculatedpjd2006-05-221-4/+5
| | | | HMAC. crp_mac is going to be removed.
* Protect the sc_needwakeup field with the sc_freeqlock mutex.pjd2006-05-221-4/+11
|
* Honor cri_mlen value.pjd2006-05-172-2/+13
| | | | | | Reviewed by: sam Tested on: hifn(4), ubsec(4) Compile-tested: safe(4)
* Since DELAY() was moved, most <machine/clock.h> #includes have beenphk2006-05-161-1/+0
| | | | unnecessary.
* ubsec(4) doesn't support explicitly provided keys. Return an error insteadpjd2006-04-101-0/+7
| | | | of encrypting/decrypting data with a wrong key.
* Use BUS_PROBE_DEFAULT in preference to 0. Also for vx, returnimp2005-03-011-3/+3
| | | | | BUS_PROBE_LOW_PRIORITY in stead of ifdef for devices that xl and vx both support so that xl will snarf them on up.
* Start each of the license/copyright comments with /*-, minor shuffle of linesimp2005-01-063-3/+3
|
* Add missing <sys/module.h> includesphk2004-05-301-0/+1
|
* Convert callers to the new bus_alloc_resource_any(9) API.njl2004-03-171-4/+4
| | | | | Submitted by: Mark Santcroos <marks@ripe.net> Reviewed by: imp, dfr, bde
* Use __FBSDID().obrien2003-08-241-2/+3
| | | | Also some minor style cleanups.
* Prefer new location of pci include files (which have only been in theimp2003-08-221-2/+2
| | | | | tree for two or more years now), except in a few places where there's code to be compatible with older versions of FreeBSD.
* Change instances of callout_init that specify MPSAFE behaviour tosam2003-08-191-2/+1
| | | | | use CALLOUT_MPSAFE instead of "1" for the second parameter. This does not change the behaviour; it just makes the intent more clear.
* Mega busdma API commit.scottl2003-07-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Add two new arguments to bus_dma_tag_create(): lockfunc and lockfuncarg. Lockfunc allows a driver to provide a function for managing its locking semantics while using busdma. At the moment, this is used for the asynchronous busdma_swi and callback mechanism. Two lockfunc implementations are provided: busdma_lock_mutex() performs standard mutex operations on the mutex that is specified from lockfuncarg. dftl_lock() is a panic implementation and is defaulted to when NULL, NULL are passed to bus_dma_tag_create(). The only time that NULL, NULL should ever be used is when the driver ensures that bus_dmamap_load() will not be deferred. Drivers that do not provide their own locking can pass busdma_lock_mutex,&Giant args in order to preserve the former behaviour. sparc64 and powerpc do not provide real busdma_swi functions, so this is largely a noop on those platforms. The busdma_swi on is64 is not properly locked yet, so warnings will be emitted on this platform when busdma callback deferrals happen. If anyone gets panics or warnings from dflt_lock() being called, please let me know right away. Reviewed by: tmm, gibbs
* Add support to eliminate a context switch per crypto op when using thesam2003-06-271-1/+1
| | | | | | | | | | | software crypto device: o record crypto device capabilities in each session id o add a capability that indicates if the crypto driver operates synchronously o tag the software crypto driver as operating synchronously This commit also introduces crypto session id macros that cleanup their construction and querying.
* Redo locking for proper SMP operation:sam2003-06-022-52/+50
| | | | | | | | o replace driver-global lock with three locks: one for the handling of mcr1 operations, one for handling of mcr2 operations, and one for the mcr1 free list o mark the interrupt handler MPSAFE o don't use locking on detach; disabling interrupts is sufficient (I think)
* recognize the Sun Crypto 5821 and Crypto 1K cards;sam2003-04-272-4/+22
| | | | | | | they both use the Broadcom 5821 Submitted by: Panagiotis Astithas MFC after: 1 day
* Including <sys/stdint.h> is (almost?) universally only to be able to usephk2003-03-181-1/+0
| | | | | %j in printfs, so put a newsted include in <sys/systm.h> where the printf prototype lives and save everybody else the trouble.
* o add crypto driver glue for using the new rndtest driver/module; this issam2003-03-112-6/+36
| | | | | | conditional in each driver on foo_RNDTEST being defined_ o bring HIFN_DEBUG and UBSEC_DEBUG out to be visible options; they control the debugging printfs that are set with hw.foo.debug (e.g. hw.hifn.debug)
* correct output byte count statistic collectionsam2003-03-111-2/+3
|
* add 5801 and 5802 recognition (somehow lost in transition from openbsd)sam2003-02-272-2/+9
| | | | Noticed by: Larry Baird <lab@gta.com>
* o instead of applying arbitrary tunables, just honor the COP_F_BATCHsam2003-02-241-73/+46
| | | | | | | | flag that can be marked on each symmetric op o eliminate hw.ubsec.maxbatch and hw.ubsec.maxaggr since they are not needed anymore o change ubsec_feed to return void instead of int since zero is always returned and noone ever looked at the return value
* Back out M_* changes, per decision of the TRB.imp2003-02-191-6/+6
| | | | Approved by: trb
* add 5823 device id's; this allows 5823 parts to function but you cannotsam2003-02-072-2/+7
| | | | | | | use the AES functionality Submitted by: Jonathan Stone <jonathan@DSG.Stanford.EDU> MFC after: 1 day
* shield kernel data structures so user apps can include this filesam2003-02-071-0/+3
|
* Remove M_TRYWAIT/M_WAITOK/M_WAIT. Callers should use 0.alfred2003-01-211-6/+6
| | | | Merge M_NOWAIT/M_DONTWAIT into a single flag M_NOWAIT.
* move sysctl's under hw.ubsecsam2003-01-201-9/+10
|
* correct printf formatsam2003-01-111-1/+1
| | | | Noticed by: alpha tinderbox
* fix memory allocation problems and collateral damage:sam2003-01-062-71/+112
| | | | | | | | | | | | o create a separate tag for each object allocated with bus_dmamem_alloc so the tag's maxsize is setup appropriately; this reduces memory allocation for the queue descriptors from 16M to what it should be and also fixes memory allocation for public key operands o release bus dma resources on detach so module usage doesn't leak o remove public key op disable now that bus dma memory allocation is fixed o collect attach error handling in one place Sponsored by: Vernier Networks
* Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,schweikh2003-01-011-2/+2
| | | | especially in troff files.
* MFS 1.6.2.3: fixup statistics; turn off batching by default; add maxsam2002-12-302-12/+63
| | | | | | aggregation tunable and set it to 1 to minimize latency Sponsored by: Vernier Networks
* Correct mbuf packet header propagation. Previously, packet headerssam2002-12-301-2/+4
| | | | | | | | | | | | | | | | | | | | | | were sometimes propagated using M_COPY_PKTHDR which actually did something between a "move" and a "copy" operation. This is replaced by M_MOVE_PKTHDR (which copies the pkthdr contents and "removes" it from the source mbuf) and m_dup_pkthdr which copies the packet header contents including any m_tag chain. This corrects numerous problems whereby mbuf tags could be lost during packet manipulations. These changes also introduce arguments to m_tag_copy and m_tag_copy_chain to specify if the tag copy work should potentially block. This introduces an incompatibility with openbsd which we may want to revisit. Note that move/dup of packet headers does not handle target mbufs that have a cluster bound to them. We may want to support this; for now we watch for it with an assert. Finally, M_COPYFLAGS was updated to include M_FIRSTFRAG|M_LASTFRAG. Supported by: Vernier Networks Reviewed by: Robert Watson <rwatson@FreeBSD.org>
* Quiet some DIAGNOSTIC printf warnings with band-aid casts.jhb2002-11-071-4/+5
|
* Module-ize the 'core' crypto stuff. This may still need to be compiledmarkm2002-10-161-0/+1
| | | | | | | | | into the kernel by default (if required), but other modules can now depend() on this. Fix inter-module dependancy. Earlier version OK'ed by: sam
* Be consistent about functions being static.phk2002-10-161-2/+2
| | | | Spotted by: FlexeLint.
OpenPOWER on IntegriCloud