]>
Commit | Line | Data |
---|---|---|
a698082e AI |
1 | .\" Copyright (c) IBM Corp. 2015 |
2 | .\" Author: Alexey Ishchuk <aishchuk@linux.vnet.ibm.com> | |
3 | .\" | |
4 | .\" %%%LICENSE_START(GPLv2+_DOC_FULL) | |
5 | .\" This is free documentation; you can redistribute it and/or | |
6 | .\" modify it under the terms of the GNU General Public License as | |
7 | .\" published by the Free Software Foundation; either version 2 of | |
8 | .\" the License, or (at your option) any later version. | |
9 | .\" | |
10 | .\" The GNU General Public License's references to "object code" | |
11 | .\" and "executables" are to be interpreted as the output of any | |
12 | .\" document formatting or typesetting system, including | |
13 | .\" intermediate and printed output. | |
14 | .\" | |
15 | .\" This manual is distributed in the hope that it will be useful, | |
16 | .\" but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | .\" GNU General Public License for more details. | |
19 | .\" | |
20 | .\" You should have received a copy of the GNU General Public | |
21 | .\" License along with this manual; if not, see | |
22 | .\" <http://www.gnu.org/licenses/>. | |
23 | .\" %%%LICENSE_END | |
24 | .\" | |
25 | .TH S390_PCI_MMIO_WRITE 2 2015-01-15 "Linux Programmer's Manual" | |
26 | .SH NAME | |
27 | s390_pci_mmio_write, s390_pci_mmio_read \- transfer data to/from PCI | |
28 | MMIO memory page | |
29 | .SH SYNOPSIS | |
30 | .nf | |
31 | .B #include <asm/unistd.h> | |
32 | ||
33 | .BI "int s390_pci_mmio_write(unsigned long " mmio_addr ", | |
34 | .BI " void *" user_buffer ", | |
35 | .BI " size_t " length "); | |
36 | .br | |
37 | .BI "int s390_pci_mmio_read(unsigned long " mmio_addr ", | |
38 | .BI " void *" user_buffer ", | |
39 | .BI " size_t " length "); | |
40 | .fi | |
41 | .SH DESCRIPTION | |
42 | The | |
43 | .BR s390_pci_mmio_write () | |
44 | system call writes data of length | |
45 | .IR length | |
46 | from the user space buffer | |
47 | .IR user_buffer | |
48 | to a PCI MMIO memory location. | |
49 | The | |
50 | .BR s390_pci_mmio_read () | |
51 | system call reads data from a PCI MMIO memory location | |
52 | to the user space buffer | |
53 | .IR user_buffer | |
54 | of | |
55 | .IR length | |
56 | bytes size. | |
57 | ||
58 | These system calls must be used instead of the simple assignment | |
59 | or data transfer operations that are used to access the PCI MMIO | |
c1eb8ec5 | 60 | memory areas mapped to the user space on the Linux on System z platform. |
a698082e AI |
61 | The address specified by the |
62 | .IR mmio_addr | |
63 | parameter must belong to a PCI MMIO memory page mapping in the user | |
64 | address space, and the data being written or read must not cross a | |
c1eb8ec5 MK |
65 | page boundary. |
66 | The | |
a698082e AI |
67 | .IR length |
68 | parameter value cannot be greater than the page size. | |
69 | .SH RETURN VALUE | |
70 | On success, | |
71 | .BR s390_pci_mmio_write () | |
72 | and | |
73 | .BR s390_pci_mmio_read () | |
74 | return 0. | |
75 | On error, \-1 is returned and | |
76 | .IR errno | |
77 | is set to one of the error codes listed below. | |
78 | .SH ERRORS | |
79 | .TP | |
80 | .B ENODEV | |
81 | PCI support is not enabled. | |
82 | .TP | |
83 | .B ENOMEM | |
84 | Insufficient memory. | |
85 | .TP | |
86 | .B EFAULT | |
87 | Invalid address was specified. | |
88 | .TP | |
89 | .B EINVAL | |
90 | Invalid parameter value. | |
91 | .SH VERSIONS | |
92 | These system calls are available since Linux 3.19. | |
93 | .SH CONFORMING TO | |
c1eb8ec5 MK |
94 | This Linux-specific system call is available only on the s390 architecture. |
95 | The required PCI support is available beginning with System z EC12. | |
a698082e AI |
96 | .SH NOTES |
97 | Glibc does not provide a wrapper for this system call, use | |
98 | .BR syscall (2) | |
99 | to call it. | |
100 | .SH SEE ALSO | |
101 | .BR syscall (2) |