dmidecode will tell you how the RAM etc. reports itself, by decoding information in a table. There's an Ubuntu package of it already too. The relevant parts of an example output might be:
Handle 0x0005, DMI type 5, 22 bytes
Memory Controller Information
Error Detecting Method: 64-bit ECC
Error Correcting Capabilities:
None
Supported Interleave: One-way Interleave
Current Interleave: One-way Interleave
Maximum Memory Module Size: 1024 MB
Maximum Total Memory Size: 3072 MB
Supported Speeds:
Other
Supported Memory Types:
Other
DIMM
SDRAM
Memory Module Voltage: 3.3 V
Associated Memory Slots: 3
0x0006
0x0007
0x0008
Enabled Error Correcting Capabilities:
Unknown
Handle 0x0006, DMI type 6, 12 bytes
Memory Module Information
Socket Designation: DIMM 1
Bank Connections: 0 1
Current Speed: Unknown
Type: Other DIMM SDRAM
Installed Size: 256 MB (Double-bank Connection)
Enabled Size: 256 MB (Double-bank Connection)
Error Status: OK
Be careful though, some BIOS implementations are faulty and/or outright lie in this data.