1,18 → 1,15 |
; Integrated Technology Express |
; Chip Temp Volt Fan |
; it8705 3 8 3 |
; it8712 3 8 3 |
; Chip Temp Volt Fan ISA SMBus |
; it8705 3 8 3 + + |
; it8712 3 8 3 + + |
|
; SiS |
; Chip Temp Volt Fan |
; sis950 3 8 3 |
; Chip Temp Volt Fan ISA SMBus |
; sis950 3 8 3 + + |
|
IT87_REGCHIP equ 0x58 |
IT87_CHIPID equ 0x90 |
IT87_FANDIV equ 0x0B |
uglobal |
it_chip_id db 0 |
endg |
it8705 db 15, 'IT8705F/SiS 950' |
it8712 db 7, 'IT8712F' |
it8716 db 7, 'IT8716F' |
29,37 → 26,47 |
it87_init: |
; Ïðîâåðêà íàëè÷èÿ è èíèöèàëèçàöèÿ |
; OUT - CF = 1 - error |
cmp byte[acc_type], 2 ; Only ISA and SMBus |
jae it87_no |
;--- Ïðîâåðÿåì IT87* -------- |
mov dx, 0x295 |
mov al, IT87_REGCHIP |
out dx, al |
inc edx |
in al, dx |
call [IO_Read] |
cmp al, IT87_CHIPID |
jne it87_no ; ýòî íå it87 !!! |
; -~- not tested ~-~- |
dec edx ; --- óçíà¸ì èäåíòèôèêàòîð ÷èïà -- |
mov al, 0x21 |
out dx, al |
inc edx |
in al, dx |
mov byte[it_chip_id], al |
mov al, 0x21 ; --- óçíà¸ì èäåíòèôèêàòîð ÷èïà -- |
call [IO_Read] |
mov edx, it8705 |
cmp al, 0x05 |
je @f |
mov edx, it8712 |
cmp al, 0x12 |
je @f |
mov edx, it8716 |
cmp al, 0x16 |
je @f |
mov edx, ite_unk |
@@: mov [hwm_chip_name], edx |
; -~-~-~-~-~-~-~-~-~- |
clc |
ret |
it87_no:stc |
ret |
|
;----------------------------------- |
it87_getparam: |
call it87_get_temp |
call it87_get_fan_speed |
mov edi, ite_coeff |
call wb_get_volt |
ret |
;----------------------------------- |
it87_get_temp: |
mov dx, 0x296 |
xor ecx, ecx |
mov esi, temps |
@@: dec edx |
mov eax, ecx |
mov esi, hwm_temps |
@@: mov eax, ecx |
add al, 0x29 |
out dx, al |
inc edx |
in al, dx |
call [IO_Read] |
mov [esi + ecx * 2], al |
inc ecx |
cmp ecx, 3 |
69,11 → 76,9 |
it87_fan_div db 1, 1, 1 |
it87_get_fan_speed: |
; ÷èòàåì äåëèòåëè |
mov dx, 0x295 |
mov al, IT87_FANDIV |
out dx, al |
inc dx |
in al, dx |
call [IO_Read] |
|
mov ah, al |
and al, 0x07 |
mov [it87_fan_div], al |
82,12 → 87,10 |
mov [it87_fan_div + 1], ah |
|
xor ecx, ecx |
@@: mov dx, 0x295 |
mov al, 0x0D |
@@: mov al, 0x0D |
add al, cl |
out dx, al |
inc edx |
in al, dx |
call [IO_Read] |
|
movzx ebx, al |
push ecx |
mov cl, [it87_fan_div + ecx] |
96,7 → 99,7 |
mov eax, 1350000 |
xor edx, edx |
div ebx |
mov [rpms + 4 * ecx], eax |
mov [hwm_rpms + 4 * ecx], eax |
inc ecx |
cmp ecx, 3 |
jb @b |
103,15 → 106,3 |
|
ret |
;-------------------------------------------------------------------------- |
it87_get_name: |
mov edx, it8705 |
cmp byte[it_chip_id], 0x05 |
je @f |
mov edx, it8712 |
cmp byte[it_chip_id], 0x12 |
je @f |
mov edx, it8716 |
cmp byte[it_chip_id], 0x16 |
je @f |
mov edx, ite_unk |
@@: ret |