| 1 | Kernel driver `eeprom.o' |
|---|
| 2 | ======================== |
|---|
| 3 | |
|---|
| 4 | Status: Complete and well-tested |
|---|
| 5 | |
|---|
| 6 | Supported chips: |
|---|
| 7 | * Any EEPROM chip in the designated address range |
|---|
| 8 | Prefix `eeprom' |
|---|
| 9 | Addresses scanned: I2C 0x50 - 0x57 (inclusive) |
|---|
| 10 | Datasheets: Publicly available from Atmel (www.atmel.com), |
|---|
| 11 | Fairchild (www.fairchildsemi.com), and |
|---|
| 12 | Microchip (www.microchip.com) |
|---|
| 13 | |
|---|
| 14 | Chip Size (bits) Address |
|---|
| 15 | 24C01 1K 0x50 (shadows at 0x51 - 0x57) |
|---|
| 16 | 24C01A 1K 0x50 - 0x57 (Typical device on DIMMs) |
|---|
| 17 | 24C02 2K 0x50 - 0x57 |
|---|
| 18 | 24C04 4K 0x50, 0x52, 0x54, 0x56 |
|---|
| 19 | (additional data at 0x51, 0x53, 0x55, 0x57) |
|---|
| 20 | 24C08 8K 0x50, 0x54 (additional data at 0x51, 0x52, |
|---|
| 21 | 0x53, 0x55, 0x56, 0x57) |
|---|
| 22 | 24C16 16K 0x50 (additional data at 0x51 - 0x57) |
|---|
| 23 | Sony 2K 0x57 |
|---|
| 24 | |
|---|
| 25 | |
|---|
| 26 | Author: Frodo Looijaard <frodol@dds.nl> and Philip Edelbrock |
|---|
| 27 | <phil@netroedge.com> |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | Module Parameters |
|---|
| 31 | ----------------- |
|---|
| 32 | |
|---|
| 33 | * checksum: int |
|---|
| 34 | Only accept eeproms whose checksum is correct |
|---|
| 35 | * force: short array (min = 1, max = 48) |
|---|
| 36 | List of adapter,address pairs to boldly assume to be present |
|---|
| 37 | * force_eeprom: short array (min = 1, max = 48) |
|---|
| 38 | List of adapter,address pairs which are unquestionably assumed to contain |
|---|
| 39 | a `eeprom' chip |
|---|
| 40 | * ignore: short array (min = 1, max = 48) |
|---|
| 41 | List of adapter,address pairs not to scan |
|---|
| 42 | * ignore_range: short array (min = 1, max = 48) |
|---|
| 43 | List of adapter,start-addr,end-addr triples not to scan |
|---|
| 44 | * probe: short array (min = 1, max = 48) |
|---|
| 45 | List of adapter,address pairs to scan additionally |
|---|
| 46 | * probe_range: short array (min = 1, max = 48) |
|---|
| 47 | List of adapter,start-addr,end-addr triples to scan additionally |
|---|
| 48 | |
|---|
| 49 | |
|---|
| 50 | Description |
|---|
| 51 | ----------- |
|---|
| 52 | |
|---|
| 53 | This is a simple EEPROM module meant to enable reading the first 256 bytes |
|---|
| 54 | of an EEPROM (on a SDRAM DIMM for example). However, it will access serial |
|---|
| 55 | EEPROMs on any I2C adapter. This module will probably need to be |
|---|
| 56 | expanded. A /dev file interface would probably be more effective. |
|---|
| 57 | This module was a programming exercise to get used to the new project |
|---|
| 58 | organization laid out by Frodo, but it should be at least completely |
|---|
| 59 | effective for decoding the contents of EEPROMs on DIMMs. |
|---|
| 60 | |
|---|
| 61 | DIMMS will typically contain a 24C01A or 24C02. The other devices |
|---|
| 62 | will not be found on a DIMM because they respond to more than one |
|---|
| 63 | address. |
|---|
| 64 | |
|---|
| 65 | DDC Monitors may contain any device. Often a 24C01, which responds |
|---|
| 66 | to all 8 addresses, is found. See the 'ddcmon' driver which has |
|---|
| 67 | specialized /proc entries for DDC monitors. If the eeprom driver is |
|---|
| 68 | loaded before the ddcmon driver and there is no 'ignore' line in the |
|---|
| 69 | /etc/sensors.conf file, the eeprom driver will latch onto the DDC monitor |
|---|
| 70 | eeprom. |
|---|
| 71 | |
|---|
| 72 | Recent Sony Vaio laptops have an EEPROM at 0x57. We couldn't get the |
|---|
| 73 | specification, so it is guess work and far from being complete. |
|---|
| 74 | |
|---|
| 75 | |
|---|
| 76 | Lacking functionality: |
|---|
| 77 | |
|---|
| 78 | * Full support for larger devices (24C04, 24C08, 24C16). These are |
|---|
| 79 | not typically found on a PC. These devices will appear as separate |
|---|
| 80 | devices at multiple addresses. |
|---|
| 81 | |
|---|
| 82 | * Support for really large devices (24C32, 24C64, 24C128, 24C256, 24C512). |
|---|
| 83 | These devices require two-byte address fields and are not supported. |
|---|
| 84 | |
|---|
| 85 | * Enable Writing. Again, no technical reason why not, but making it easy |
|---|
| 86 | to change the contents of the EEPROMs (on DIMMs anyway) also makes it easy |
|---|
| 87 | to disable the DIMMs until the values are restored somehow. |
|---|
| 88 | |
|---|
| 89 | |
|---|
| 90 | Use: |
|---|
| 91 | |
|---|
| 92 | After inserting the module (and any other required smbus/i2c modules), you |
|---|
| 93 | should have some EEPROM directories in /proc/sys/dev/sensors/ of names such |
|---|
| 94 | as "eeprom-i2c-0-50". Inside each of these is a series of files which |
|---|
| 95 | represent 16 bytes blocks from the EEPROM. The data is in decimal (base |
|---|
| 96 | 10) delimited by spaces. |
|---|
| 97 | |
|---|
| 98 | Note: |
|---|
| 99 | |
|---|
| 100 | EEPROMs reported are not nessesarily all from DIMMs. Xeon processors, for |
|---|
| 101 | example, have serial EEPROMs in them connected to the SMBus which will be |
|---|
| 102 | found by the module. Take care to ignore the output of decode-dimms.pl for |
|---|
| 103 | these EEPROMs. There is decode-xeon.pl for them. Same applies to Vaio |
|---|
| 104 | EEPROMs, which have decode-vaio.pl. |
|---|
| 105 | |
|---|
| 106 | The driver caches the data from the monitor and only rereads it |
|---|
| 107 | from the eeprom if the cache is more than 5 minutes old. |
|---|
| 108 | |
|---|
| 109 | |
|---|
| 110 | Decode-dimms.pl |
|---|
| 111 | --------------- |
|---|
| 112 | |
|---|
| 113 | This Perl script attempts to make sense of the first 128 bytes of a SDRAM |
|---|
| 114 | PC-100 DIMM. Using the 'Serial Presence Detect (SPD)' Spec (Rev1.2a)** from |
|---|
| 115 | Intel. When finished, it will decode and report all the values defined in |
|---|
| 116 | the spec. Much of the information is technical timing and interfacing info |
|---|
| 117 | (probably not all used by the BIOS or clocking IC). |
|---|
| 118 | |
|---|
| 119 | Note: During testing, we noticed that many DIMMs have trucated SPD records. |
|---|
| 120 | I'm not sure if these conform to an old spec, or if the manufacturers are |
|---|
| 121 | simply just taking shortcuts. But, many DIMMs have all zeros stored past |
|---|
| 122 | byte 21. I asked an Intel SDRAM tester, Sat Kolli (skolli@smartm.com), |
|---|
| 123 | about this and this is what he had to say: |
|---|
| 124 | |
|---|
| 125 | "[...] Now in terms of SPD contents, you are right that people do all kinds |
|---|
| 126 | of things. The way to insure that any module works is to look for the most |
|---|
| 127 | basic information, such as module bank density, number of banks, and device |
|---|
| 128 | addresses. That will give you the module size and what devices are used. It |
|---|
| 129 | is very difficult to verify if the module is PC-100, because of |
|---|
| 130 | inconsistencies between spd data from different manufacturers. You could |
|---|
| 131 | read the timing information or the special Intel bytes (126 & 127) but I do |
|---|
| 132 | not know how many program that information. These inconsistencies may be |
|---|
| 133 | minimized if you or your customers stay with some of the better known |
|---|
| 134 | manufacturers." (Thanks goes to Sat Kolli for his comments and help.) |
|---|
| 135 | |
|---|
| 136 | Use: |
|---|
| 137 | |
|---|
| 138 | After inserting the necessary modules, run the script! |
|---|
| 139 | |
|---|
| 140 | Notes: |
|---|
| 141 | |
|---|
| 142 | The script assumes that Perl can be found at /usr/bin/perl. If different, |
|---|
| 143 | you will need to adjust the first line of the file accordingly, or else |
|---|
| 144 | you will get a strange "decode-dimms.pl: no such file or directory" error. |
|---|
| 145 | |
|---|
| 146 | Also note that the script assumes that _all_ the eeproms belong to DIMMs, |
|---|
| 147 | which may not be the case. |
|---|
| 148 | |
|---|
| 149 | |
|---|
| 150 | Decode-vaio.pl |
|---|
| 151 | -------------- |
|---|
| 152 | |
|---|
| 153 | This Perl script looks for a Sony Vaio EEPROM at 0x57. If your system is not |
|---|
| 154 | a Sony Vaio laptop, you just don't care. If your system is an old Vaio, you |
|---|
| 155 | probably don't have an EEPROM on it and this script will be useless to you |
|---|
| 156 | as well. |
|---|
| 157 | |
|---|
| 158 | Use: |
|---|
| 159 | |
|---|
| 160 | After inserting the necessary modules, run the script! |
|---|
| 161 | |
|---|
| 162 | Notes: |
|---|
| 163 | |
|---|
| 164 | The script assumes that Perl can be found at /usr/bin/perl. If different, |
|---|
| 165 | you will need to adjust the first line of the file accordingly, or else |
|---|
| 166 | you will get a strange "decode-vaio.pl: no such file or directory" error. |
|---|