From owner-svn-src-stable-12@freebsd.org Sun Nov 24 01:27:06 2019 Return-Path: Delivered-To: svn-src-stable-12@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 53FB41C5BD4; Sun, 24 Nov 2019 01:27:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47LCFQ1YbBz4gFN; Sun, 24 Nov 2019 01:27:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 18C4F1CB16; Sun, 24 Nov 2019 01:27:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAO1R5dj057596; Sun, 24 Nov 2019 01:27:05 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAO1R5ND057593; Sun, 24 Nov 2019 01:27:05 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201911240127.xAO1R5ND057593@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sun, 24 Nov 2019 01:27:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r355043 - stable/12/share/man/man4 X-SVN-Group: stable-12 X-SVN-Commit-Author: mav X-SVN-Commit-Paths: stable/12/share/man/man4 X-SVN-Commit-Revision: 355043 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-12@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for only the 12-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Nov 2019 01:27:06 -0000 Author: mav Date: Sun Nov 24 01:27:04 2019 New Revision: 355043 URL: https://svnweb.freebsd.org/changeset/base/355043 Log: MFC r351605: Man page for AMD Non-Transparent Bridge (ntb_hw_amd) driver. Added: stable/12/share/man/man4/ntb_hw_amd.4 - copied unchanged from r351605, head/share/man/man4/ntb_hw_amd.4 Modified: stable/12/share/man/man4/Makefile stable/12/share/man/man4/ntb.4 stable/12/share/man/man4/ntb_transport.4 Directory Properties: stable/12/ (props changed) Modified: stable/12/share/man/man4/Makefile ============================================================================== --- stable/12/share/man/man4/Makefile Sun Nov 24 00:55:42 2019 (r355042) +++ stable/12/share/man/man4/Makefile Sun Nov 24 01:27:04 2019 (r355043) @@ -386,6 +386,7 @@ MAN= aac.4 \ nmdm.4 \ nsp.4 \ ${_ntb.4} \ + ${_ntb_hw_amd.4} \ ${_ntb_hw_intel.4} \ ${_ntb_hw_plx.4} \ ${_ntb_transport.4} \ @@ -856,6 +857,7 @@ _xnb.4= xnb.4 _if_ntb.4= if_ntb.4 _ioat.4= ioat.4 _ntb.4= ntb.4 +_ntb_hw_amd.4= ntb_hw_amd.4 _ntb_hw_intel.4= ntb_hw_intel.4 _ntb_hw_plx.4= ntb_hw_plx.4 _ntb_transport.4=ntb_transport.4 Modified: stable/12/share/man/man4/ntb.4 ============================================================================== --- stable/12/share/man/man4/ntb.4 Sun Nov 24 00:55:42 2019 (r355042) +++ stable/12/share/man/man4/ntb.4 Sun Nov 24 01:27:04 2019 (r355043) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 2, 2017 +.Dd August 29, 2019 .Dt NTB 4 .Os .Sh NAME @@ -66,7 +66,7 @@ The default configuration is empty string, which means with all available resources, allowing any driver to attach. .El .Sh DESCRIPTION -Non-Transparent Bridges allow to connect two computer systems with PCIe +Non-Transparent Bridges connect two computer systems with PCIe link(s), providing each of them limited access to others memory space, scratchpad registers and interrupts. The @@ -76,9 +76,10 @@ and splits them between several functions, according t configuration. .Sh SEE ALSO .Xr if_ntb 4 , -.Xr ntb_transport 4 , +.Xr ntb_hw_amd 4 , .Xr ntb_hw_intel 4 , -.Xr ntb_hw_plx 4 +.Xr ntb_hw_plx 4 , +.Xr ntb_transport 4 .Sh AUTHORS .An -nosplit The Copied: stable/12/share/man/man4/ntb_hw_amd.4 (from r351605, head/share/man/man4/ntb_hw_amd.4) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/12/share/man/man4/ntb_hw_amd.4 Sun Nov 24 01:27:04 2019 (r355043, copy of r351605, head/share/man/man4/ntb_hw_amd.4) @@ -0,0 +1,94 @@ +.\" +.\" Copyright (c) 2019 Rajesh Kumar +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd August 29, 2019 +.Dt NTB_HW_AMD 4 +.Os +.Sh NAME +.Nm ntb_hw_amd +.Nd AMD Non-Transparent Bridge driver +.Sh SYNOPSIS +To compile this driver into your kernel, +place the following lines in your kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ntb" +.Cd "device ntb_hw_amd" +.Ed +.Pp +Or, to load the driver as a module at boot, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +ntb_hw_amd_load="YES" +.Ed +.Pp +The following sysctls are supported in this driver +.Bl -ohang +.It Va dev.ntb_hw.X.info +Reading this sysctl will give the basic details like the number of memory +windows, scratchpads and doorbells exposed by the NTB on the local host to +access the devices beyond the bridge. +It also provides details about the masked doorbells, translation address and +size limit of each exposed memory window and link status information. +.El +.Sh DESCRIPTION +The +.Nm ntb_hw_amd +driver provides support for the Non-Transparent Bridge (NTB) hardware in +AMD EPYC processor family. +The Non-Transparent Bridge does not look as a regular PCI bridge, but as PCI +endpoint device, hiding the devices behind it. +The driver hides details of hardware on the other side, but exposes memory windows, +scratchpads and doorbells to access the other side via hardware independent +KPI to +.Xr ntb 4 +subsystem. +.Pp +The hardware provides 2 (both 64-bit) or 3 (one 32-bit and two 64-bit) memory +windows to the other system's memory, up to 16 scratchpad registers and 16 +doorbells to communicate with and interrupt the other system respectively. +.Sh CONFIGURATION +The NTB configuration should be set by BIOS. +This includes enabling NTB, choosing topology (only NTB-to-Root Port +mode is supported now), role of the host in the topology. +This needs to be done on both systems. +.Pp +The BAR size for memory windows is configured to 1 MiB by default. +.Sh SEE ALSO +.Xr if_ntb 4 , +.Xr ntb 4 , +.Xr ntb_transport 4 +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was developed by AMD and originally written by +.An Rajesh Kumar Aq Mt rajesh1.kumar@amd.com . +Reviewed by +.An Alexander Motin Aq Mt mav@FreeBSD.org , +.An Conrad E. Meyer Aq Mt cem@FreeBSD.org +and +.An Warner Losh Aq Mt imp@FreeBSD.org . Modified: stable/12/share/man/man4/ntb_transport.4 ============================================================================== --- stable/12/share/man/man4/ntb_transport.4 Sun Nov 24 00:55:42 2019 (r355042) +++ stable/12/share/man/man4/ntb_transport.4 Sun Nov 24 01:27:04 2019 (r355043) @@ -99,6 +99,7 @@ or 3 plus 1 in case of compact protocol; .Sh SEE ALSO .Xr if_ntb 4 , .Xr ntb 4 , +.Xr ntb_hw_amd 4 , .Xr ntb_hw_intel 4 , .Xr ntb_hw_plx 4 .Sh AUTHORS