xref: /freebsd/share/man/man4/ntb_hw_intel.4 (revision fa9896e082a1046ff4fbc75fcba4d18d1f2efc19)
1ed9652daSAlexander Motin.\"
2ed9652daSAlexander Motin.\" Copyright (c) 2016-2017 Alexander Motin <mav@FreeBSD.org>
3ed9652daSAlexander Motin.\" All rights reserved.
4ed9652daSAlexander Motin.\"
5ed9652daSAlexander Motin.\" Redistribution and use in source and binary forms, with or without
6ed9652daSAlexander Motin.\" modification, are permitted provided that the following conditions
7ed9652daSAlexander Motin.\" are met:
8ed9652daSAlexander Motin.\" 1. Redistributions of source code must retain the above copyright
9ed9652daSAlexander Motin.\"    notice, this list of conditions and the following disclaimer.
10ed9652daSAlexander Motin.\" 2. Redistributions in binary form must reproduce the above copyright
11ed9652daSAlexander Motin.\"    notice, this list of conditions and the following disclaimer in the
12ed9652daSAlexander Motin.\"    documentation and/or other materials provided with the distribution.
13ed9652daSAlexander Motin.\"
14ed9652daSAlexander Motin.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15ed9652daSAlexander Motin.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16ed9652daSAlexander Motin.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17ed9652daSAlexander Motin.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18ed9652daSAlexander Motin.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19ed9652daSAlexander Motin.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20ed9652daSAlexander Motin.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21ed9652daSAlexander Motin.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22ed9652daSAlexander Motin.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23ed9652daSAlexander Motin.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24ed9652daSAlexander Motin.\" SUCH DAMAGE.
25ed9652daSAlexander Motin.\"
266660ef6eSMark Johnston.Dd October 11, 2020
27ed9652daSAlexander Motin.Dt NTB_HW_INTEL 4
28ed9652daSAlexander Motin.Os
29ed9652daSAlexander Motin.Sh NAME
30ed9652daSAlexander Motin.Nm ntb_hw_intel
31ed9652daSAlexander Motin.Nd Intel(R) Non-Transparent Bridge driver
32ed9652daSAlexander Motin.Sh SYNOPSIS
33ed9652daSAlexander MotinTo compile this driver into your kernel,
34ed9652daSAlexander Motinplace the following lines in your kernel configuration file:
35ed9652daSAlexander Motin.Bd -ragged -offset indent
36ed9652daSAlexander Motin.Cd "device ntb"
37ed9652daSAlexander Motin.Cd "device ntb_hw_intel"
38ed9652daSAlexander Motin.Ed
39ed9652daSAlexander Motin.Pp
40ed9652daSAlexander MotinOr, to load the driver as a module at boot, place the following line in
41ed9652daSAlexander Motin.Xr loader.conf 5 :
42ed9652daSAlexander Motin.Bd -literal -offset indent
43ed9652daSAlexander Motinntb_hw_intel_load="YES"
44ed9652daSAlexander Motin.Ed
45ed9652daSAlexander Motin.Sh DESCRIPTION
46ed9652daSAlexander MotinThe
47ed9652daSAlexander Motin.Nm ntb_hw_intel
48ed9652daSAlexander Motindriver provides support for the Non-Transparent Bridge (NTB) hardware in
49ed9652daSAlexander MotinIntel Xeon E3/E5 and S1200 processor families, which allow one of their PCIe
50ed9652daSAlexander Motinports to be switched from transparent to non-transparent bridge mode.
516660ef6eSMark JohnstonIn this mode the bridge looks not like a PCI bridge, but like a PCI endpoint
526660ef6eSMark Johnstondevice.
53ed9652daSAlexander MotinThe driver hides hardware details, exposing memory windows, scratchpads
546660ef6eSMark Johnstonand doorbells of the other side via a hardware independent KPI to the
55ed9652daSAlexander Motin.Xr ntb 4
56ed9652daSAlexander Motinsubsystem.
57ed9652daSAlexander Motin.Pp
58ed9652daSAlexander MotinThe hardware provides 2 or 3 memory windows to the other system's memory,
596660ef6eSMark Johnston16 scratchpad registers and 14, 31 or 34 doorbells to interrupt the other
606660ef6eSMark Johnstonsystem, depending on the platform.
616660ef6eSMark JohnstonOn Xeon processors one of the memory windows is typically consumed by the driver
626660ef6eSMark Johnstonitself to work around multiple hardware errata.
63ed9652daSAlexander Motin.Sh CONFIGURATION
64ed9652daSAlexander MotinThe NTB configuration should be set by BIOS.
65ed9652daSAlexander MotinIt includes enabling NTB, choosing between NTB-to-NTB (back-to-back) or
66ed9652daSAlexander MotinNTB-to-Root Port mode,
67ed9652daSAlexander Motinenabling split BAR mode (one of two 64-bit BARs can be split into two 32-bit
68ed9652daSAlexander Motinones) and configuring BAR sizes in bits (from 12 to 29/39) for both NTB sides.
69ed9652daSAlexander Motin.Pp
706660ef6eSMark JohnstonThe recommended configuration is NTB-to-NTB mode, split bar enabled and
716660ef6eSMark Johnstonall BAR sizes set to 20 (1 MiB).
72ed9652daSAlexander MotinThis needs to be done on both systems.
736660ef6eSMark JohnstonNote, on Xeon SkyLake and newer platforms, split bar mode is not available.
74ed9652daSAlexander Motin.Sh SEE ALSO
75ed9652daSAlexander Motin.Xr if_ntb 4 ,
76ed9652daSAlexander Motin.Xr ntb 4 ,
77*68445e34SChristian Brueffer.Xr ntb_transport 4
78ed9652daSAlexander Motin.Sh AUTHORS
79ed9652daSAlexander Motin.An -nosplit
80ed9652daSAlexander MotinThe
81ed9652daSAlexander Motin.Nm
82ed9652daSAlexander Motindriver was developed by Intel and originally written by
83ed9652daSAlexander Motin.An Carl Delsey Aq Mt carl@FreeBSD.org .
84ed9652daSAlexander MotinLater improvements were done by
85ed9652daSAlexander Motin.An Conrad E. Meyer Aq Mt cem@FreeBSD.org
86ed9652daSAlexander Motinand
87ed9652daSAlexander Motin.An Alexander Motin Aq Mt mav@FreeBSD.org .
88ed9652daSAlexander Motin.Sh BUGS
89ed9652daSAlexander MotinNTB-to-Root Port mode is not yet supported, but it doesn't look very useful.
90ed9652daSAlexander Motin.Pp
91ed9652daSAlexander MotinOn Xeon v2/v3/v4 processors split BAR mode should be enabled to allow
92ed9652daSAlexander MotinSB01BASE_LOCKUP errata workaround to be applied by the driver.
93ed9652daSAlexander Motin.Pp
94ed9652daSAlexander MotinThere is no way to protect your system from malicious behavior on the other
95ed9652daSAlexander Motinsystem once the link is brought up.
96ed9652daSAlexander MotinAnyone with root or kernel access on the other system can read or write to
97ed9652daSAlexander Motinany location on your system.
98ed9652daSAlexander MotinIn other words, only connect two systems that completely trust each other.
99