opnsense-src/sys
Luigi Rizzo 33d5497079 Cleanup and document the implementation of firmware(9) based on
a version that i posted earlier on the -current mailing list,
and subsequent feedback received.

The core of the change is just in sys/firmware.h and kern/subr_firmware.c,
while other files are just adaptation of the clients to the ABI change
(const-ification of some parameters and hiding of internal info,
so this is fully compatible at the binary level).

In detail:
- reduce the amount of information exported to clients in struct firmware,
  and constify the pointer;

- internally, document and simplify the implementation of the various
  functions, and make sure error conditions are dealt with properly.

The diffs are large, but the code is really straightforward now (i hope).

Note also that there is a subtle issue with the implementation of
firmware_register(): currently, as in the previous version, we just
store a reference to the 'imagename' argument, but we should rather
copy it because there is no guarantee that this is a static string.
I realised this while testing this code, but i prefer to fix it in
a later commit -- there is no regression with respect to the past.

Note, too, that the version in RELENG_6 has various bugs including
missing locks around the module release calls, mishandling of modules
loaded by /boot/loader, and so on, so an MFC is absolutely necessary
there.  I was just postponing it until this cleanup to avoid doing
things twice.

MFC after: 1 week
2007-02-15 17:21:31 +00:00
..
amd64 Fix accidental removal of an empty line from the previous commit. 2007-02-15 01:20:43 +00:00
arm Cleanup and document the implementation of firmware(9) based on 2007-02-15 17:21:31 +00:00
boot Document the init_chroot and init_script variables. 2007-02-04 06:35:10 +00:00
bsm Merge OpenBSM 1.0 alpha 12 import changes into src/sys/bsm. New events 2006-09-25 12:22:07 +00:00
cam Use the more specific 'EM732X' designation rather than * to disable sync 2007-01-23 17:29:31 +00:00
coda coda_vptofh is never defined nor used. 2007-02-02 15:47:28 +00:00
compat Remove extern int hz; use proper include file instead. 2007-02-02 08:58:16 +00:00
conf Teach DDB how to print sockets, socket buffers, protosw's, and domain 2007-02-15 01:28:22 +00:00
contrib Clean up pfr_kentry_pl2 as well. This fixes a kernel panic in the vm.zone 2007-01-01 16:51:11 +00:00
crypto Initialize T1 to silent gcc warning. 2006-10-22 02:19:33 +00:00
ddb Use FOREACH_PROC_IN_SYSTEM instead of using its unrolled form. 2007-01-17 15:05:52 +00:00
dev Cleanup and document the implementation of firmware(9) based on 2007-02-15 17:21:31 +00:00
fs Forced commit and #include changes for repo copy from 2007-02-11 13:54:25 +00:00
gdb Convert to new console api 2006-05-26 13:54:27 +00:00
geom #include <sys/systm.h> before <sys/geom.h> to get KASSERT(), and fix LINT build. 2007-02-08 04:02:56 +00:00
gnu Cylinder group bitmaps and blocks containing inode for a snapshot 2007-01-23 10:01:19 +00:00
i4b Fix fat-fingering in previous commit. 2006-12-29 16:38:22 +00:00
i386 Regen. 2007-02-15 00:57:04 +00:00
ia64 Now that the free page queue mutex is a sleep mutex, we cannot call 2007-02-11 02:52:54 +00:00
isa Cleaned up declaration and initialization of clock_lock. It is only 2007-01-23 08:01:20 +00:00
kern Cleanup and document the implementation of firmware(9) based on 2007-02-15 17:21:31 +00:00
libkern Add strstr() function to the libkern. 2006-08-12 15:28:39 +00:00
modules Makefile changes to reflect moving sys/isofs/cd9660 to sys/fs/cd9660. 2007-02-11 14:01:32 +00:00
net Use __NO_STRICT_ALIGNMENT, instead of special casing ia64 and sparc64. 2007-02-09 00:09:35 +00:00
net80211 clear/reclaim challenge text when switching auth mode and operating as an ap 2007-02-04 05:49:16 +00:00
netatalk Clean up DDP layer netatalk code: 2007-01-12 15:07:51 +00:00
netatm Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netgraph In the output path, mask off M_BCAST|M_MCAST so as to prevent incorrect 2007-02-09 12:35:29 +00:00
netinet - Copyright updates (aka 2007) 2007-02-12 23:24:31 +00:00
netinet6 - Copyright updates (aka 2007) 2007-02-12 23:24:31 +00:00
netipsec s,#if INET6,#ifdef INET6, 2006-12-14 17:33:46 +00:00
netipx Factor out UCB and my copyrights from copyrights of Mike Mitchell; 2007-01-08 22:14:00 +00:00
netkey With exception of the if_name() macro, all definitions in net_osdep.h 2006-08-04 21:27:40 +00:00
netnatm Factor out my copyrights + licenses from Charles D. Cranor and 2007-01-08 22:30:39 +00:00
netncp Sweep kernel replacing suser(9) calls with priv(9) calls, assigning 2006-11-06 13:42:10 +00:00
netsmb Backing out the wrong fix which could possibly trash the memory if devfs 2007-02-09 17:22:10 +00:00
nfs NFSv4 client: 2006-11-28 19:33:28 +00:00
nfs4client Rename some functions and variables from nfs_* to nfs4_* to avoid 2007-01-25 14:33:13 +00:00
nfsclient Add missing MNT_ILOCK around some mnt_kern_flag accesses. 2007-02-11 04:01:10 +00:00
nfsserver Get the vfs giant lock before calling nfs_access. 2007-02-13 03:27:45 +00:00
opencrypto When DIAGNOSTIC is defined, verify if we don't free crypto requests from 2006-06-06 15:04:52 +00:00
pc98 Include GEOM_LABEL in GENERIC. It's very useful and not well publicized 2007-02-09 19:03:18 +00:00
pccard I don't believe these are used at all, and can be safely removed 2006-01-15 06:49:28 +00:00
pci Change the remainder of the drivers for DMA'ing devices enabled in the 2007-01-21 19:32:51 +00:00
powerpc Remove the cast to caddr_t for sfp, they're not needed. 2007-02-12 08:59:33 +00:00
rpc Fix up some cut-n-paste damage and some out-of-date comments. 2006-01-20 15:20:41 +00:00
security In mac_biba_check_system_swapoff(), don't extract the object label since 2007-02-10 08:59:39 +00:00
sparc64 Include GEOM_LABEL in GENERIC. It's very useful and not well publicized 2007-02-09 19:03:18 +00:00
sun4v Include GEOM_LABEL in GENERIC. It's very useful and not well publicized 2007-02-09 19:03:18 +00:00
sys Cleanup and document the implementation of firmware(9) based on 2007-02-15 17:21:31 +00:00
tools Cleanup and document the implementation of firmware(9) based on 2007-02-15 17:21:31 +00:00
ufs Style(9). 2007-02-15 09:24:58 +00:00
vm Relax the page queue lock assertions in vm_page_remove() and 2007-02-15 05:43:38 +00:00
Makefile o Add cam to a list of cscope dirs. 2006-11-26 18:27:16 +00:00