gfxmatrox: Introduce new programmer driver for Matrox Millenium cards

Supports a 64KiB parallel flash. ROM BAR configuration is tricky: The
register is only accessible when a special `biosen` bit is set. An OS
might not know this and is then unable to assign an address. We'll of-
fer to re-purpose the MMIO BAR address, but one has to be sure that no
graphics driver is running.

Datasheet used:
https://www.vintage3d.org/doc/matrox/2164spec.pdf

Change-Id: Ief6c05c8fbf752814d436ac3b47e87de0c977047
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/532
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
diff --git a/flashprog.8.tmpl b/flashprog.8.tmpl
index d771333..24d9aaf 100644
--- a/flashprog.8.tmpl
+++ b/flashprog.8.tmpl
@@ -310,6 +310,8 @@
 .sp
 .BR "* nicamd" " (for parallel flash ROMs on AMD PCnet network cards)
 .sp
+.BR "* gfxmatrox" " (for flash ROMs on Matrox graphics cards)"
+.sp
 .BR "* gfxnvidia" " (for flash ROMs on NVIDIA graphics cards)"
 .sp
 .BR "* drkaiser" " (for flash ROMs on Dr. Kaiser PC-Waechter PCI cards)"
@@ -763,9 +765,9 @@
 not here).
 .SS
 .BR "nic3com" , " nicrealtek" , " nicnatsemi" , " nicintel", " nicintel_eeprom"\
-, " nicintel_spi" , " nicamd" , " gfxnvidia" , " ogp_spi" , " drkaiser"\
-, " satasii" , " scsilsi", " satamv" , " atahpt", " atavia ", " atapromise "\
-and " it8212 " programmers
+, " nicintel_spi" , " nicamd" , " gfxmatrox" , " gfxnvidia" , " ogp_spi"\
+, " drkaiser", " satasii" , " scsilsi", " satamv" , " atahpt", " atavia "\
+, " atapromise " and " it8212 " programmers
 .IP
 These programmers have an option to specify the PCI address of the card
 your want to use, which must be specified if more than one card supported
@@ -823,6 +825,19 @@
 .sp
 .B "  flashprog \-p nicamd:max_decode_kb=128"
 .SS
+.BR "gfxmatrox " programmer
+.IP
+This programmer module supports parallel flash up to 64KiB, attached to Matrox graphics cards. The ROM BAR
+is used for reading
+.B and writing
+the flash. Because the whole BAR register is disabled by default, though, it's likely that we have to
+configure it ourselves. The ROM BAR decoding takes precedence, so we can borrow the MMIO BAR address,
+but have to make double sure that no graphics driver is running. Hence, this borrowing has to be explicitly
+enabled with the
+.BR "bar=no_gfx_driver_running " argument.
+.sp
+.B "  flashprog \-p gfxmatrox:bar=no_gfx_driver_running"
+.SS
 .BR "ft2232_spi " programmer
 .IP
 This module supports various programmers based on FTDI FT2232/FT4232H/FT4233H/FT232H chips including the DLP Design
@@ -1567,7 +1582,7 @@
 .B atahpt
 needs PCI configuration space access and raw I/O port access.
 .sp
-.BR gfxnvidia ", " drkaiser " and " it8212
+.BR gfxmatrox ", " gfxnvidia ", " drkaiser " and " it8212
 need PCI configuration space access and raw memory access.
 .sp
 .B rayer_spi
@@ -1596,8 +1611,8 @@
 needs no access permissions at all.
 .sp
 .BR internal ", " nicamd ", " nic3com ", " nicrealtek ", " nicnatsemi ", "
-.BR gfxnvidia ", " drkaiser ", " satamv ", " satasii ", " scsilsi ", "
-.BR atahpt ", " atavia " and " atapromise
+.BR gfxmatrox ", " gfxnvidia ", " drkaiser ", " satamv ", " satasii ", "
+.BR scsilsi ", " atahpt ", " atavia " and " atapromise
 have to be run as superuser/root, and need additional raw access permission.
 .sp
 .BR serprog ", " buspirate_spi ", " dediprog ", " usbblaster_spi ", " ft2232_spi ", " pickit2_spi ", " \