1 .\" Copyright (c) IBM Corp. 2015
2 .\" Author: Alexey Ishchuk <aishchuk@linux.vnet.ibm.com>
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.
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.
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.
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/>.
25 .TH S390_PCI_MMIO_WRITE 2 2021-03-22 "Linux Programmer's Manual"
27 s390_pci_mmio_write, s390_pci_mmio_read \- transfer data to/from PCI
31 .BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
32 .B #include <unistd.h>
34 .BI "int syscall(SYS_s390_pci_mmio_write, unsigned long " mmio_addr ,
35 .BI " const void *" user_buffer ", size_t " length );
36 .BI "int syscall(SYS_s390_pci_mmio_read, unsigned long " mmio_addr ,
37 .BI " void *" user_buffer ", size_t " length );
41 glibc provides no wrappers for these system calls,
42 necessitating the use of
46 .BR s390_pci_mmio_write ()
49 bytes of data from the user-space buffer
51 to the PCI MMIO memory location specified by
54 .BR s390_pci_mmio_read ()
58 data from the PCI MMIO memory location specified by
60 to the user-space buffer
63 These system calls must be used instead of the simple assignment
64 or data-transfer operations that are used to access the PCI MMIO
65 memory areas mapped to user space on the Linux System z platform.
66 The address specified by
68 must belong to a PCI MMIO memory page mapping in the caller's address space,
69 and the data being written or read must not cross a page boundary.
72 value cannot be greater than the system page size.
75 .BR s390_pci_mmio_write ()
77 .BR s390_pci_mmio_read ()
79 On failure, \-1 is returned and
81 is set to indicate the error.
91 does not point to a valid location in the caller's address space.
99 PCI support is not enabled.
104 These system calls are available since Linux 3.19.
106 This Linux-specific system call is available only on the s390 architecture.
107 The required PCI support is available beginning with System z EC12.