Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Added nvme(4) for Non-Volatile Memory Host Controller Interf...
details: https://anonhg.NetBSD.org/src/rev/5bd320485415
branches: trunk
changeset: 344985:5bd320485415
user: nonaka <nonaka%NetBSD.org@localhost>
date: Sun May 01 10:21:01 2016 +0000
description:
Added nvme(4) for Non-Volatile Memory Host Controller Interface devices.
Ported from OpenBSD.
diffstat:
distrib/sets/lists/man/mi | 5 +-
share/man/man4/Makefile | 3 +-
share/man/man4/ld.4 | 4 +-
share/man/man4/nvme.4 | 56 +
share/man/man4/pci.4 | 5 +-
sys/arch/amd64/conf/ALL | 9 +-
sys/arch/amd64/conf/GENERIC | 9 +-
sys/arch/amd64/conf/XEN3_DOM0 | 6 +-
sys/conf/files | 10 +-
sys/dev/DEVNAMES | 3 +-
sys/dev/ic/ld_nvme.c | 236 +++++++
sys/dev/ic/nvme.c | 1333 +++++++++++++++++++++++++++++++++++++++++
sys/dev/ic/nvmereg.h | 387 +++++++++++
sys/dev/ic/nvmevar.h | 180 +++++
sys/dev/pci/files.pci | 6 +-
sys/dev/pci/nvme_pci.c | 451 +++++++++++++
16 files changed, 2691 insertions(+), 12 deletions(-)
diffs (truncated from 2909 to 300 lines):
diff -r aef9e1db21ed -r 5bd320485415 distrib/sets/lists/man/mi
--- a/distrib/sets/lists/man/mi Sun May 01 08:33:14 2016 +0000
+++ b/distrib/sets/lists/man/mi Sun May 01 10:21:01 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1523 2016/04/28 15:55:15 christos Exp $
+# $NetBSD: mi,v 1.1524 2016/05/01 10:21:01 nonaka Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -1468,6 +1468,7 @@
./usr/share/man/cat4/ntwo.0 man-sys-catman .cat
./usr/share/man/cat4/ntwoc.0 man-sys-catman .cat
./usr/share/man/cat4/null.0 man-sys-catman .cat
+./usr/share/man/cat4/nvme.0 man-sys-catman .cat
./usr/share/man/cat4/nxt2k.0 man-sys-catman .cat
./usr/share/man/cat4/oak.0 man-sys-catman .cat
./usr/share/man/cat4/oboe.0 man-sys-catman .cat
@@ -4500,6 +4501,7 @@
./usr/share/man/html4/ntwo.html man-sys-htmlman html
./usr/share/man/html4/ntwoc.html man-sys-htmlman html
./usr/share/man/html4/null.html man-sys-htmlman html
+./usr/share/man/html4/nvme.html man-sys-htmlman html
./usr/share/man/html4/nxt2k.html man-sys-htmlman html
./usr/share/man/html4/oak.html man-sys-htmlman html
./usr/share/man/html4/oboe.html man-sys-htmlman html
@@ -7390,6 +7392,7 @@
./usr/share/man/man4/ntwo.4 man-sys-man .man
./usr/share/man/man4/ntwoc.4 man-sys-man .man
./usr/share/man/man4/null.4 man-sys-man .man
+./usr/share/man/man4/nvme.4 man-sys-man .man
./usr/share/man/man4/nxt2k.4 man-sys-man .man
./usr/share/man/man4/oak.4 man-sys-man .man
./usr/share/man/man4/oboe.4 man-sys-man .man
diff -r aef9e1db21ed -r 5bd320485415 share/man/man4/Makefile
--- a/share/man/man4/Makefile Sun May 01 08:33:14 2016 +0000
+++ b/share/man/man4/Makefile Sun May 01 10:21:01 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.627 2016/01/18 00:34:43 kamil Exp $
+# $NetBSD: Makefile,v 1.628 2016/05/01 10:21:01 nonaka Exp $
# @(#)Makefile 8.1 (Berkeley) 6/18/93
MAN= aac.4 ac97.4 acardide.4 aceride.4 acphy.4 \
@@ -45,6 +45,7 @@
mtio.4 msm6242b.4 multicast.4 mvsata.4 \
nadb.4 ne.4 neo.4 netintro.4 nfe.4 nfsmb.4 njata.4 njs.4 \
nsclpcsio.4 nside.4 nsp.4 nsphy.4 nsphyter.4 ntwoc.4 null.4 nsmb.4 \
+ nvme.4 \
oak.4 oosiop.4 opl.4 options.4 optiide.4 osiop.4 otus.4 \
pad.4 pas.4 pcdisplay.4 pcf8563rtc.4 pciide.4 pckbc.4 pckbd.4 pcn.4 \
pcppi.4 pcscp.4 pcweasel.4 pdcide.4 pdcsata.4 piixide.4 piixpcib.4 \
diff -r aef9e1db21ed -r 5bd320485415 share/man/man4/ld.4
--- a/share/man/man4/ld.4 Sun May 01 08:33:14 2016 +0000
+++ b/share/man/man4/ld.4 Sun May 01 10:21:01 2016 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: ld.4,v 1.19 2011/11/05 09:22:44 hannken Exp $
+.\" $NetBSD: ld.4,v 1.20 2016/05/01 10:21:01 nonaka Exp $
.\"
.\" Copyright (c) 2000 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -41,6 +41,7 @@
.Cd "ld* at icp? unit ?"
.Cd "ld* at iop? tid ?"
.Cd "ld* at mlx? unit ?"
+.Cd "ld* at nvme? nsid ?"
.Cd "ld* at sdmmc?"
.Cd "ld* at twa? unit ?"
.Cd "ld* at twe? unit ?"
@@ -71,6 +72,7 @@
.Xr intro 4 ,
.Xr iop 4 ,
.Xr mlx 4 ,
+.Xr nvme 4 ,
.Xr sdmmc 4 ,
.Xr twa 4 ,
.Xr twe 4 ,
diff -r aef9e1db21ed -r 5bd320485415 share/man/man4/nvme.4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/share/man/man4/nvme.4 Sun May 01 10:21:01 2016 +0000
@@ -0,0 +1,56 @@
+.\" $NetBSD: nvme.4,v 1.1 2016/05/01 10:21:01 nonaka Exp $
+.\" $OpenBSD: nvme.4,v 1.2 2016/04/14 11:53:37 jmc Exp $
+.\"
+.\" Copyright (c) 2016 David Gwynne <dlg%openbsd.org@localhost>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd May 1, 2016
+.Dt NVME 4
+.Os
+.Sh NAME
+.Nm nvme
+.Nd Non-Volatile Memory Host Controller Interface
+.Sh SYNOPSIS
+.Cd "nvme* at pci? dev ? function ?"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for NVMe, or NVM Express,
+storage controllers conforming to the
+Non-Volatile Memory Host Controller Interface specification.
+.Sh SEE ALSO
+.Xr intro 4 ,
+.Xr ld 4 ,
+.Xr pci 4
+.Sh HISTORY
+The
+.Nm
+driver first appeared in
+.Ox 6.0
+and in
+.Nx 8.0 .
+.Sh AUTHORS
+.An -nosplit
+The
+.Nm
+driver was written by
+.An David Gwynne
+.Aq dlg%openbsd.org@localhost
+for
+.Ox
+and ported to
+.Nx
+by
+.An NONAKA Kimihiro
+.Aq nonaka%NetBSD.org@localhost .
diff -r aef9e1db21ed -r 5bd320485415 share/man/man4/pci.4
--- a/share/man/man4/pci.4 Sun May 01 08:33:14 2016 +0000
+++ b/share/man/man4/pci.4 Sun May 01 10:21:01 2016 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: pci.4,v 1.95 2015/08/28 08:01:15 wiz Exp $
+.\" $NetBSD: pci.4,v 1.96 2016/05/01 10:21:01 nonaka Exp $
.\"
.\" Copyright (c) 1997 Jason R. Thorpe. All rights reserved.
.\" Copyright (c) 1997 Jonathan Stone
@@ -404,6 +404,8 @@
I2O I/O processors.
.It mr
Guillemot Maxi Radio FM 2000 FM radio device.
+.It nvme
+Non-Volatile Memory Host controllers.
.It oboe
Toshiba OBOE IrDA SIR/FIR controller.
.It ohci
@@ -483,6 +485,7 @@
.Xr neo 4 ,
.Xr nfe 4 ,
.Xr ntwoc 4 ,
+.Xr nvme 4 ,
.Xr oboe 4 ,
.Xr ohci 4 ,
.Xr pcic 4 ,
diff -r aef9e1db21ed -r 5bd320485415 sys/arch/amd64/conf/ALL
--- a/sys/arch/amd64/conf/ALL Sun May 01 08:33:14 2016 +0000
+++ b/sys/arch/amd64/conf/ALL Sun May 01 10:21:01 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: ALL,v 1.33 2015/11/10 13:01:41 tnn Exp $
+# $NetBSD: ALL,v 1.34 2016/05/01 10:21:01 nonaka 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.33 $"
+#ident "ALL-$Revision: 1.34 $"
maxusers 64 # estimated number of users
@@ -865,6 +865,11 @@
uk* at atapibus? drive ? flags 0x0000 # ATAPI unknown
+# NVM Express controllers and devices
+nvme* at pci? dev ? function ?
+ld* at nvme? nsid ?
+
+
# Miscellaneous mass storage devices
# ISA floppy
diff -r aef9e1db21ed -r 5bd320485415 sys/arch/amd64/conf/GENERIC
--- a/sys/arch/amd64/conf/GENERIC Sun May 01 08:33:14 2016 +0000
+++ b/sys/arch/amd64/conf/GENERIC Sun May 01 10:21:01 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.431 2016/04/23 10:15:27 skrll Exp $
+# $NetBSD: GENERIC,v 1.432 2016/05/01 10:21:01 nonaka Exp $
#
# GENERIC machine description file
#
@@ -22,7 +22,7 @@
options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-#ident "GENERIC-$Revision: 1.431 $"
+#ident "GENERIC-$Revision: 1.432 $"
maxusers 64 # estimated number of users
@@ -703,6 +703,11 @@
uk* at atapibus? drive ? flags 0x0000 # ATAPI unknown
+# NVM Express controllers and devices
+nvme* at pci? dev ? function ?
+ld* at nvme? nsid ?
+
+
# Miscellaneous mass storage devices
# ISA floppy
diff -r aef9e1db21ed -r 5bd320485415 sys/arch/amd64/conf/XEN3_DOM0
--- a/sys/arch/amd64/conf/XEN3_DOM0 Sun May 01 08:33:14 2016 +0000
+++ b/sys/arch/amd64/conf/XEN3_DOM0 Sun May 01 10:21:01 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.117 2016/03/19 23:21:02 gdt Exp $
+# $NetBSD: XEN3_DOM0,v 1.118 2016/05/01 10:21:01 nonaka Exp $
include "arch/amd64/conf/std.xen"
@@ -529,6 +529,10 @@
icpsp* at icp? unit ? # SCSI pass-through
+# NVM Express controllers and devices
+nvme* at pci? dev ? function ?
+ld* at nvme? nsid ?
+
# wscons
pckbc0 at isa? # pc keyboard controller
pckbd* at pckbc? # PC keyboard
diff -r aef9e1db21ed -r 5bd320485415 sys/conf/files
--- a/sys/conf/files Sun May 01 08:33:14 2016 +0000
+++ b/sys/conf/files Sun May 01 10:21:01 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files,v 1.1157 2016/04/27 19:46:11 christos Exp $
+# $NetBSD: files,v 1.1158 2016/05/01 10:21:02 nonaka Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
version 20150846
@@ -1374,6 +1374,14 @@
device dme: arp, ether, ifnet
file dev/ic/dm9000.c dme
+# NVM Express Controller
+#
+device nvme {nsid = -1}
+file dev/ic/nvme.c nvme
+
+attach ld at nvme with ld_nvme
+file dev/ic/ld_nvme.c ld_nvme
+
# legitimate pseudo-devices
#
defpseudodev vnd: disk
diff -r aef9e1db21ed -r 5bd320485415 sys/dev/DEVNAMES
--- a/sys/dev/DEVNAMES Sun May 01 08:33:14 2016 +0000
+++ b/sys/dev/DEVNAMES Sun May 01 10:21:01 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: DEVNAMES,v 1.297 2016/01/05 13:16:37 msaitoh Exp $
+# $NetBSD: DEVNAMES,v 1.298 2016/05/01 10:21:02 nonaka Exp $
#
# This file contains all used device names and defined attributes in
# alphabetical order. New devices added to the system somewhere should first
@@ -970,6 +970,7 @@
nsphyter MI
ntwoc MI
nubus mac68k
+nvme MI
nvr atari
nvram macppc
oak MI
diff -r aef9e1db21ed -r 5bd320485415 sys/dev/ic/ld_nvme.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/dev/ic/ld_nvme.c Sun May 01 10:21:01 2016 +0000
@@ -0,0 +1,236 @@
+/* $NetBSD: ld_nvme.c,v 1.1 2016/05/01 10:21:02 nonaka Exp $ */
+
+/*-
+ * Copyright (C) 2016 NONAKA Kimihiro <nonaka%netbsd.org@localhost>
+ * 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.
Home |
Main Index |
Thread Index |
Old Index