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

LIBRARY

10       Standard C library (libc, -lc)
11

SYNOPSIS

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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

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

STANDARDS

56       Linux on s390.
57

HISTORY

59       Linux 3.19.  System z EC12.
60

SEE ALSO

62       syscall(2)
63
64
65
66Linux man-pages 6.05              2023-03-30            s390_pci_mmio_write(2)
Impressum