?? abituguru-datasheet
字號:
uGuru datasheet===============First of all, what I know about uGuru is no fact based on any help, hints ordatasheet from Abit. The data I have got on uGuru have I assembled throughmy weak knowledge in "backwards engineering".And just for the record, you may have noticed uGuru isn't a chip developed byAbit, as they claim it to be. It's realy just an microprocessor (uC) created byWinbond (W83L950D). And no, reading the manual for this specific uC ormailing Windbond for help won't give any usefull data about uGuru, as it isthe program inside the uC that is responding to calls.Olle Sandberg <ollebull@gmail.com>, 2005-05-25Original version by Olle Sandberg who did the heavy lifting of the initialreverse engineering. This version has been almost fully rewritten for clarityand extended with write support and info on more databanks, the write supportis once again reverse engineered by Olle the additional databanks have beenreverse engineered by me. I would like to express my thanks to Olle, thisdocument and the Linux driver could not have been written without his efforts.Note: because of the lack of specs only the sensors part of the uGuru isdescribed here and not the CPU / RAM / etc voltage & frequency control.Hans de Goede <j.w.r.degoede@hhs.nl>, 28-01-2006Detection=========As far as known the uGuru is always placed at and using the (ISA) I/O-ports0xE0 and 0xE4, so we don't have to scan any port-range, just check what the twoports are holding for detection. We will refer to 0xE0 as CMD (command-port)and 0xE4 as DATA because Abit refers to them with these names.If DATA holds 0x00 or 0x08 and CMD holds 0x00 or 0xAC an uGuru could bepresent. We have to check for two different values at data-port, becauseafter a reboot uGuru will hold 0x00 here, but if the driver is removed andlater on attached again data-port will hold 0x08, more about this later.After wider testing of the Linux kernel driver some variants of the uGuru haveturned up which will hold 0x00 instead of 0xAC at the CMD port, thus we alsohave to test CMD for two different values. On these uGuru's DATA will initallyhold 0x09 and will only hold 0x08 after reading CMD first, so CMD must be readfirst!To be really sure an uGuru is present a test read of one or more registersets should be done.Reading / Writing=================Addressing----------The uGuru has a number of different addressing levels. The first addressinglevel we will call banks. A bank holds data for one or more sensors. The datain a bank for a sensor is one or more bytes large.The number of bytes is fixed for a given bank, you should always read or writethat many bytes, reading / writing more will fail, the results when writingless then the number of bytes for a given bank are undetermined.See below for all known bank addresses, numbers of sensors in that bank,number of bytes data per sensor and contents/meaning of those bytes.Although both this document and the kernel driver have kept the sensorterminoligy for the addressing within a bank this is not 100% correct, inbank 0x24 for example the addressing within the bank selects a PWM output nota sensor.Notice that some banks have both a read and a write address this is how theuGuru determines if a read from or a write to the bank is taking place, thuswhen reading you should always use the read address and when writing thewrite address. The write address is always one (1) more then the read address.uGuru ready-----------Before you can read from or write to the uGuru you must first put the uGuruin "ready" mode.To put the uGuru in ready mode first write 0x00 to DATA and then wait for DATAto hold 0x09, DATA should read 0x09 within 250 read cycles.Next CMD _must_ be read and should hold 0xAC, usually CMD will hold 0xAC thefirst read but sometimes it takes a while before CMD holds 0xAC and thus ithas to be read a number of times (max 50).After reading CMD, DATA should hold 0x08 which means that the uGuru is readyfor input. As above DATA will usually hold 0x08 the first read but not always.This step can be skipped, but it is undetermined what happens if the uGuru hasnot yet reported 0x08 at DATA and you proceed with writing a bank address.Sending bank and sensor addresses to the uGuru----------------------------------------------First the uGuru must be in "ready" mode as described above, DATA should hold0x08 indicating that the uGuru wants input, in this case the bank address.Next write the bank address to DATA. After the bank address has been writtenwait for to DATA to hold 0x08 again indicating that it wants / is ready formore input (max 250 reads).Once DATA holds 0x08 again write the sensor address to CMD.Reading-------First send the bank and sensor addresses as described above.Then for each byte of data you want to read wait for DATA to hold 0x01which indicates that the uGuru is ready to be read (max 250 reads) and onceDATA holds 0x01 read the byte from CMD.Once all bytes have been read data will hold 0x09, but there is no reason totest for this. Notice that the number of bytes is bank address dependent seeabove and below.After completing a successfull read it is advised to put the uGuru back inready mode, so that it is ready for the next read / write cycle. This wayif your program / driver is unloaded and later loaded again the detectionalgorithm described above will still work.Writing-------First send the bank and sensor addresses as described above.Then for each byte of data you want to write wait for DATA to hold 0x00which indicates that the uGuru is ready to be written (max 250 reads) andonce DATA holds 0x00 write the byte to CMD.Once all bytes have been written wait for DATA to hold 0x01 (max 250 reads)don't ask why this is the way it is.Once DATA holds 0x01 read CMD it should hold 0xAC now.After completing a successfull write it is advised to put the uGuru back inready mode, so that it is ready for the next read / write cycle. This wayif your program / driver is unloaded and later loaded again the detectionalgorithm described above will still work.Gotchas-------After wider testing of the Linux kernel driver some variants of the uGuru haveturned up which do not hold 0x08 at DATA within 250 reads after writing thebank address. With these versions this happens quite frequent, using largertimeouts doesn't help, they just go offline for a second or 2, doing someinternal callibration or whatever. Your code should be prepared to handlethis and in case of no response in this specific case just goto sleep for awhile and then retry.Address Map===========Bank 0x20 Alarms (R)--------------------This bank contains 0 sensors, iow the sensor address is ignored (but must bewritten) just use 0. Bank 0x20 contains 3 bytes:Byte 0:This byte holds the alarm flags for sensor 0-7 of Sensor Bank1, with bit 0corresponding to sensor 0, 1 to 1, etc.Byte 1:This byte holds the alarm flags for sensor 8-15 of Sensor Bank1, with bit 0corresponding to sensor 8, 1 to 9, etc.Byte 2:This byte holds the alarm flags for sensor 0-5 of Sensor Bank2, with bit 0corresponding to sensor 0, 1 to 1, etc.Bank 0x21 Sensor Bank1 Values / Readings (R)--------------------------------------------This bank contains 16 sensors, for each sensor it contains 1 byte.So far the following sensors are known to be available on all motherboards:Sensor 0 CPU tempSensor 1 SYS tempSensor 3 CPU core voltSensor 4 DDR voltSensor 10 DDR Vtt voltSensor 15 PWM tempByte 0:This byte holds the reading from the sensor. Sensors in Bank1 can be bothvolt and temp sensors, this is motherboard specific. The uGuru however doesseem to know (be programmed with) what kindoff sensor is attached see SensorBank1 Settings description.Volt sensors use a linear scale, a reading 0 corresponds with 0 volt and areading of 255 with 3494 mV. The sensors for higher voltages however areconnected through a division circuit. The currently known division circuitsin use result in ranges of: 0-4361mV, 0-6248mV or 0-14510mV. 3.3 volt sourcesuse the 0-4361mV range, 5 volt the 0-6248mV and 12 volt the 0-14510mV .Temp sensors also use a linear scale, a reading of 0 corresponds with 0 degreeCelsius and a reading of 255 with a reading of 255 degrees Celsius.Bank 0x22 Sensor Bank1 Settings (R)Bank 0x23 Sensor Bank1 Settings (W)-----------------------------------This bank contains 16 sensors, for each sensor it contains 3 bytes. Eachset of 3 bytes contains the settings for the sensor with the same sensoraddress in Bank 0x21 .Byte 0:Alarm behaviour for the selected sensor. A 1 enables the described behaviour.Bit 0: Give an alarm if measured temp is over the warning threshold (RW) *Bit 1: Give an alarm if measured volt is over the max threshold (RW) **Bit 2: Give an alarm if measured volt is under the min threshold (RW) **Bit 3: Beep if alarm (RW)Bit 4: 1 if alarm cause measured temp is over the warning threshold (R)Bit 5: 1 if alarm cause measured volt is over the max threshold (R)Bit 6: 1 if alarm cause measured volt is under the min threshold (R)Bit 7: Volt sensor: Shutdown if alarm persist for more then 4 seconds (RW) Temp sensor: Shutdown if temp is over the shutdown threshold (RW)* This bit is only honored/used by the uGuru if a temp sensor is connected** This bit is only honored/used by the uGuru if a volt sensor is connectedNote with some trickery this can be used to find out what kinda sensor isdetected see the Linux kernel driver for an example with many comments onhow todo this.Byte 1:Temp sensor: warning threshold (scale as bank 0x21)Volt sensor: min threshold (scale as bank 0x21)Byte 2:Temp sensor: shutdown threshold (scale as bank 0x21)Volt sensor: max threshold (scale as bank 0x21)Bank 0x24 PWM outputs for FAN's (R)Bank 0x25 PWM outputs for FAN's (W)-----------------------------------This bank contains 3 "sensors", for each sensor it contains 5 bytes.Sensor 0 usually controls the CPU fanSensor 1 usually controls the NB (or chipset for single chip) fanSensor 2 usually controls the System fanByte 0:Flag 0x80 to enable control, Fan runs at 100% when disabled.low nibble (temp)sensor address at bank 0x21 used for control.Byte 1:0-255 = 0-12v (linear), specify voltage at which fan will rotate when underlow threshold temp (specified in byte 3)Byte 2:0-255 = 0-12v (linear), specify voltage at which fan will rotate when abovehigh threshold temp (specified in byte 4)Byte 3:Low threshold temp (scale as bank 0x21)byte 4:High threshold temp (scale as bank 0x21)Bank 0x26 Sensors Bank2 Values / Readings (R)---------------------------------------------This bank contains 6 sensors (AFAIK), for each sensor it contains 1 byte.So far the following sensors are known to be available on all motherboards:Sensor 0: CPU fan speedSensor 1: NB (or chipset for single chip) fan speedSensor 2: SYS fan speedByte 0:This byte holds the reading from the sensor. 0-255 = 0-15300 (linear)Bank 0x27 Sensors Bank2 Settings (R)Bank 0x28 Sensors Bank2 Settings (W)------------------------------------This bank contains 6 sensors (AFAIK), for each sensor it contains 2 bytes.Byte 0:Alarm behaviour for the selected sensor. A 1 enables the described behaviour.Bit 0: Give an alarm if measured rpm is under the min threshold (RW)Bit 3: Beep if alarm (RW)Bit 7: Shutdown if alarm persist for more then 4 seconds (RW)Byte 1:min threshold (scale as bank 0x26)Warning for the adventerous===========================A word of caution to those who want to experiment and see if they can figurethe voltage / clock programming out, I tried reading and only reading banks0-0x30 with the reading code used for the sensor banks (0x20-0x28) and thisresulted in a _permanent_ reprogramming of the voltages, luckily I had thesensors part configured so that it would shutdown my system on any out of specvoltages which proprably safed my computer (after a reboot I managed toimmediatly enter the bios and reload the defaults). This probably means thatthe read/write cycle for the non sensor part is different from the sensor part.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -