]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - share/man/man4/ntb_hw.4
MFC r328273 (kevlo): Document how to load nmdm(4) from a kernel module.
[FreeBSD/stable/10.git] / share / man / man4 / ntb_hw.4
1 .\"
2 .\" Copyright (c) 2016 Alexander Motin <mav@FreeBSD.org>
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd July 28, 2016
29 .Dt NTB_HW 4
30 .Os
31 .Sh NAME
32 .Nm ntb ,
33 .Nm ntb_hw
34 .Nd Intel(R) Non-Transparent Bridge driver
35 .Sh SYNOPSIS
36 To compile this driver into your kernel,
37 place the following lines in your kernel configuration file:
38 .Bd -ragged -offset indent
39 .Cd "device ntb_hw"
40 .Ed
41 .Pp
42 Or, to load the driver as a module at boot, place the following line in
43 .Xr loader.conf 5 :
44 .Bd -literal -offset indent
45 ntb_hw_load="YES"
46 .Ed
47 .Pp
48 The following tunables are settable from the
49 .Xr loader 8 :
50 .Bl -ohang
51 .It Va hw.ntb.debug_level
52 Driver debug level.
53 The default value is 0, higher means more verbose.
54 .It Va hint.ntb_hw. Ns Ar X Ns Va .config
55 Configures NTB resources split between several consumer devices.
56 Configuration of multiple consumer devices separated by commas.
57 Each device can be configured as: "<name>[:<mw>[:<spad>[:<db>]]]", where:
58 .Va name
59 is a name of the driver which should attach the device (empty means any),
60 .Va mw
61 is a number of memory windows to allocate (empty means all available),
62 .Va spad
63 is a number of scratchpad registers to allocate (empty means all available),
64 .Va db
65 is a number of doorbells to allocate (empty means all available).
66 The default configuration is empty string, which means single device
67 with all available resources allowing any driver attachment.
68 .El
69 .Sh DESCRIPTION
70 The NTB allows you to connect two computer systems using a PCIe link if they
71 have the correct equipment and connectors.
72 The
73 .Nm ntb_hw
74 driver provides support for the Non-Transparent Bridge (NTB) in the Intel S1200
75 and Xeon E3/E5 processor families.
76 The
77 .Nm
78 driver hides hardware details, exposing memory windows, scratchpads and
79 doorbells via hardware independent KPI.
80 .Pp
81 The hardware provides 2-3 memory windows to the other system's memory,
82 16 scratchpad registers and 14/34 doorbells to interrupt the other system.
83 On Xeon processors one of memory windows is typically consumed by the driver
84 to workaround multiple hardware erratas.
85 .Sh CONFIGURATION
86 The NTB configuration should be set by BIOS.
87 It includes enabling NTB, choosing between NTB-to-NTB or NTB-to-Root Port mode,
88 enabling split BAR mode (one of two 64-bit BARs can be split into two 32-bit
89 ones) and configuring BAR sizes in bits (from 12 to 29/39) for both NTB sides.
90 .Pp
91 The recommended configuration is NTB-to-NTB mode, split bar is enabled and
92 all BAR sizes are set to 20 (1 MiB).
93 This needs to be done on both systems.
94 .Sh SEE ALSO
95 .Xr ntb_transport 4 ,
96 .Xr if_ntb 4
97 .Sh AUTHORS
98 .An -nosplit
99 The
100 .Nm
101 driver was developed by Intel and originally written by
102 .An Carl Delsey Aq Mt carl@FreeBSD.org .
103 Later improvements were done by
104 .An Conrad E. Meyer Aq Mt cem@FreeBSD.org
105 and
106 .An Alexander Motin Aq Mt mav@FreeBSD.org .
107 .Sh BUGS
108 NTB-to-Root Port mode is not yet supported, but it doesn't look very useful.
109 .Pp
110 On Xeon v2/v3/v4 processors split BAR mode should be enabled to allow
111 SB01BASE_LOCKUP errata workaround to be applied by the driver.
112 .Pp
113 There is no way to protect your system from malicious behavior on the other
114 system once the link is brought up.
115 Anyone with root or kernel access on the other system can read or write to
116 any location on your system.
117 In other words, only connect two systems that completely trust each other.