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 ofsyscall(2). So yeah, you're raw-dogging the syscall interface. No cutelibchelper 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 inmmio_addris invalid.EFAULTβuser_bufferdoes not point to a valid location in the caller's address space.EINVALβ Invalidlengthargument.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
- Copyright 2015, International Business Machines Corp
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms