Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src Add opencrypto driver for Intel QuickAssist.



details:   https://anonhg.NetBSD.org/src/rev/a3fb2e2c95b8
branches:  trunk
changeset: 465382:a3fb2e2c95b8
user:      hikaru <hikaru%NetBSD.org@localhost>
date:      Wed Nov 20 09:37:44 2019 +0000

description:
Add opencrypto driver for Intel QuickAssist.

diffstat:

 distrib/sets/lists/base/mi                   |    12 +-
 distrib/sets/lists/man/mi                    |     5 +-
 doc/CHANGES                                  |     6 +-
 etc/mtree/NetBSD.dist.base                   |     3 +-
 share/man/man4/Makefile                      |     4 +-
 share/man/man4/qat.4                         |    88 +
 sys/arch/amd64/conf/ALL                      |     5 +-
 sys/arch/amd64/conf/GENERIC                  |     5 +-
 sys/dev/microcode/Makefile                   |     4 +-
 sys/dev/microcode/qat/Makefile               |    23 +
 sys/dev/microcode/qat/mmp_firmware_c2xxx.bin |   Bin 
 sys/dev/microcode/qat/mof_firmware_c2xxx.bin |   Bin 
 sys/dev/microcode/qat/qat-license            |    11 +
 sys/dev/microcode/qat/qat_c3xxx.bin          |   Bin 
 sys/dev/microcode/qat/qat_c3xxx_mmp.bin      |   Bin 
 sys/dev/microcode/qat/qat_c62x.bin           |   Bin 
 sys/dev/microcode/qat/qat_c62x_mmp.bin       |   Bin 
 sys/dev/microcode/qat/qat_d15xx.bin          |   Bin 
 sys/dev/microcode/qat/qat_d15xx_mmp.bin      |   Bin 
 sys/dev/pci/files.pci                        |    14 +-
 sys/dev/pci/qat/qat.c                        |  2302 +++++++++++++++++
 sys/dev/pci/qat/qat_ae.c                     |  3517 ++++++++++++++++++++++++++
 sys/dev/pci/qat/qat_aevar.h                  |    69 +
 sys/dev/pci/qat/qat_c2xxx.c                  |   201 +
 sys/dev/pci/qat/qat_c2xxxreg.h               |   174 +
 sys/dev/pci/qat/qat_c3xxx.c                  |   292 ++
 sys/dev/pci/qat/qat_c3xxxreg.h               |   175 +
 sys/dev/pci/qat/qat_c62x.c                   |   308 ++
 sys/dev/pci/qat/qat_c62xreg.h                |   198 +
 sys/dev/pci/qat/qat_d15xx.c                  |   308 ++
 sys/dev/pci/qat/qat_d15xxreg.h               |   198 +
 sys/dev/pci/qat/qat_hw15.c                   |   807 +++++
 sys/dev/pci/qat/qat_hw15reg.h                |   636 ++++
 sys/dev/pci/qat/qat_hw15var.h                |   104 +
 sys/dev/pci/qat/qat_hw17.c                   |   537 +++
 sys/dev/pci/qat/qat_hw17reg.h                |  2478 ++++++++++++++++++
 sys/dev/pci/qat/qat_hw17var.h                |    79 +
 sys/dev/pci/qat/qatreg.h                     |  1570 +++++++++++
 sys/dev/pci/qat/qatvar.h                     |  1165 ++++++++
 39 files changed, 15285 insertions(+), 13 deletions(-)

diffs (truncated from 15544 to 300 lines):

diff -r d402aa034763 -r a3fb2e2c95b8 distrib/sets/lists/base/mi
--- a/distrib/sets/lists/base/mi        Wed Nov 20 08:50:59 2019 +0000
+++ b/distrib/sets/lists/base/mi        Wed Nov 20 09:37:44 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1220 2019/11/11 22:44:56 joerg Exp $
+# $NetBSD: mi,v 1.1221 2019/11/20 09:37:44 hikaru Exp $
 #
 # Note:        Don't delete entries from here - mark them as "obsolete" instead,
 #      unless otherwise stated below.
@@ -269,6 +269,16 @@
 ./libdata/firmware/nouveau/nvidia/gm206/gpccs_inst.bin base-firmware-usr       nouveaufirmware
 ./libdata/firmware/nouveau/nvidia/gm206/fecs_data.bin  base-firmware-usr       nouveaufirmware
 ./libdata/firmware/nouveau/nvidia/gm206/gpccs_data.bin base-firmware-usr       nouveaufirmware
+./libdata/firmware/qat                         base-firmware-root
+./libdata/firmware/qat/mmp_firmware_c2xxx.bin  base-firmware-root      firmware
+./libdata/firmware/qat/mof_firmware_c2xxx.bin  base-firmware-root      firmware
+./libdata/firmware/qat/qat-license             base-firmware-root      firmware
+./libdata/firmware/qat/qat_c3xxx.bin           base-firmware-root      firmware
+./libdata/firmware/qat/qat_c3xxx_mmp.bin       base-firmware-root      firmware
+./libdata/firmware/qat/qat_c62x.bin            base-firmware-root      firmware
+./libdata/firmware/qat/qat_c62x_mmp.bin                base-firmware-root      firmware
+./libdata/firmware/qat/qat_d15xx.bin           base-firmware-root      firmware
+./libdata/firmware/qat/qat_d15xx_mmp.bin       base-firmware-root      firmware
 ./libdata/firmware/radeon                      base-firmware-usr
 ./libdata/firmware/radeon/ARUBA_me.bin         base-firmware-usr       radeonfirmware
 ./libdata/firmware/radeon/ARUBA_pfp.bin                base-firmware-usr       radeonfirmware
diff -r d402aa034763 -r a3fb2e2c95b8 distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Wed Nov 20 08:50:59 2019 +0000
+++ b/distrib/sets/lists/man/mi Wed Nov 20 09:37:44 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1662 2019/11/01 02:53:22 msaitoh Exp $
+# $NetBSD: mi,v 1.1663 2019/11/20 09:37:44 hikaru Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1613,6 +1613,7 @@
 ./usr/share/man/cat4/pxagpio.0                 man-sys-catman          .cat
 ./usr/share/man/cat4/pxaip.0                   man-sys-catman          .cat
 ./usr/share/man/cat4/pxg.0                     man-sys-catman          .cat
+./usr/share/man/cat4/qat.0                     man-sys-catman          .cat
 ./usr/share/man/cat4/qe.0                      man-sys-catman          .cat
 ./usr/share/man/cat4/qec.0                     man-sys-catman          .cat
 ./usr/share/man/cat4/qemufwcfg.0               man-sys-catman          .cat
@@ -4727,6 +4728,7 @@
 ./usr/share/man/html4/pxagpio.html             man-sys-htmlman         html
 ./usr/share/man/html4/pxaip.html               man-sys-htmlman         html
 ./usr/share/man/html4/pxg.html                 man-sys-htmlman         html
+./usr/share/man/html4/qat.html                 man-sys-htmlman         html
 ./usr/share/man/html4/qe.html                  man-sys-htmlman         html
 ./usr/share/man/html4/qec.html                 man-sys-htmlman         html
 ./usr/share/man/html4/qemufwcfg.html           man-sys-htmlman         html
@@ -7743,6 +7745,7 @@
 ./usr/share/man/man4/pxagpio.4                 man-sys-man             .man
 ./usr/share/man/man4/pxaip.4                   man-sys-man             .man
 ./usr/share/man/man4/pxg.4                     man-sys-man             .man
+./usr/share/man/man4/qat.4                     man-sys-man             .man
 ./usr/share/man/man4/qe.4                      man-sys-man             .man
 ./usr/share/man/man4/qec.4                     man-sys-man             .man
 ./usr/share/man/man4/qemufwcfg.4               man-sys-man             .man
diff -r d402aa034763 -r a3fb2e2c95b8 doc/CHANGES
--- a/doc/CHANGES       Wed Nov 20 08:50:59 2019 +0000
+++ b/doc/CHANGES       Wed Nov 20 09:37:44 2019 +0000
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:                   <$Revision: 1.2614 $>
+# LIST OF CHANGES FROM LAST RELEASE:                   <$Revision: 1.2615 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -78,3 +78,7 @@
        dhcpcd(8): Import 8.1.2. [roy 20191113]
        amd64: Add support for kMSan - Kernel Memory Sanitizer.
                [maxv 20191114]
+       qat(4): Add opencrypto driver for Intel QuickAssist.
+               Atom C2XXX, C3XXX, Xeon D-21XX and D-15XX, C62X chipsets and
+               QuickAssist Adapter 8960/8970.
+               [hikaru 20191120]
diff -r d402aa034763 -r a3fb2e2c95b8 etc/mtree/NetBSD.dist.base
--- a/etc/mtree/NetBSD.dist.base        Wed Nov 20 08:50:59 2019 +0000
+++ b/etc/mtree/NetBSD.dist.base        Wed Nov 20 09:37:44 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: NetBSD.dist.base,v 1.204 2019/11/11 22:44:57 joerg Exp $
+#      $NetBSD: NetBSD.dist.base,v 1.205 2019/11/20 09:37:45 hikaru Exp $
 #      @(#)4.4BSD.dist 8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -81,6 +81,7 @@
 ./libdata/firmware/nvidia
 ./libdata/firmware/nvidia/tegra124
 ./libdata/firmware/nvidia/tegra210
+./libdata/firmware/qat
 ./libdata/firmware/radeon
 ./libdata/firmware/ral
 ./libdata/firmware/rum
diff -r d402aa034763 -r a3fb2e2c95b8 share/man/man4/Makefile
--- a/share/man/man4/Makefile   Wed Nov 20 08:50:59 2019 +0000
+++ b/share/man/man4/Makefile   Wed Nov 20 09:37:44 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: Makefile,v 1.688 2019/11/01 02:53:23 msaitoh Exp $
+#      $NetBSD: Makefile,v 1.689 2019/11/20 09:37:45 hikaru Exp $
 #      @(#)Makefile    8.1 (Berkeley) 6/18/93
 
 MAN=   aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -51,7 +51,7 @@
        piixpm.4 pim.4 plip.4 pm3fb.4 pms.4 pmu.4 pnaphy.4 ppbus.4 ppp.4 \
        pppoe.4 \
        pseye.4 ptcd.4 ptm.4 pty.4 puc.4 pud.4 puffs.4 pwdog.4 px.4 pxagpio.4 \
-       pxaip.4 pxg.4 qe.4 qec.4 qemufwcfg.4 qsphy.4 \
+       pxaip.4 pxg.4 qat.4 qe.4 qec.4 qemufwcfg.4 qsphy.4 \
        raid.4 ral.4 ray.4 rcons.4 rdcphy.4 re.4 rgephy.4 rlphy.4 \
        rnd.4 route.4 rs5c372rtc.4 rtk.4 rtsx.4 rtw.4 rtwn.4 rum.4 run.4 \
        s390rtc.4 satalink.4 sbus.4 schide.4 \
diff -r d402aa034763 -r a3fb2e2c95b8 share/man/man4/qat.4
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/qat.4      Wed Nov 20 09:37:44 2019 +0000
@@ -0,0 +1,88 @@
+.\"    $NetBSD: qat.4,v 1.1 2019/11/20 09:37:45 hikaru Exp $
+.\"
+.\" Copyright (c) 2019 Internet Initiative Japan, Inc.
+.\" 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 NETBSD FOUNDATION, INC. 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 FOUNDATION 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.
+.\"
+.Dd November 20, 2019
+.Dt QAT 4
+.Os
+.Sh NAME
+.Nm qat
+.Nd Intel QuickAssist crypto accelerator
+.Sh SYNOPSIS
+.Cd "qat* at pci? dev ? function ?"
+.Sh DESCRIPTION
+The
+.Nm
+driver supports the following system-on-chips, chipsets, and PCIe adapters,
+which are integrated with QuickAssist:
+.Pp
+.Bl -bullet -compact
+.It
+Intel Atom C2000 processor
+.It
+Intel Atom C3000 processor
+.It
+Intel Xeon D-1500 processor
+.It
+Intel Xeon D-2100 processor
+.It
+Intel C620 chipset
+.It
+Intel QuickAssist Adapter 8960/8970
+.El
+.Pp
+When the
+.Nm
+driver is attached, it automatically registers itself to accelerate
+DES-CBC, 3DES-CBC, AES-CBC, HMAC-SHA1, HMAC-SHA256, HMAC-SHA384,
+and HMAC-SHA512 operations for
+.Xr opencrypto 9 ,
+and thus for
+.Xr ipsec 4
+and
+.Xr crypto 4 .
+.Sh FILES
+The
+.Nm
+driver loads the firmware which is located in
+.Pa /libdata/firmware/qat/ ,
+by
+.Xr firmload 9 .
+.Sh SEE ALSO
+.Xr crypto 4 ,
+.Xr intro 4 ,
+.Xr ipsec 4 ,
+.Xr firmload 9 ,
+.Xr opencrypto 9
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Nx 10.0 .
+.Sh AUTHORS
+The
+.Nm
+driver was written by
+.An Hikaru Abe Aq Mt hikaru%iij.ad.jp@localhost .
diff -r d402aa034763 -r a3fb2e2c95b8 sys/arch/amd64/conf/ALL
--- a/sys/arch/amd64/conf/ALL   Wed Nov 20 08:50:59 2019 +0000
+++ b/sys/arch/amd64/conf/ALL   Wed Nov 20 09:37:44 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.129 2019/11/10 20:41:15 chs Exp $
+# $NetBSD: ALL,v 1.130 2019/11/20 09:37:45 hikaru Exp $
 # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp
 #
 # ALL machine description file
@@ -17,7 +17,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "ALL-$Revision: 1.129 $"
+#ident         "ALL-$Revision: 1.130 $"
 
 maxusers       64              # estimated number of users
 
@@ -1550,6 +1550,7 @@
 
 # PCI cryptographic devices
 hifn*  at pci? dev ? function ?        # Hifn 7755/7811/795x
+qat*   at pci? dev ? function ?        # Intel QuickAssist
 ubsec* at pci? dev ? function ?        # Broadcom 5501/5601/580x/582x
 
 # Trusted Platform Module
diff -r d402aa034763 -r a3fb2e2c95b8 sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC       Wed Nov 20 08:50:59 2019 +0000
+++ b/sys/arch/amd64/conf/GENERIC       Wed Nov 20 09:37:44 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.546 2019/11/14 16:23:52 maxv Exp $
+# $NetBSD: GENERIC,v 1.547 2019/11/20 09:37:45 hikaru Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@
 
 options        INCLUDE_CONFIG_FILE     # embed config file in kernel binary
 
-#ident         "GENERIC-$Revision: 1.546 $"
+#ident         "GENERIC-$Revision: 1.547 $"
 
 maxusers       64              # estimated number of users
 
@@ -449,6 +449,7 @@
 
 # PCI cryptographic devices
 hifn*  at pci? dev ? function ?        # Hifn 7755/7811/795x
+#qat*  at pci? dev ? function ?        # Intel QuickAssist
 ubsec* at pci? dev ? function ?        # Broadcom 5501/5601/580x/582x
 
 # Trusted Platform Module
diff -r d402aa034763 -r a3fb2e2c95b8 sys/dev/microcode/Makefile
--- a/sys/dev/microcode/Makefile        Wed Nov 20 08:50:59 2019 +0000
+++ b/sys/dev/microcode/Makefile        Wed Nov 20 09:37:44 2019 +0000
@@ -1,6 +1,6 @@
-#      $NetBSD: Makefile,v 1.9 2012/06/01 13:19:39 nonaka Exp $
+#      $NetBSD: Makefile,v 1.10 2019/11/20 09:37:45 hikaru Exp $
 
-SUBDIR+=       ral rum run zyd
+SUBDIR+=       qat ral rum run zyd
 SUBDIR+=       radeon
 
 .include <bsd.subdir.mk>
diff -r d402aa034763 -r a3fb2e2c95b8 sys/dev/microcode/qat/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/dev/microcode/qat/Makefile    Wed Nov 20 09:37:44 2019 +0000
@@ -0,0 +1,23 @@
+#      $NetBSD: Makefile,v 1.1 2019/11/20 09:37:45 hikaru Exp $
+
+NOMAN= # defined
+
+.include <bsd.own.mk>
+
+.if ${MKFIRMWARE} != "no"
+FILES= qat-license
+
+FILES+=        mmp_firmware_c2xxx.bin mof_firmware_c2xxx.bin
+FILES+=        qat_c3xxx.bin qat_c3xxx_mmp.bin
+FILES+=        qat_c62x.bin qat_c62x_mmp.bin
+FILES+=        qat_d15xx.bin qat_d15xx_mmp.bin
+.endif
+
+# XXX
+includes:
+
+clean:
+
+cleandir:
+
+.include <bsd.files.mk>
diff -r d402aa034763 -r a3fb2e2c95b8 sys/dev/microcode/qat/mmp_firmware_c2xxx.bin
Binary file sys/dev/microcode/qat/mmp_firmware_c2xxx.bin has changed
diff -r d402aa034763 -r a3fb2e2c95b8 sys/dev/microcode/qat/mof_firmware_c2xxx.bin
Binary file sys/dev/microcode/qat/mof_firmware_c2xxx.bin has changed
diff -r d402aa034763 -r a3fb2e2c95b8 sys/dev/microcode/qat/qat-license
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000



Home | Main Index | Thread Index | Old Index