s390_pci_mmio_write(2)

πŸ’– s390_pci_mmio_write(2) β€” the manual page, but make it make sense ✨

okay bestie, gather round, because today we're talking about s390_pci_mmio_write and s390_pci_mmio_read β€” two syscalls from the System Calls Manual that live on Linux on s390 (that's IBM System z, the Big Ironβ„’ πŸ’…). They move data between your user-space buffer and a PCI MMIO memory page. Yes, it's giving main-character energy for mainframes. Let's go. πŸŽ€


✨ NAME ✨

  • s390_pci_mmio_write, s390_pci_mmio_read β€” transfer data to/from PCI MMIO memory page 🌸

πŸ“š LIBRARY πŸ“š

Standard C library β€” that's libc, -lc. Nothing exotic, she's just built different. πŸ’–


🫢 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). So yeah, you're raw-dogging the syscall interface. No cute libc helper is coming to save you. 😭

πŸ’œ 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. Like, no cap, don't try to be cute with a plain pointer deref β€” that's not the vibe here. πŸ”₯

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. And the length value cannot be greater than the system page size. Periodt. πŸ‘‘


πŸ“ RETURN VALUE πŸ“

On success, s390_pci_mmio_write() and s390_pci_mmio_read() return 0. Slay. ✨

On failure, -1 is returned and errno is set to indicate the error. Boo. πŸ’€


πŸ™ˆ 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.

(Yes, EFAULT shows up twice with two different explanations. She contains multitudes. πŸ’…)


πŸ‘‘ STANDARDS πŸ‘‘

Linux on s390. 🌈


πŸ•°οΈ HISTORY πŸ•°οΈ

Linux 3.19. System z EC12. Vintage but still iconic. ⭐


🌟 SEE ALSO 🌟


πŸ’Œ tiny sign-off: this lil masterpiece comes to you from Linux man-pages 6.20, dated 2026-02-08, and she is the s390_pci_mmio_write(2) page. That's the whole vibe check. iykyk 🧚 πŸ’œ
πŸ“¦ where this page comes from
  • arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
  • nixpkgs unstable: man-pages 6.20
  • πŸ“œ the page's license: GPL-2.0-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms