xref: /freebsd/share/man/man4/ntb_hw_amd.4 (revision 069ac184)
1.\"
2.\" Copyright (c) 2019 Rajesh Kumar <rajesh1.kumar@amd.com>
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.Dd August 29, 2019
27.Dt NTB_HW_AMD 4
28.Os
29.Sh NAME
30.Nm ntb_hw_amd
31.Nd AMD Non-Transparent Bridge driver
32.Sh SYNOPSIS
33To compile this driver into your kernel,
34place the following lines in your kernel configuration file:
35.Bd -ragged -offset indent
36.Cd "device ntb"
37.Cd "device ntb_hw_amd"
38.Ed
39.Pp
40Or, to load the driver as a module at boot, place the following line in
41.Xr loader.conf 5 :
42.Bd -literal -offset indent
43ntb_hw_amd_load="YES"
44.Ed
45.Pp
46The following sysctls are supported in this driver
47.Bl -ohang
48.It Va dev.ntb_hw.X.info
49Reading this sysctl will give the basic details like the number of memory
50windows, scratchpads and doorbells exposed by the NTB on the local host to
51access the devices beyond the bridge.
52It also provides details about the masked doorbells, translation address and
53size limit of each exposed memory window and link status information.
54.El
55.Sh DESCRIPTION
56The
57.Nm ntb_hw_amd
58driver provides support for the Non-Transparent Bridge (NTB) hardware in
59AMD EPYC processor family.
60The Non-Transparent Bridge does not look as a regular PCI bridge, but as PCI
61endpoint device, hiding the devices behind it.
62The driver hides details of hardware on the other side, but exposes memory windows,
63scratchpads and doorbells to access the other side via hardware independent
64KPI to
65.Xr ntb 4
66subsystem.
67.Pp
68The hardware provides 2 (both 64-bit) or 3 (one 32-bit and two 64-bit) memory
69windows to the other system's memory, up to 16 scratchpad registers and 16
70doorbells to communicate with and interrupt the other system respectively.
71.Sh CONFIGURATION
72The NTB configuration should be set by BIOS.
73This includes enabling NTB, choosing topology (only NTB-to-Root Port
74mode is supported now), role of the host in the topology.
75This needs to be done on both systems.
76.Pp
77The BAR size for memory windows is configured to 1 MiB by default.
78.Sh SEE ALSO
79.Xr if_ntb 4 ,
80.Xr ntb 4 ,
81.Xr ntb_transport 4
82.Sh AUTHORS
83.An -nosplit
84The
85.Nm
86driver was developed by AMD and originally written by
87.An Rajesh Kumar Aq Mt rajesh1.kumar@amd.com .
88Reviewed by
89.An Alexander Motin Aq Mt mav@FreeBSD.org ,
90.An Conrad E. Meyer Aq Mt cem@FreeBSD.org
91and
92.An Warner Losh Aq Mt imp@FreeBSD.org .
93