1========= 2intel_reg 3========= 4 5--------------------------------- 6Intel graphics register multitool 7--------------------------------- 8.. include:: defs.rst 9:Author: Jani Nikula <[email protected]> 10:Date: 2016-03-01 11:Version: |PACKAGE_STRING| 12:Copyright: 2015-2016 Intel Corporation 13:Manual section: |MANUAL_SECTION| 14:Manual group: |MANUAL_GROUP| 15 16SYNOPSIS 17======== 18 19**intel_reg** [*OPTIONS*] *COMMAND* 20 21DESCRIPTION 22=========== 23 24Intel graphics register multitool. Read, write, dump, and decode Intel graphics 25MMIO and sideband registers, and more. 26 27OPTIONS 28======= 29 30Some options are global, and some specific to commands. 31 32--verbose 33 Increase verbosity. 34 35--quiet 36 Decrease verbosity. 37 38--count=N 39 Read N registers. 40 41--binary 42 Output binary values. 43 44--all 45 Decode registers for all known platforms. 46 47--mmio=FILE 48 Use MMIO bar from FILE. 49 50--devid=DEVID 51 Pretend to be PCI ID DEVID. Useful with MMIO bar snapshots from other 52 machines. 53 54--spec=PATH 55 Read register spec from directory or file specified by PATH; see REGISTER 56 SPEC DEFINITIONS below for details. 57 58--help 59 Show brief help. 60 61COMMANDS 62======== 63 64See REGISTER REFERENCES below on how to describe registers for the commands. 65 66read [--count=N] REGISTER [...] 67------------------------------- 68 69Dump each specified REGISTER, or N registers starting from each REGISTER. 70 71write REGISTER VALUE [REGISTER VALUE ...] 72----------------------------------------- 73 74Write each VALUE to corresponding REGISTER. 75 76dump [--mmio=FILE --devid=DEVID] 77-------------------------------- 78 79Dump all registers specified in the register spec. 80 81decode REGISTER VALUE 82--------------------- 83 84Decode REGISTER VALUE. 85 86snapshot 87-------- 88 89Output the MMIO bar to stdout. The output can be used for a later invocation of 90dump or read with the --mmio=FILE and --devid=DEVID parameters. 91 92list 93---- 94 95List the known registers. 96 97help 98---- 99 100Display brief help. 101 102 103REGISTER REFERENCES 104=================== 105 106Registers are defined as [(PORTNAME|PORTNUM|ENGINE|MMIO-OFFSET):](REGNAME|REGADDR). 107 108PORTNAME 109 The register access method, most often MMIO, which is the default. The 110 methods supported on all platforms are "mmio", "portio-vga", and "mmio-vga". 111 112 On BYT and CHV, the sideband ports "bunit", "punit", "nc", "dpio", 113 "gpio-nc", "cck", "ccu", "dpio2", and "flisdsi" are also supported. 114 115PORTNUM 116 Port number for the sideband ports supported on BYT and CHV. Only numbers 117 mapped to the supported ports are allowed, arbitrary numbers are not 118 accepted. 119 120 Numbers above 0xff are automatically interpreted as MMIO offsets, not port 121 numbers. 122 123ENGINE 124 Instead of cpu based MMIO, specified engine can be used for access method. 125 Batchbuffer will be targeted for the engine to do read/write. The list of 126 available engines is architecture specific and can be found with 127 "intel_reg help". Prefixing engine name with '-' uses non-privileged 128 batchbuffer for access. 129 130MMIO-OFFSET 131 Use MMIO, and add this offset to the register address. 132 133 Numbers equal to or below 0xff are automatically interpreted as port 134 numbers, not MMIO offsets. 135 136REGNAME 137 Name of the register as defined in the register spec. 138 139 If MMIO offset is not specified, it is picked up from the register 140 spec. However, ports are not; the port is a namespace for the register 141 names. 142 143REGADDR 144 Register address. The corresponding register name need not be specified in 145 the register spec. 146 147ENVIRONMENT 148=========== 149 150INTEL_REG_SPEC 151 Path to a directory or a file containing register spec definitions. 152 153REGISTER SPEC DEFINITIONS 154========================= 155 156A register spec associates register names with addresses. The spec is searched 157for in this order: 158 159#. Directory or file specified by the --spec option. 160 161#. Directory or file specified by the INTEL_REG_SPEC environment variable. 162 163#. Builtin register spec. Also used as fallback with a warning if the above are 164 used but fail. 165 166If a directory is specified using --spec option or INTEL_REG_SPEC environment 167variable, the directory is scanned for a spec file in this order: 168 169#. File named after the PCI device id. For example, "0412". 170 171#. File named after the code name in lowercase, without punctuation. For 172 example, "valleyview". 173 174#. File named after generation. For example, "gen7" (note that this matches 175 valleyview, ivybridge and haswell!). 176 177Register Spec File Format 178------------------------- 179 180The register spec format is briefly described below: 181 182* Empty lines and lines beginning with "#", ";", or "//" are ignored. 183 184* Lines *not* beginning with "(" are interpreted as file names, absolute or 185 relative, to be included. 186 187* Lines beginning with "(" are interpreted as register definitions. 188 189Registers are defined as tuples ('REGNAME', 'REGADDR', 190'PORTNAME|PORTNUM|MMIO-OFFSET'), as in REGISTER REFERENCES above. The port 191description may also be an empty string to denote MMIO. 192 193Examples: 194 195* # this is a comment, below is an include 196 197* vlv_pipe_a.txt 198 199* ('GEN6_PMINTRMSK', '0x0000a168', '') 200 201* ('MIPIA_PORT_CTRL', '0x61190', '0x180000') 202 203* ('PLL1_DW0', '0x8000', 'DPIO') 204 205BUGS 206==== 207 208Reading some registers may hang the GPU or the machine. 209 210REPORTING BUGS 211============== 212 213Report bugs to https://bugs.freedesktop.org. 214