github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/sys/linux/dev_vga_arbiter.txt (about) 1 # Copyright 2020 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 <fcntl.h> 5 6 resource fd_vga_arbiter[fd] 7 openat$vga_arbiter(fd const[AT_FDCWD], file ptr[in, string["/dev/vga_arbiter"]], flags flags[open_flags], mode const[0]) fd_vga_arbiter 8 write$vga_arbiter(fd fd_vga_arbiter, data ptr[in, data_vga_arbiter], len bytesize[data]) 9 10 data_vga_arbiter [ 11 target_default string["target default"] 12 unlock_all string["unlock all"] 13 target vga_arbiter_target_cmd 14 other vga_arbiter_io_state_cmd 15 ] [varlen] 16 17 vga_arbiter_target_cmd { 18 prefix stringnoz["target "] 19 card_id vga_arbiter_card_id 20 end const[0, int8] 21 } [packed] 22 23 # We cannot use fmt for the numbers here or else the result string will be too long 24 vga_arbiter_card_id { 25 prefix stringnoz["PCI:"] 26 domain stringnoz[vga_arbiter_pci_numbers] 27 colon1 stringnoz[":"] 28 bus stringnoz[vga_arbiter_pci_numbers] 29 colon2 stringnoz[":"] 30 dev stringnoz[vga_arbiter_pci_numbers] 31 dot stringnoz["."] 32 fn stringnoz[vga_arbiter_pci_numbers] 33 } [packed] 34 35 vga_arbiter_pci_numbers = "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "1a", "1b", "1c", "1d", "1e", "1f" 36 37 vga_arbiter_io_state_cmd { 38 name stringnoz[vga_arbiter_io_state_cmd_names] 39 space stringnoz[" "] 40 io_state stringnoz[vga_arbiter_io_states] 41 end const[0, int8] 42 } [packed] 43 44 vga_arbiter_io_state_cmd_names = "lock", "trylock", "unlock", "decodes" 45 vga_arbiter_io_states = "io", "mem", "io+mem", "none"