]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
loader: Add pnp functions for autoloading modules based on linker.hints
authormanu <manu@FreeBSD.org>
Thu, 23 May 2019 19:26:50 +0000 (19:26 +0000)
committermanu <manu@FreeBSD.org>
Thu, 23 May 2019 19:26:50 +0000 (19:26 +0000)
commit6fbab7eb4f942eea26206e4570d4073e71cf7205
tree316fd4a7192492497f65d54c9813bf503ef184c3
parent9b66fc74ef0f99753c11b2a44dcc1397a09b5a42
loader: Add pnp functions for autoloading modules based on linker.hints

This adds some new commands to loader :

- pnpmatch
   This takes a pnpinfo string as argument and tries to find a kernel module
   associated with it. -v and -d option are available and are the same as in
   devmatch (v is verbose, d dumps the hints).
- pnpload
   This takes a pnpinfo string as argument and tries to load a kernel module
   associated with it.
- pnpautoload
   This will attempt to load every kernel module for each buses. Each buses are
   probed, the probe function will generate pnpinfo string and load kernel module
   associated with it if it exists.

Only simplebus for FDT system is implemented for now.
Since we need the dtb and overlays to be applied before searching the tree
fdt_devmatch_next will load and apply the dtb + overlays.

All the pnp parsing code comes from devmatch and is the same at 99%.

Reviewed by: imp, kevans
Differential Revision: https://reviews.freebsd.org/D19498
stand/common/module.c
stand/fdt/fdt_loader_cmd.c
stand/fdt/fdt_platform.h