]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add kernel and userspace code to dump the firmware state of supported
authorhselasky <hselasky@FreeBSD.org>
Thu, 8 Mar 2018 15:21:56 +0000 (15:21 +0000)
committerhselasky <hselasky@FreeBSD.org>
Thu, 8 Mar 2018 15:21:56 +0000 (15:21 +0000)
commitd1efa6e93f5f5e44b11af1a4a3183c5d714e45e5
tree4f99d8488e9959de7f83866260a060f215f8fdd4
parent713d55ed5736946025e100bff4251515385c7321
Add kernel and userspace code to dump the firmware state of supported
ConnectX-4/5 devices in mlx5core.

The dump is obtained by reading a predefined register map from the
non-destructive crspace, accessible by the vendor-specific PCIe
capability (VSC). The dump is stored in preallocated kernel memory and
managed by the mlx5tool(8), which communicates with the driver using a
character device node.

The utility allows to store the dump in format
    <address> <value>
into a file, to reset the dump content, and to manually initiate the
dump.

A call to mlx5_fwdump() should be added at the places where a dump
must be fetched automatically. The most likely place is right before a
firmware reset request.

Submitted by: kib@
MFC after: 1 week
Sponsored by: Mellanox Technologies
21 files changed:
etc/mtree/BSD.include.dist
include/Makefile
share/man/man4/Makefile
share/man/man4/mlx5io.4 [new file with mode: 0644]
share/man/man5/src.conf.5
share/mk/src.opts.mk
sys/conf/files
sys/dev/mlx5/driver.h
sys/dev/mlx5/mlx5_core/mlx5_core.h
sys/dev/mlx5/mlx5_core/mlx5_fwdump.c [new file with mode: 0644]
sys/dev/mlx5/mlx5_core/mlx5_fwdump_regmaps.c [new file with mode: 0644]
sys/dev/mlx5/mlx5_core/mlx5_main.c
sys/dev/mlx5/mlx5io.h [new file with mode: 0644]
sys/modules/mlx5/Makefile
targets/pseudo/userland/Makefile.depend
tools/build/options/WITHOUT_MLX5TOOL [new file with mode: 0644]
tools/build/options/WITH_MLX5TOOL [new file with mode: 0644]
usr.sbin/Makefile
usr.sbin/mlx5tool/Makefile [new file with mode: 0644]
usr.sbin/mlx5tool/mlx5tool.8 [new file with mode: 0644]
usr.sbin/mlx5tool/mlx5tool.c [new file with mode: 0644]