github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/openbsd/dev_pci.txt (about)

     1  # Copyright 2019 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  include <sys/types.h>
     5  include <sys/pciio.h>
     6  include <fcntl.h>
     7  
     8  resource fd_pci[fd]
     9  
    10  openat$pci(fd const[AT_FDCWD], file ptr[in, string["/dev/pci"]], flags flags[open_flags], mode const[0]) fd_pci
    11  
    12  ioctl$PCIOCREAD(fd fd_pci, cmd const[PCIOCREAD], arg ptr[out, pci_io])
    13  ioctl$PCIOCWRITE(fd fd_pci, cmd const[PCIOCWRITE], arg ptr[in, pci_io])
    14  ioctl$PCIOCGETROM(fd fd_pci, cmd const[PCIOCGETROM], arg ptr[out, pci_rom])
    15  
    16  pci_io {
    17  	pi_sel		pcisel
    18  	pi_reg		int32
    19  	pi_width	int32
    20  	pi_data		int32
    21  }
    22  
    23  pci_rom {
    24  	pr_sel		pcisel
    25  	pr_romlen	len[pr_rom, int32]
    26  	pr_rom		ptr[out, array[int32]]
    27  }
    28  
    29  pcisel {
    30  	pc_bus	int8
    31  	pc_dev	int8
    32  	pc_func	int8
    33  }