s390_pci_mmio_write(2) — Linux manual page

NAME | LIBRARY | SYNOPSIS | DESCRIPTION | RETURN VALUE | ERRORS | STANDARDS | HISTORY | SEE ALSO | COLOPHON

s390_pci_mmio_write(2)     System Calls Manual    s390_pci_mmio_write(2)

NAME         top

       s390_pci_mmio_write, s390_pci_mmio_read - transfer data to/from
       PCI MMIO memory page

LIBRARY         top

       Standard C library (libc, -lc)

SYNOPSIS         top

       #include <sys/syscall.h>      /* Definition of SYS_* constants */
       #include <unistd.h>

       int syscall(SYS_s390_pci_mmio_write, unsigned long mmio_addr,
                              const void user_buffer[.length], size_t length);
       int syscall(SYS_s390_pci_mmio_read, unsigned long mmio_addr,
                              void user_buffer[.length], size_t length);

       Note: glibc provides no wrappers for these system calls,
       necessitating the use of syscall(2).

DESCRIPTION         top

       The s390_pci_mmio_write() system call writes length bytes of data
       from the user-space buffer user_buffer to the PCI MMIO memory
       location specified by mmio_addr.  The s390_pci_mmio_read() system
       call reads length bytes of data from the PCI MMIO memory location
       specified by mmio_addr to the user-space buffer user_buffer.

       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 mmio_addr 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 length
       value cannot be greater than the system page size.

RETURN VALUE         top

       On success, s390_pci_mmio_write() and s390_pci_mmio_read() return
       0.  On failure, -1 is returned and errno is set to indicate the
       error.

ERRORS         top

       EFAULT The address in mmio_addr is invalid.

       EFAULT user_buffer does not point to a valid location in the
              caller's address space.

       EINVAL Invalid length argument.

       ENODEV PCI support is not enabled.

       ENOMEM Insufficient memory.

STANDARDS         top

       Linux on s390.

HISTORY         top

       Linux 3.19.  System z EC12.

SEE ALSO         top

       syscall(2)

COLOPHON         top

       This page is part of the man-pages (Linux kernel and C library
       user-space interface documentation) project.  Information about
       the project can be found at 
       ⟨https://www.kernel.org/doc/man-pages/⟩.  If you have a bug report
       for this manual page, see
       ⟨https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING⟩.
       This page was obtained from the tarball man-pages-6.9.1.tar.gz
       fetched from
       ⟨https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/⟩ on
       2024-06-26.  If you discover any rendering problems in this HTML
       version of the page, or you believe there is a better or more up-
       to-date source for the page, or you have corrections or
       improvements to the information in this COLOPHON (which is not
       part of the original manual page), send a mail to
       man-pages@man7.org

Linux man-pages 6.9.1          2024-05-02         s390_pci_mmio_write(2)

Pages that refer to this page: syscalls(2)