FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/queue.h>
#include <sys/taskqueue.h>
#include <sys/systm.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/errno.h>
#include <sys/linker.h>
#include <sys/firmware.h>
#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/module.h>
#include <sys/eventhandler.h>
#include <sys/filedesc.h>
#include <sys/vnode.h>
Go to the source code of this file.
Data Structures | |
struct | priv_fw |
struct | fw_loadimage |
Macros | |
#define | FW_UNLOAD 0x100 |
#define | PRIV_FW(x) |
Functions | |
__FBSDID ("$FreeBSD$") | |
static | LIST_HEAD (priv_fw) |
const struct firmware * | firmware_register (const char *imagename, const void *data, size_t datasize, unsigned int version, const struct firmware *parent) |
int | firmware_unregister (const char *imagename) |
static void | loadimage (void *arg, int npending __unused) |
const struct firmware * | firmware_get_flags (const char *imagename, uint32_t flags) |
const struct firmware * | firmware_get (const char *imagename) |
void | firmware_put (const struct firmware *p, int flags) |
static void | set_rootvnode (void *arg, int npending) |
static void | firmware_mountroot (void *arg) |
EVENTHANDLER_DEFINE (mountroot, firmware_mountroot, NULL, 0) | |
static void | unloadentry (void *unused1, int unused2) |
static int | firmware_modevent (module_t mod, int type, void *unused) |
DECLARE_MODULE (firmware, firmware_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST) | |
MODULE_VERSION (firmware, 1) | |
Variables | |
static moduledata_t | firmware_mod |
#define FW_UNLOAD 0x100 |
#define PRIV_FW | ( | x | ) |
Definition at line 116 of file subr_firmware.c.
__FBSDID | ( | "$FreeBSD$" | ) |
DECLARE_MODULE | ( | firmware | , |
firmware_mod | , | ||
SI_SUB_DRIVERS | , | ||
SI_ORDER_FIRST | |||
) |
EVENTHANDLER_DEFINE | ( | mountroot | , |
firmware_mountroot | , | ||
NULL | , | ||
0 | |||
) |
const struct firmware * firmware_get | ( | const char * | imagename | ) |
Definition at line 342 of file subr_firmware.c.
References firmware_get_flags().
const struct firmware * firmware_get_flags | ( | const char * | imagename, |
uint32_t | flags | ||
) |
Definition at line 288 of file subr_firmware.c.
References fw_loadimage::flags, flags, fw_loadimage::imagename, loadimage(), printf(), priv_check(), priv_fw::refcnt, securelevel_gt(), and taskqueue_enqueue().
Referenced by firmware_get().
|
static |
Definition at line 452 of file subr_firmware.c.
References firmware_mountroot(), FW_UNLOAD, printf(), priv_fw::refcnt, rootvnode, taskqueue_create(), taskqueue_drain(), taskqueue_enqueue(), taskqueue_free(), taskqueue_start_threads(), taskqueue_thread_enqueue(), type, and unloadentry().
|
static |
Definition at line 391 of file subr_firmware.c.
References malloc(), printf(), set_rootvnode(), and taskqueue_enqueue().
Referenced by firmware_modevent().
void firmware_put | ( | const struct firmware * | p, |
int | flags | ||
) |
Definition at line 358 of file subr_firmware.c.
References flags, FW_UNLOAD, PRIV_FW, priv_fw::refcnt, and taskqueue_enqueue().
const struct firmware * firmware_register | ( | const char * | imagename, |
const void * | data, | ||
size_t | datasize, | ||
unsigned int | version, | ||
const struct firmware * | parent | ||
) |
Definition at line 167 of file subr_firmware.c.
References bootverbose, data, free(), malloc(), name, parent, printf(), and PRIV_FW.
int firmware_unregister | ( | const char * | imagename | ) |
Definition at line 214 of file subr_firmware.c.
References free(), and priv_fw::refcnt.
|
static |
Definition at line 122 of file subr_firmware.c.
|
static |
Definition at line 247 of file subr_firmware.c.
References bootverbose, fw_loadimage::flags, fw_loadimage::imagename, linker_reference_module(), linker_release_module(), printf(), result, and wakeup_one().
Referenced by firmware_get_flags().
MODULE_VERSION | ( | firmware | , |
1 | |||
) |
|
static |
Definition at line 379 of file subr_firmware.c.
References free(), and pwd_ensure_dirs().
Referenced by firmware_mountroot().
|
static |
Definition at line 412 of file subr_firmware.c.
References FW_UNLOAD, linker_release_module(), and priv_fw::refcnt.
Referenced by firmware_modevent().
|
static |
Definition at line 502 of file subr_firmware.c.