---
name: "s390_pci_mmio_write"
section: "2"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/s390_pci_mmio_write"
---

# s390\_pci\_mmio\_write(2)

transfer data to/from PCI MMIO memory page

## NAME

s390\_pci\_mmio\_write, s390\_pci\_mmio\_read - transfer data to/from PCI MMIO memory page

## LIBRARY

Standard C library (*libc*, *-lc*)

## SYNOPSIS

```
#include <sys/syscall.h>      /* Definition of SYS_* constants */
#include <unistd.h>
```

**int syscall(**size\_t length;             **SYS\_s390\_pci\_mmio\_write, unsigned long** *mmio\_addr***,**             **const void** *user\_buffer***\[***length***\], size\_t** *length***);** **int syscall(**size\_t length;             **SYS\_s390\_pci\_mmio\_read, unsigned long** *mmio\_addr***,**             **void** *user\_buffer***\[***length***\], size\_t** *length***);**

*Note*: glibc provides no wrappers for these system calls, necessitating the use of [**syscall**(2)](/syscall/2.md).

## DESCRIPTION

The **s390\_pci\_mmio\_write**() system call writes *length* bytes of data from the user-space buffer *user\_buffer* to the PCI MMIO memory location specified by *mmio\_addr*. The **s390\_pci\_mmio\_read**() system call reads *length* bytes of data from the PCI MMIO memory location specified by *mmio\_addr* to the user-space buffer *user\_buffer*.

These system calls must be used instead of the simple assignment or data-transfer operations that are used to access the PCI MMIO memory areas mapped to user space on the Linux System z platform. The address specified by *mmio\_addr* must belong to a PCI MMIO memory page mapping in the caller's address space, and the data being written or read must not cross a page boundary. The *length* value cannot be greater than the system page size.

## RETURN VALUE

On success, **s390\_pci\_mmio\_write**() and **s390\_pci\_mmio\_read**() return 0. On failure, -1 is returned and *errno* is set to indicate the error.

## ERRORS

- **EFAULT**

  The address in *mmio\_addr* is invalid.

- **EFAULT**

  *user\_buffer* does not point to a valid location in the caller's address space.

- **EINVAL**

  Invalid *length* argument.

- **ENODEV**

  PCI support is not enabled.

- **ENOMEM**

  Insufficient memory.

## STANDARDS

Linux on s390.

## HISTORY

Linux 3.19. System z EC12.

## SEE ALSO

[**syscall**(2)](/syscall/2.md)
