Unknown VGA card, unknown video memory base address

mvDELTA, mvGAMMA-G, mvSIGMA-SLC, mvSIGMA-SLG, mvSIGMA-SQ, mvTITAN-C16, mvTITAN-C8, mvTITAN-CL, mvTITAN-DIG, mvTITAN-G1, mvTITAN-RGB/G4, pcIMAGE-SC, pcIMAGE-SDIG, pcIMAGE-SG/SGVS, pcIMAGE-SRGB

If you look at your kernel message file (using "dmesg" or look at the file "/var/log/messages")
you will find (after a lot of searching) a line like this:

Sep 10 11:00:45 danemark kernel: matrixfg Unknown video memory base address.

This message means that the VGA card is not known to the kernel driver.
If we don"t know the VGA card then we can"t be sure of the linear display memory address
which we need as the destination for our DMA transfers.

(The Windows driver uses DirectX to get this information but with Linux we don"t always
have the equivalent which is an extension to "X").

In this case we need:

(1) to find out the address and start the kernel module by hand with an extra parameter
and/or
(2) add the information to a table in the kernel module sources and recompile.

In fact, the best way is to try it out using (1) and then do (2).

Open the file "driver/os/linux/kmod/vgatable.h" and read the comments in the header area.
It tells you how to add the vendor-Id and device-Id for your graphic card to the driver.
Alternatively you can load the "matrixfg" kernel module using an extra parameter like this:

vidmem=0xd8000000 (Example for my NVidia card)

Just replace "0xd8000000" with the correct PCI-memory address for your card.
You can find this out by using "lspci -v" or "cat /proc/pci".
If your card has more than one memory area you might have to try them all out until,
when loading the kernel module, the error message ("Unknown video memory base address")
disappears and the test program works.

Hint: The table in "driver/os/linux/kmod/vgatable.h" shows you which of the base addresses
(PCI_BASE_ADDRESS_0 or PCI_BASE_ADDRESS_1) most of the usual cards use.
PCI_BASE_ADDRESS_0 is the first address that "lspci -v" or "cat /proc/pci" shows and
PCI_BASE_ADDRESS_1 is the second address, Some dual-head cards have 3 addresses.

Example
===

Here is part of the output for my Linux computer (lspci -v):

01:00.0 VGA compatible controller: nVidia Corporation GeForce 256 (rev 10)
(prog-if 00 [VGA])
Subsystem: Guillemot Corporation: Unknown device 5022
Flags: bus master, 66Mhz, medium devsel, latency 32, IRQ 11
Memory at e0000000 (32-bit, non-prefetchable) [size=16M]
Memory at d8000000 (32-bit, prefetchable) [size=128M]
Expansion ROM at [disabled] [size=64K]
Capabilities: [60] Power Management version 1
Capabilities: [44] AGP version 2.0

And here"s the same thing using "lspci -nv" (showing numeric IDs). "Class 0300" is a VGA card:

01:00.0 Class 0300: 10de:0100 (rev 10)
Subsystem: 14af:5022
Flags: bus master, 66Mhz, medium devsel, latency 32, IRQ 11
Memory at e0000000 (32-bit, non-prefetchable) [size=16M]
Memory at d8000000 (32-bit, prefetchable) [size=128M]
Expansion ROM at [disabled] [size=64K]
Capabilities: [60] Power Management version 1
Capabilities: [44] AGP version 2.0

When I try out the address 0xe0000000 it does not work. But the second address (0xd8000000) does work.
So I add the following line to the table in "vgatable.h" and recompile, install and load "matrixfg.o".
The vendor Id is 0x10de and the device Id is 0x0100 (from above):

.
.
{0x10de, 0x0100, "Geforce 256", PCI_BASE_ADDRESS_1},
.
.

Sometimes the IDs have already been defined in the kernel headers
(/usr/source/linux/include/linux/pci.h (or pci_ids.h) and you can use
sensible names instead of numbers like this (invented example, doesn"t really exist):

{PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_GEFORCE2_256, "Geforce 256", PCI_BASE_ADDRESS_1}

By the way, if you are successful you might like to tell me what you have added to the table so that I can include it in future releases.

Note:
Normally all chips from the same family use the same address base.
E.g. All current NVidia chips use PCI_BASE_ADDRESS_1 which is the second address shown in "lspci -v".

Back