Without command line parameters, this tool dumps the address ranges, port ranges and IRQ assignments of all PCI devices.
The first parameter is taken as a filter for functions. It can have several forms, like
01:07.0The primary function (.0) of device 7 on bus 1. bus and device numbers must be two hex digits each.03/00/00All functions with class 03, sub-class 00 and programming interface 00 (i.e. VGA cards).03/00/00@0The first VGA-compatible function.03/00/00@1The second VGA-compatible function. The instance number is decimal and may have as many digits as required8086:7110All devices with vendor ID 8086 and device ID 7110 (the primary function of Intel's PIIX4). Device and vendor IDs are specified as hexadecimal and must be given using 4 digits.8086:7110@0The first PIIX4 device.
If the first parameter is the only parameter, all devices matching that parameter are dumped. Otherwise, the subsequen parameters are a list of PCI registers ro be read/written. Again, several forms are supported. The number of digits in each form is fixed and must be exactly as shown:
3CPrint the byte in configuration space at address 3C, i.e. the interrupt number as assigned by the BIOS or Operating system.02.WPrint the word (16-bit) at configuration space address 02, i.e. the device ID. Lowercase "w" works, too.10.LPrint the longword (32-bit) at configuration space address 10, i.e. the first BAR. Lowercase "l", as well as "D" or "d" (for double-word) work, too.3C=0BOverwrite the assigned interrupt number. Note: This does not actually re-route the interrupt, but makes drivers believe the function is connected to IRQ11 (0B hex).04=0007Update the command word to allow I/O response, memory response and bus-mastering10=10000000Move the range decoded in the first BAR to 0x1000000004=0000:0004Use 0004 as mask (only the busmaster enable bit) and write corresponding bits from 0000 to configuration word at address 4, i.e.: disable busmastering. It is an error for the data to have bits set that are not enabled in the mask.04=00:04The same as above, but using byte-wide access to configuration space.10=ABCD0000:FFFFF000Update the top 20 bits of the first BAR.04=04^00Replacing the colon by the caret unlocks a special feature: bit flipping. Bits set in the first number (the "XOR mask"), but not set in the second number (the "AND mask") will be flipped. In this case, the bus master enable bit will be flipped every time this command is executed.
You may also use -v (verbose) to get a little more verbosity, or -q (quiet) to suppress most output, as well as -h for the built-in
help message. These switches must precede all other command line options.
Uses the BIOS extended memory copy function to access memory at arbitrary addresses and write it to a file. The invocation is like
dumpmem BIOS.BIN FFFE0000 0x20000
to dump the last 128K (0x20000 bytes) of the address space to a file called BIOS.BIN. On many 486 and Pentium-class computers, this will create a dump of the contents pf the flash chip (which is different from the runtime BIOS you see at F000:0000). The first parameter is the output filename, the second parameter is the start address (hex, not 0x in the beginning allowed) and the third parameter is the size (as C integer, so use 0x for hex, a leading zero for octal or anything else for decimal).
Note that physical memory access may not produce the expected results in virtualized environments (like the Windows DOS box).