1 .\" Copyright (c) IBM Corp. 2015
2 .\" Author: Alexey Ishchuk <aishchuk@linux.vnet.ibm.com>
4 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .TH S390_PCI_MMIO_WRITE 2 2021-03-22 "Linux Programmer's Manual"
8 s390_pci_mmio_write, s390_pci_mmio_read \- transfer data to/from PCI
12 .RI ( libc ", " \-lc )
15 .BR "#include <sys/syscall.h>" " /* Definition of " SYS_* " constants */"
16 .B #include <unistd.h>
18 .BI "int syscall(SYS_s390_pci_mmio_write, unsigned long " mmio_addr ,
19 .BI " const void *" user_buffer ", size_t " length );
20 .BI "int syscall(SYS_s390_pci_mmio_read, unsigned long " mmio_addr ,
21 .BI " void *" user_buffer ", size_t " length );
25 glibc provides no wrappers for these system calls,
26 necessitating the use of
30 .BR s390_pci_mmio_write ()
33 bytes of data from the user-space buffer
35 to the PCI MMIO memory location specified by
38 .BR s390_pci_mmio_read ()
42 data from the PCI MMIO memory location specified by
44 to the user-space buffer
47 These system calls must be used instead of the simple assignment
48 or data-transfer operations that are used to access the PCI MMIO
49 memory areas mapped to user space on the Linux System z platform.
50 The address specified by
52 must belong to a PCI MMIO memory page mapping in the caller's address space,
53 and the data being written or read must not cross a page boundary.
56 value cannot be greater than the system page size.
59 .BR s390_pci_mmio_write ()
61 .BR s390_pci_mmio_read ()
63 On failure, \-1 is returned and
65 is set to indicate the error.
75 does not point to a valid location in the caller's address space.
83 PCI support is not enabled.
88 These system calls are available since Linux 3.19.
90 This Linux-specific system call is available only on the s390 architecture.
91 The required PCI support is available beginning with System z EC12.