man-pages/man2/s390_pci_mmio_write.2.html
2021-03-31 01:06:50 +01:00

171 lines
3.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of S390_PCI_MMIO_WRITE</TITLE>
</HEAD><BODY>
<H1>S390_PCI_MMIO_WRITE</H1>
Section: System Calls (2)<BR>Updated: 2017-09-15<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
s390_pci_mmio_write, s390_pci_mmio_read - transfer data to/from PCI
MMIO memory page
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<PRE>
<B>#include &lt;<A HREF="file:///usr/include/asm/unistd.h">asm/unistd.h</A>&gt;</B>
<B>int s390_pci_mmio_write(unsigned long </B><I>mmio_addr</I><B>,</B>
<B> void *</B><I>user_buffer</I><B>, size_t </B><I>length</I><B>);</B>
<B>int s390_pci_mmio_read(unsigned long </B><I>mmio_addr</I><B>,</B>
<B> void *</B><I>user_buffer</I><B>, size_t </B><I>length</I><B>);</B>
</PRE>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
The
<B>s390_pci_mmio_write</B>()
system call writes
<I>length</I>
bytes of data from the user-space buffer
<I>user_buffer</I>
to the PCI MMIO memory location specified by
<I>mmio_addr</I>.
The
<B>s390_pci_mmio_read</B>()
system call reads
<I>length</I>
bytes of
data from the PCI MMIO memory location specified by
<I>mmio_addr</I>
to the user-space buffer
<I>user_buffer</I>.
<P>
These system calls must be used instead of the simple assignment
or data-transfer operations that are used to access the PCI MMIO
memory areas mapped to user space on the Linux System z platform.
The address specified by
<I>mmio_addr</I>
must belong to a PCI MMIO memory page mapping in the caller's address space,
and the data being written or read must not cross a page boundary.
The
<I>length</I>
value cannot be greater than the system page size.
<A NAME="lbAE">&nbsp;</A>
<H2>RETURN VALUE</H2>
On success,
<B>s390_pci_mmio_write</B>()
and
<B>s390_pci_mmio_read</B>()
return 0.
On error, -1 is returned and
<I>errno</I>
is set to one of the error codes listed below.
<A NAME="lbAF">&nbsp;</A>
<H2>ERRORS</H2>
<DL COMPACT>
<DT id="1"><B>EFAULT</B>
<DD>
The address in
<I>mmio_addr</I>
is invalid.
<DT id="2"><B>EFAULT</B>
<DD>
<I>user_buffer</I>
does not point to a valid location in the caller's address space.
<DT id="3"><B>EINVAL</B>
<DD>
Invalid
<I>length</I>
argument.
<DT id="4"><B>ENODEV</B>
<DD>
PCI support is not enabled.
<DT id="5"><B>ENOMEM</B>
<DD>
Insufficient memory.
</DL>
<A NAME="lbAG">&nbsp;</A>
<H2>VERSIONS</H2>
These system calls are available since Linux 3.19.
<A NAME="lbAH">&nbsp;</A>
<H2>CONFORMING TO</H2>
This Linux-specific system call is available only on the s390 architecture.
The required PCI support is available beginning with System z EC12.
<A NAME="lbAI">&nbsp;</A>
<H2>NOTES</H2>
Glibc does not provide a wrapper for this system call, use
<B><A HREF="/cgi-bin/man/man2html?2+syscall">syscall</A></B>(2)
to call it.
<A NAME="lbAJ">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?2+syscall">syscall</A></B>(2)
<A NAME="lbAK">&nbsp;</A>
<H2>COLOPHON</H2>
This page is part of release 5.05 of the Linux
<I>man-pages</I>
project.
A description of the project,
information about reporting bugs,
and the latest version of this page,
can be found at
<A HREF="https://www.kernel.org/doc/man-pages/.">https://www.kernel.org/doc/man-pages/.</A>
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="6"><A HREF="#lbAB">NAME</A><DD>
<DT id="7"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="8"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="9"><A HREF="#lbAE">RETURN VALUE</A><DD>
<DT id="10"><A HREF="#lbAF">ERRORS</A><DD>
<DT id="11"><A HREF="#lbAG">VERSIONS</A><DD>
<DT id="12"><A HREF="#lbAH">CONFORMING TO</A><DD>
<DT id="13"><A HREF="#lbAI">NOTES</A><DD>
<DT id="14"><A HREF="#lbAJ">SEE ALSO</A><DD>
<DT id="15"><A HREF="#lbAK">COLOPHON</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:34 GMT, March 31, 2021
</BODY>
</HTML>