xref: /freebsd/share/man/man4/ntb_hw_intel.4 (revision 38069501)
1.\"
2.\" Copyright (c) 2016-2017 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 August 30, 2017
29.Dt NTB_HW_INTEL 4
30.Os
31.Sh NAME
32.Nm ntb_hw_intel
33.Nd Intel(R) Non-Transparent Bridge driver
34.Sh SYNOPSIS
35To compile this driver into your kernel,
36place the following lines in your kernel configuration file:
37.Bd -ragged -offset indent
38.Cd "device ntb"
39.Cd "device ntb_hw_intel"
40.Ed
41.Pp
42Or, to load the driver as a module at boot, place the following line in
43.Xr loader.conf 5 :
44.Bd -literal -offset indent
45ntb_hw_intel_load="YES"
46.Ed
47.Sh DESCRIPTION
48The
49.Nm ntb_hw_intel
50driver provides support for the Non-Transparent Bridge (NTB) hardware in
51Intel Xeon E3/E5 and S1200 processor families, which allow one of their PCIe
52ports to be switched from transparent to non-transparent bridge mode.
53In this mode bridge looks not as a PCI bridge, but as PCI endpoint device.
54The driver hides hardware details, exposing memory windows, scratchpads
55and doorbells of the other side via hardware independent KPI to
56.Xr ntb 4
57subsystem.
58.Pp
59The hardware provides 2 or 3 memory windows to the other system's memory,
6016 scratchpad registers and 14 or 34 doorbells to interrupt the other system.
61On Xeon processors one of memory windows is typically consumed by the driver
62itself to workaround multiple hardware erratas.
63.Sh CONFIGURATION
64The NTB configuration should be set by BIOS.
65It includes enabling NTB, choosing between NTB-to-NTB (back-to-back) or
66NTB-to-Root Port mode,
67enabling split BAR mode (one of two 64-bit BARs can be split into two 32-bit
68ones) and configuring BAR sizes in bits (from 12 to 29/39) for both NTB sides.
69.Pp
70The recommended configuration is NTB-to-NTB mode, split bar is enabled and
71all BAR sizes are set to 20 (1 MiB).
72This needs to be done on both systems.
73.Sh SEE ALSO
74.Xr if_ntb 4 ,
75.Xr ntb_transport 4 ,
76.Xr ntb 4 ,
77.Sh AUTHORS
78.An -nosplit
79The
80.Nm
81driver was developed by Intel and originally written by
82.An Carl Delsey Aq Mt carl@FreeBSD.org .
83Later improvements were done by
84.An Conrad E. Meyer Aq Mt cem@FreeBSD.org
85and
86.An Alexander Motin Aq Mt mav@FreeBSD.org .
87.Sh BUGS
88NTB-to-Root Port mode is not yet supported, but it doesn't look very useful.
89.Pp
90On Xeon v2/v3/v4 processors split BAR mode should be enabled to allow
91SB01BASE_LOCKUP errata workaround to be applied by the driver.
92.Pp
93There is no way to protect your system from malicious behavior on the other
94system once the link is brought up.
95Anyone with root or kernel access on the other system can read or write to
96any location on your system.
97In other words, only connect two systems that completely trust each other.
98