summaryrefslogtreecommitdiff
path: root/usr/src/man/man9f
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/man/man9f')
-rw-r--r--usr/src/man/man9f/Makefile4
-rw-r--r--usr/src/man/man9f/bzero.9f11
-rw-r--r--usr/src/man/man9f/ddi_ffs.9f180
-rw-r--r--usr/src/man/man9f/ddi_fm_init.9f325
4 files changed, 264 insertions, 256 deletions
diff --git a/usr/src/man/man9f/Makefile b/usr/src/man/man9f/Makefile
index 4b4dd80396..a61f028374 100644
--- a/usr/src/man/man9f/Makefile
+++ b/usr/src/man/man9f/Makefile
@@ -768,7 +768,9 @@ MANLINKS= AVL_NEXT.9f \
ddi_dmae_release.9f \
ddi_dmae_stop.9f \
ddi_exit_critical.9f \
+ ddi_ffsll.9f \
ddi_fls.9f \
+ ddi_flsll.9f \
ddi_fm_capable.9f \
ddi_fm_dma_err_clear.9f \
ddi_fm_dma_err_get.9f \
@@ -1595,7 +1597,9 @@ ddi_dmae_stop.9f := LINKSRC = ddi_dmae.9f
ddi_exit_critical.9f := LINKSRC = ddi_enter_critical.9f
+ddi_ffsll.9f := LINKSRC = ddi_ffs.9f
ddi_fls.9f := LINKSRC = ddi_ffs.9f
+ddi_flsll.9f := LINKSRC = ddi_ffs.9f
ddi_fm_dma_err_clear.9f := LINKSRC = ddi_fm_acc_err_clear.9f
diff --git a/usr/src/man/man9f/bzero.9f b/usr/src/man/man9f/bzero.9f
index 41185de295..ce3ac6012c 100644
--- a/usr/src/man/man9f/bzero.9f
+++ b/usr/src/man/man9f/bzero.9f
@@ -10,20 +10,15 @@ bzero \- clear memory for a given number of bytes
.SH SYNOPSIS
.LP
.nf
-#include <sys/types.h>
-#include <sys/ddi.h>
-
-
+#include <sys/sunddi.h>
\fBvoid\fR \fBbzero\fR(\fBvoid *\fR\fIaddr\fR, \fBsize_t\fR \fIbytes\fR);
.fi
.SH INTERFACE LEVEL
-.sp
.LP
Architecture independent level 1 (DDI/DKI).
.SH PARAMETERS
-.sp
.ne 2
.na
\fB\fIaddr\fR\fR
@@ -42,24 +37,20 @@ The number of bytes to clear starting at \fIaddr\fR.
.RE
.SH DESCRIPTION
-.sp
.LP
The \fBbzero()\fR function clears a contiguous portion of memory by filling it
with zeros.
.SH CONTEXT
-.sp
.LP
The \fBbzero()\fR function can be called from user, interrupt, or kernel
context.
.SH SEE ALSO
-.sp
.LP
\fBbcopy\fR(9F), \fBclrbuf\fR(9F), \fBkmem_zalloc\fR(9F)
.sp
.LP
\fIWriting Device Drivers\fR
.SH WARNINGS
-.sp
.LP
The address range specified must be within the kernel space. No range checking
is done. If an address outside of the kernel space is selected, the driver may
diff --git a/usr/src/man/man9f/ddi_ffs.9f b/usr/src/man/man9f/ddi_ffs.9f
index afd1e13dbd..1baa029aa6 100644
--- a/usr/src/man/man9f/ddi_ffs.9f
+++ b/usr/src/man/man9f/ddi_ffs.9f
@@ -1,76 +1,110 @@
-'\" te
.\" Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved.
-.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
-.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
-.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH DDI_FFS 9F "Jun 5, 2013"
-.SH NAME
-ddi_ffs, ddi_fls \- find first (last) bit set in a long integer
-.SH SYNOPSIS
-.LP
-.nf
-#include <sys/conf.h>
-#include <sys/ddi.h>
-#include <sys/sunddi.h>
-
-
-
-\fBint\fR \fBddi_ffs\fR(\fBlong\fR \fImask\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBddi_fls\fR(\fBlong\fR \fImask\fR);
-.fi
-
-.SH INTERFACE LEVEL
-.sp
-.LP
+.\" Copyright 2019 Joyent, Inc.
+.\"
+.\" The contents of this file are subject to the terms of the
+.\" Common Development and Distribution License (the "License").
+.\" You may not use this file except in compliance with the License.
+.\"
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+.\" or http://www.opensolaris.org/os/licensing.
+.\" See the License for the specific language governing permissions
+.\" and limitations under the License.
+.\"
+.\" When distributing Covered Code, include this CDDL HEADER in each
+.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+.\" If applicable, add the following below this CDDL HEADER, with the
+.\" fields enclosed by brackets "[]" replaced with your own identifying
+.\" information: Portions Copyright [yyyy] [name of copyright owner]
+.\"
+.Dd December 21, 2019
+.Dt DDI_FFS 9F
+.Os
+.Sh NAME
+.Nm ddi_ffs, ddi_ffsll, ddi_fls, ddi_flsll
+.Nd find first (last) bit set in a long (long) integer
+.Sh SYNOPSIS
+.In sys/conf.h
+.In sys/ddi.h
+.In sys/sunddi.h
+.Ft int
+.Fo "ddi_ffs"
+.Fa "long mask"
+.Fc
+.Ft int
+.Fo "ddi_fls"
+.Fa "long mask"
+.Fc
+.Ft int
+.Fo "ddi_ffsll"
+.Fa "long long mask"
+.Fc
+.Ft int
+.Fo "ddi_flsll"
+.Fa "long long mask"
+.Fc
+.Sh INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
-.SH PARAMETERS
-.sp
-.ne 2
-.na
-\fB\fImask\fR\fR
-.ad
-.RS 8n
-A 32-bit argument value to search through.
-.RE
-
-.SH DESCRIPTION
-.sp
-.LP
-The function \fBddi_ffs()\fR takes its argument and returns the shift count
-that the first (least significant) bit set in the argument corresponds to. The
-function \fBddi_fls()\fR does the same, only it returns the shift count for the
-last (most significant) bit set in the argument.
-.SH RETURN VALUES
-.sp
-.ne 2
-.na
-\fB\fB0\fR\fR
-.ad
-.RS 5n
+.Sh PARAMETERS
+.Bl -tag -width Va
+.It Fa mask
+A 32-bit or 64-bit argument value to search through.
+.El
+.Sh DESCRIPTION
+The functions
+.Fn ddi_ffs
+and
+.Fn ddi_ffsll
+take their argument and return the shift count that the first (least
+significant) bit set in the argument corresponds to.
+The functions
+.Fn ddi_fls
+and
+.Fn ddi_flsll
+do the same, only they returns the shift count for the last (most
+significant) bit set in the argument.
+.Fn ddi_ffs
+and
+.Fn ddi_fls
+operate on 32-bit values, while
+.Fn ddi_ffsll
+and
+.Fn ddi_flsll
+operate on 64-bit values.
+.Sh CONTEXT
+These functions can be called from user, interrupt, or kernel context.
+.Sh RETURN VALUES
+.Bl -tag -width Va
+.It 0
No bits are set in mask.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fIN\fR\fR
-.ad
-.RS 5n
-Bit \fIN\fR is the least significant (\fBddi_ffs\fR) or most significant
-(\fBddi_fls\fR) bit set in mask. Bits are numbered from \fB1\fR to \fB32\fR,
-with bit \fB1\fR being the least significant bit position and bit \fB32\fR the
-most significant position.
-.RE
-
-.SH CONTEXT
-.sp
-.LP
-This function can be called from user, interrupt, or kernel context.
-.SH SEE ALSO
-.sp
-.LP
-\fIWriting Device Drivers\fR
+.It N
+Bit
+.Em N
+is the least significant
+.Po
+.Fn ddi_ffs ,
+.Fn ddi_ffsll
+.Pc
+or most significant
+.Po
+.Fn ddi_fls ,
+.Fn ddi_flsll
+.Pc
+bit set in
+.Fa mask .
+Bits are numbered from
+.Em 1
+to
+.Em 32
+or
+.Em 64 ,
+with bit
+.Em 1
+being the least significant bit position and bit
+.Em 32
+or
+.Em 64
+the most significant position, depending on the variant of the
+functions used.
+.El
+.Sh SEE ALSO
+.%T Writing Device Drivers
diff --git a/usr/src/man/man9f/ddi_fm_init.9f b/usr/src/man/man9f/ddi_fm_init.9f
index 388ac0057f..5ff3c7d0f6 100644
--- a/usr/src/man/man9f/ddi_fm_init.9f
+++ b/usr/src/man/man9f/ddi_fm_init.9f
@@ -1,185 +1,164 @@
-'\" te
+.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
-.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
-.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
-.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
-.TH DDI_FM_INIT 9F "May 14, 2007"
-.SH NAME
-ddi_fm_init, ddi_fm_fini, ddi_fm_capable \- initialize and get the FM
+.\" The contents of this file are subject to the terms of the Common
+.\" Development and Distribution License (the "License"). You may not use
+.\" this file except in compliance with the License.
+.\"
+.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+.\" or http://www.opensolaris.org/os/licensing. See the License for the
+.\" specific language governing permissions and limitations under the
+.\" License.
+.\"
+.\" When distributing Covered Code, include this CDDL HEADER in each
+.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. If
+.\" applicable, add the following below this CDDL HEADER, with the fields
+.\" enclosed by brackets "[]" replaced with your own identifying
+.\" information: Portions Copyright [yyyy] [name of copyright owner]
+.\"
+.\" Copyright (c) 2018, Joyent, INc.
+.\"
+.Dd September 13, 2018
+.Dt DDI_FM_INIT 9F
+.Os
+.Sh NAME
+.Nm ddi_fm_init ,
+.Nm ddi_fm_fini ,
+.Nm ddi_fm_capable
+.Nd initialize and get the FM capabilities for a device instance
capabilities for a device instance
-.SH SYNOPSIS
-.LP
-.nf
-#include <sys/ddifm.h>
-
-\fBvoid\fR \fBddi_fm_init\fR(\fBdev_info_t\fR *\fIdip\fR, \fBint\fR *\fIfm_capability\fR,
- \fBddi_iblock_cookie_t\fR *\fIibcp\fR);
-.fi
-
-.LP
-.nf
-\fBvoid\fR \fBddi_fm_fini\fR(\fBdev_info_t\fR *\fIdip\fR);
-.fi
-
-.LP
-.nf
-\fBint\fR \fBddi_fm_capable\fR(\fBdev_info_t\fR *\fIdip\fR, \fBint\fR *\fIfm_capability\fR);
-.fi
-
-.SH INTERFACE LEVEL
-.sp
-.LP
-Solaris DDI specific (Solaris DDI)
-.SH PARAMETERS
-.sp
-.LP
-\fBddi_fm_init()\fR
-.sp
-.ne 2
-.na
-\fB\fIdip\fR\fR
-.ad
-.RS 17n
-Pointer to the \fBdev_info\fR structure
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fIfm_capability\fR\fR
-.ad
-.RS 17n
+.Sh SYNOPSIS
+.In sys/ddifm.h
+.Ft void
+.Fo ddi_fm_init
+.Fa "dev_info_t *dip"
+.Fa "int *fm_capability"
+.Fa "ddi_iblock_cookie_t *ibcp"
+.Fc
+.Ft void
+.Fo ddi_fm_fini
+.Fa "dev_info_t *dip"
+.Fc
+.Ft int
+.Fo ddi_fm_capable
+.Fa "dev_info_t *dip"
+.Fc
+.Sh INTERFACE LEVEL
+.Sy Committed -
+illumos DDI specific
+.Sh Parameters
+.Bl -tag -width Fa
+.It Fa dip
+Pointer to the driver's
+.Sy dev_info
+structure.
+.It Fa fm_capability
Fault Management capability bit mask
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fIibcp\fR\fR
-.ad
-.RS 17n
+.It Fa ibcp
Pointer to where the interrupt block cookie should be returned.
-.RE
-
-.SH DESCRIPTION
-.sp
-.LP
-A device driver can declare its fault management capabilities to the \fBI/O\fR
-Fault Management framework by calling \fBddi_fm_init()\fR. The
-\fBddi_fm_init()\fR function allocates and initializes resources according to
+.El
+.Sh DESCRIPTION
+A device driver can declare its fault management capabilities to the I/O
+Fault Management framework by calling the
+.Fn ddi_fm_init
+function.
+The
+.Fn ddi_fm_init
+function allocates and initializes resources according to
the bitwise-inclusive-OR of the fault management capabilities, described in the
following and supported by the driver's immediate nexus parent.
-.sp
-.ne 2
-.na
-\fB\fBDDI_FM_NOT_CAPABLE\fR\fR
-.ad
-.RS 26n
-The driver does not support any \fBFMA\fR features. This is the default value
-assigned to device drivers.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBDDI_FM_EREPORT_CAPABLE\fR\fR
-.ad
-.RS 26n
-The driver generates \fBFMA\fR protocol error events (\fBereports\fR) upon the
-detection of an error condition.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBDDI_FM_ACCCHK_CAPABLE\fR\fR
-.ad
-.RS 26n
+.Bl -tag -width Vt
+.It Vt DDI_FM_NOT_CAPABLE
+The driver does not support any FMA features.
+This is the default value assigned to device drivers.
+.Pp
+If the value of the capability bits is equal to
+.Vt DDI_FM_NOT_CAPABLE ,
+then no capability bits will be set.
+Conversely, if a capability bit is set, then the capability value will
+not be equal to
+.Vt DDI_FM_NOT_CAPABLE .
+.It Vt DDI_FM_EREPORT_CAPABLE
+The driver generates FMA protocol error events
+.Pq Sy ereports
+upon the detection of an error condition.
+.It Vt DDI_FM_ACCCHK_CAPABLE
The driver checks for errors upon the completion of one or more access
-\fBI/O\fR transactions.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBDDI_FM_DMACHK_CAPABLE\fR\fR
-.ad
-.RS 26n
-The driver checks for errors upon the completion of one or more \fBDMA\fR
-\fBI/O\fR transactions.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBDDI_FM_ERRCB_CAPABLE\fR\fR
-.ad
-.RS 26n
+I/O transactions.
+.It Vt DDI_FM_DMACHK_CAPABLE
+The driver checks for errors upon the completion of one or more DMA
+I/O transactions.
+.It Vt DDI_FM_ERRCB_CAPABLE
The driver is capable of error handler callback registration.
-.RE
-
-.sp
-.LP
+.El
+.Pp
If the parent nexus is not capable of supporting any one of the requested
capabilities, the associated bit will not be set and returned as such to the
-driver. Before returning from \fBddi_fm_init()\fR, the \fBI/O\fR Fault
-Management framework creates a set of fault management capability properties:
-\fBfm-ereport-capable\fR, \fBfm-errcb-capable\fR, \fBfm-accchk-capable\fR, and
-\fBfm-dmachk-capable\fR. The current supported fault management capability
-levels are observable via \fBprtconf\fR(1M).
-.sp
-.LP
+driver.
+Before returning from
+.Fn ddi_fm_init ,
+the I/O Fault Management framework creates a set of fault management capability
+properties:
+.Sy fm-ereport-capable ,
+.Sy fm-errcb-capable ,
+.Sy fm-accchk-capable ,
+and
+.Sy fm-dmachk-capable .
+The current supported fault management capability levels are observable via
+.Xr prtconf 1M .
+.Pp
A driver can support the administrative selection of fault management
capabilities by exporting and setting a fault management capability level
-property in its \fBdriver.conf\fR(4) file to the values described above. The
-\fBfm_capable\fR properties must be set and read prior to calling
-\fBddi_fm_init()\fR with the desired capability list.
-.sp
-.ne 2
-.na
-\fB\fBddi_fm_fini()\fR\fR
-.ad
-.RS 17n
-This function cleans up resources allocated to support fault management for the
-\fIdip\fR structure.
-.RE
-
-.sp
-.ne 2
-.na
-\fB\fBddi_fm_capable()\fR\fR
-.ad
-.RS 20n
-This function returns the capability bit mask currently set for the \fIdip\fR
-structure.
-.RE
-
-.SH CONTEXT
-.sp
-.LP
-These functions can be called from kernel context in a driver \fBattach\fR(9E)
-or \fBdetach\fR(9E) operation.
-.SH ATTRIBUTES
-.sp
-.LP
-See \fBattributes\fR(5) for descriptions of the following attributes:
-.sp
-
-.sp
-.TS
-box;
-c | c
-l | l .
-ATTRIBUTE TYPE ATTRIBUTE VALUE
-_
-Interface Stability Committed
-.TE
-
-.SH SEE ALSO
-.sp
-.LP
-\fBprtconf\fR(1M), \fBdriver.conf\fR(4), \fBattributes\fR(5), \fBattach\fR(9E),
-\fBdetach\fR(9E)
-.sp
-.LP
-\fIWriting Device Drivers\fR
+property in its
+.Xr driver.conf 4
+file to the values described above.
+The
+.Sy fm_capable
+properties must be set and read prior to calling
+.Fn ddi_fm_init
+with the desired capability list.
+.Pp
+The
+.Fn ddi_fm_fini
+function cleans up the kernel infrastructure set up during a call to the
+.Fn ddi_fm_init
+function.
+If the driver did not call
+.Fn ddi_fm_init
+or the capability returned in
+.Fa fm_capability
+was
+.Vt DDI_FM_NOT_CAPABLE
+then the driver must not call
+.Fn ddi_fm_fini .
+.Pp
+The
+.Fn ddi_fm_capable
+function returns the capability bit mask currently set for the device
+instance identified by
+.Fa dip .
+.Sh CONTEXT
+The
+.Fn ddi_fm_init
+and
+.Fn ddi_fm_fini
+functions may only be called from kernel context during a driver's
+.Xr attach 9E
+and
+.Xr detach 9E
+entry points.
+.Sh RETURN VALUES
+Upon successful completion, the
+.Fn ddi_fm_capable
+function returns the FM capability bit mask currently in use.
+If no capabilities are in use then
+.Vt DDI_FM_NOT_CAPABLE
+is returned.
+.Sh SEE ALSO
+.Xr prtconf 1M ,
+.Xr driver.conf 4 ,
+.Xr attach 9E ,
+.Xr detach 9E
+.Pp
+.Rs
+.%B Writing Device Drivers
+.Re