1S390_PCI_MMIO_WRITE(2)        System Calls Manual       S390_PCI_MMIO_WRITE(2)
2
3
4

NAME

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

SYNOPSIS

10       #include <sys/syscall.h>      /* Definition of SYS_* constants */
11       #include <unistd.h>
12
13       int syscall(SYS_s390_pci_mmio_write, unsigned long mmio_addr,
14                              const void *user_buffer, size_t length);
15       int syscall(SYS_s390_pci_mmio_read, unsigned long mmio_addr,
16                              void *user_buffer, size_t length);
17
18       Note: glibc provides no wrappers for these system calls,  necessitating
19       the use of syscall(2).
20

DESCRIPTION

22       The  s390_pci_mmio_write() system call writes length bytes of data from
23       the user-space buffer user_buffer to the PCI MMIO memory location spec‐
24       ified  by mmio_addr.  The s390_pci_mmio_read() system call reads length
25       bytes of data from the PCI MMIO memory location specified by  mmio_addr
26       to the user-space buffer user_buffer.
27
28       These  system  calls  must  be used instead of the simple assignment or
29       data-transfer operations that are used to access the  PCI  MMIO  memory
30       areas mapped to user space on the Linux System z platform.  The address
31       specified by mmio_addr must belong to a PCI MMIO memory page mapping in
32       the caller's address space, and the data being written or read must not
33       cross a page boundary.  The length value cannot  be  greater  than  the
34       system page size.
35

RETURN VALUE

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

ERRORS

41       EFAULT The address in mmio_addr is invalid.
42
43       EFAULT user_buffer does not point to a valid location in  the  caller's
44              address space.
45
46       EINVAL Invalid length argument.
47
48       ENODEV PCI support is not enabled.
49
50       ENOMEM Insufficient memory.
51

VERSIONS

53       These system calls are available since Linux 3.19.
54

CONFORMING TO

56       This Linux-specific system call is available only on the s390 architec‐
57       ture.  The required PCI support is available beginning  with  System  z
58       EC12.
59

SEE ALSO

61       syscall(2)
62

COLOPHON

64       This  page  is  part of release 5.13 of the Linux man-pages project.  A
65       description of the project, information about reporting bugs,  and  the
66       latest     version     of     this    page,    can    be    found    at
67       https://www.kernel.org/doc/man-pages/.
68
69
70
71Linux Programmer's Manual         2021-03-22            S390_PCI_MMIO_WRITE(2)
Impressum