1S390_PCI_MMIO_WRITE(2) System Calls Manual S390_PCI_MMIO_WRITE(2)
2
3
4
6 s390_pci_mmio_write, s390_pci_mmio_read - transfer data to/from PCI
7 MMIO memory page
8
10 #include <asm/unistd.h>
11
12 int s390_pci_mmio_write(unsigned long mmio_addr,
13 void *user_buffer, size_t length);
14 int s390_pci_mmio_read(unsigned long mmio_addr,
15 void *user_buffer, size_t length);
16
18 The s390_pci_mmio_write() system call writes length bytes of data from
19 the user-space buffer user_buffer to the PCI MMIO memory location spec‐
20 ified by mmio_addr. The s390_pci_mmio_read() system call reads length
21 bytes of data from the PCI MMIO memory location specified by mmio_addr
22 to the user-space buffer user_buffer.
23
24 These system calls must be used instead of the simple assignment or
25 data-transfer operations that are used to access the PCI MMIO memory
26 areas mapped to user space on the Linux System z platform. The address
27 specified by mmio_addr must belong to a PCI MMIO memory page mapping in
28 the caller's address space, and the data being written or read must not
29 cross a page boundary. The length value cannot be greater than the
30 system page size.
31
33 On success, s390_pci_mmio_write() and s390_pci_mmio_read() return 0.
34 On error, -1 is returned and errno is set to one of the error codes
35 listed below.
36
38 EFAULT The address in mmio_addr is invalid.
39
40 EFAULT user_buffer does not point to a valid location in the caller's
41 address space.
42
43 EINVAL Invalid length argument.
44
45 ENODEV PCI support is not enabled.
46
47 ENOMEM Insufficient memory.
48
50 These system calls are available since Linux 3.19.
51
53 This Linux-specific system call is available only on the s390 architec‐
54 ture. The required PCI support is available beginning with System z
55 EC12.
56
58 Glibc does not provide a wrapper for this system call, use syscall(2)
59 to call it.
60
62 syscall(2)
63
65 This page is part of release 5.10 of the Linux man-pages project. A
66 description of the project, information about reporting bugs, and the
67 latest version of this page, can be found at
68 https://www.kernel.org/doc/man-pages/.
69
70
71
72Linux Programmer's Manual 2017-09-15 S390_PCI_MMIO_WRITE(2)