Subversion Repositories Kolibri OS

Rev

Rev 223 | Rev 250 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 223 Rev 243
Line 25... Line 25...
25
;-----------------------------------
25
;-----------------------------------
26
it87_init:
26
it87_init:
27
; Ïðîâåðêà íàëè÷èÿ è èíèöèàëèçàöèÿ
27
; Ïðîâåðêà íàëè÷èÿ è èíèöèàëèçàöèÿ
28
; OUT - CF = 1 - error
28
; OUT - CF = 1 - error
29
	cmp	byte[acc_type], 2	; Only ISA and SMBus
29
	cmp	byte[acc_type], 2	; Only ISA and SMBus
30
	jae	it87_no
30
	jae	.no_io
-
 
31
 
-
 
32
	mov	ecx, 0x2e
-
 
33
	mov	edx, 0x2f
-
 
34
	call	ReservePorts
-
 
35
	test	eax, eax
-
 
36
	jnz	.no_io
-
 
37
 
31
	;--- Ïðîâåðÿåì IT87* --------
38
	mov	eax, 0x55550187		; ïåðåõîä â MB PnP Mode
-
 
39
	out	0x2e, al
-
 
40
	shr	eax, 8
-
 
41
	out	0x2e, al
-
 
42
	shr	eax, 8
-
 
43
	out	0x2e, al
32
	mov	al, IT87_REGCHIP
44
	shr	eax, 8
33
	call	[IO_Read]
45
	out	0x2e, al
-
 
46
 
34
	cmp	al, IT87_CHIPID
47
	mov	al, 0x20
-
 
48
	out	0x2e, al
35
	jne	it87_no		; ýòî íå it87 !!!
49
	in	al, 0x2f		; al = 0x87
-
 
50
	push	eax
-
 
51
 
-
 
52
	mov	al, 0x21
-
 
53
	out	0x2e, al
36
	; -~- not tested ~-~-
54
	in	al, 0x2f		; al = model
-
 
55
	push	eax
-
 
56
 
37
	mov	al, 0x21	; --- óçíà¸ì èäåíòèôèêàòîð ÷èïà --
57
	mov	al, 0x02		; âûõîä èç ðåæèìà
-
 
58
	out	0x2E, al
-
 
59
	out	0x2F, al
-
 
60
	
-
 
61
	mov	ecx, 0x2e
-
 
62
	mov	edx, 0x2f
38
	call	[IO_Read]
63
	call	FreePorts
-
 
64
	
-
 
65
	pop	eax
-
 
66
	pop	ebx
-
 
67
	cmp	bl, 0x87
-
 
68
	jne	.no_io
-
 
69
	
39
	mov	edx, it8705
70
	mov	edx, it8705
40
	cmp	al, 0x05
71
	cmp	al, 0x05
41
	je	@f
72
	je	@f
42
	mov	edx, it8712
73
	mov	edx, it8712
43
	cmp	al, 0x12
74
	cmp	al, 0x12
Line 45... Line 76...
45
	mov	edx, it8716
76
	mov	edx, it8716
46
	cmp	al, 0x16
77
	cmp	al, 0x16
47
	je	@f
78
	je	@f
48
	mov	edx, ite_unk
79
	mov	edx, ite_unk
49
@@:	mov	[hwm_chip_name], edx
80
@@:	mov	[hwm_chip_name], edx
50
	; -~-~-~-~-~-~-~-~-~-
-
 
51
	clc
81
	clc
52
	ret
82
	ret	
-
 
83
	
53
it87_no:stc
84
.no_io:	stc
54
	ret
85
	ret
Line -... Line 86...
-
 
86
 
-
 
87
	; cmp	byte[acc_type], 2	; Only ISA and SMBus
-
 
88
	; jae	it87_no
-
 
89
	;;--- Ïðîâåðÿåì IT87* --------
-
 
90
	; mov	al, IT87_REGCHIP
-
 
91
	; call	[IO_Read]
-
 
92
	; cmp	al, IT87_CHIPID
-
 
93
	; jne	it87_no		; ýòî íå it87 !!!
-
 
94
	;;-~- not tested ~-~-
-
 
95
	; mov	al, 0x21	; --- óçíà¸ì èäåíòèôèêàòîð ÷èïà --
-
 
96
	; call	[IO_Read]
-
 
97
	; mov	edx, it8705
-
 
98
	; cmp	al, 0x05
-
 
99
	; je	@f
-
 
100
	; mov	edx, it8712
-
 
101
	; cmp	al, 0x12
-
 
102
	; je	@f
-
 
103
	; mov	edx, it8716
-
 
104
	; cmp	al, 0x16
-
 
105
	; je	@f
-
 
106
	; mov	edx, ite_unk
-
 
107
; @@:	mov	[hwm_chip_name], edx
-
 
108
	;;-~-~-~-~-~-~-~-~-~-
-
 
109
	; clc
-
 
110
	; ret
-
 
111
; it87_no:stc
-
 
112
	; ret
55
	
113
	
56
;-----------------------------------
114
;-----------------------------------
57
it87_getparam:
115
it87_getparam:
58
	call	it87_get_temp
116
	call	it87_get_temp
59
	call	it87_get_fan_speed
117
	call	it87_get_fan_speed
Line 104... Line 162...
104
	cmp	ecx, 3
162
	cmp	ecx, 3
105
	jb	@b
163
	jb	@b
Line 106... Line 164...
106
 
164
 
107
	ret
165
	ret
-
 
166
;--------------------------------------------------------------------------
-
 
167
;
-
 
168
; Presets for IT8712
-
 
169
;
-
 
170
; Volt = A * read_val + B
-
 
171
;
-
 
172
;	A, B
-
 
173
; --- 0 ---
-
 
174
; dd 0.01565, 0.0
-
 
175
; dd 0.016, 0.0
-
 
176
; dd 0.016, 0.0
-
 
177
; dd 0.0, 0.0
-
 
178
; dd 0.0608, 0.0
-
 
179
; dd 0.0, 0.0
-
 
180
; dd 0.0, 0.0
-
 
181
; dd 0.08224, -22.104
-
 
182
; dd 0.016, 0.0
-
 
183
 
-
 
184
; --- 1 ---
-
 
185
; dd 0.01614, 0.0
-
 
186
; dd 0.01614, 0.0
-
 
187
; dd 0.01614, 0.0
-
 
188
; dd 0.01614, 0.0
-
 
189
; dd 0.062946, 0.0
-
 
190
; dd 0.0, 0.0
-
 
191
; dd 0.0, 0.0
-
 
192
; dd 0.016, 0.0
-
 
193
; dd 0.016, 0.0
-
 
194
 
-
 
195
; --- 2 ---
-
 
196
; dd 0.016, 0.0
-
 
197
; dd 0.016, 0.0
-
 
198
; dd 0.016, 0.0
-
 
199
; dd 0.062946, 0.0
-
 
200
; dd 0.016, 0.0
-
 
201
; dd 0.01614, 0.0
-
 
202
; dd 0.0, 0.0
-
 
203
; dd 0.016, 0.0
-
 
204
; dd 0.016, 0.0
-
 
205
 
-
 
206
; --- 3 ---
-
 
207
; dd 0.016, 0.0
-
 
208
; dd 0.016, 0.0
-
 
209
; dd 0.016, 0.0
-
 
210
; dd 0.027, 0.0
-
 
211
; dd 0.06564, 0.0
-
 
212
; dd 0.084, -17.408
-
 
213
; dd 0.0512, -9.0112
-
 
214
; dd 0.016, 0.0
-
 
215
; dd 0.016, 0.0
-
 
216
 
-
 
217
; --- 4 ---
-
 
218
; dd 0.01653, 0.0
-
 
219
; dd 0.016, 0.0
-
 
220
; dd 0.016, 0.0
-
 
221
; dd 0.02684, 0.0
-
 
222
; dd 0.06398, 0.0
-
 
223
; dd 0.0, 0.0
-
 
224
; dd 0.0, 0.0
-
 
225
; dd 0.016, 0.0
-
 
226
; dd 0.016, 0.0
-
 
227
 
-
 
228
; --- 5 ---
-
 
229
; dd 0.016, 0.0
-
 
230
; dd 0.016, 0.0
-
 
231
; dd 0.016, 0.0
-
 
232
; dd 0.027, 0.0
-
 
233
; dd 0.06369, 0.0
-
 
234
; dd 0.082285714288, -16.9691428598999
-
 
235
; dd 0.016, 0.0
-
 
236
; dd 0.016, 0.0
-
 
237
; dd 0.016, 0.0
-
 
238
 
-
 
239
; --- 6 ---
-
 
240
; dd 0.01565, 0.0
-
 
241
; dd 0.06564, 0.0
-
 
242
; dd 0.016, 0.0
-
 
243
; dd 0.016, 0.0
-
 
244
; dd 0.02688, 0.0
-
 
245
; dd 0.016, 0.0
-
 
246
; dd 0.016, 0.0
-
 
247
; dd 0.016, 0.0
-
 
248
; dd 0.016, 0.0
-
 
249
 
-
 
250
; --- 7 ---
-
 
251
; dd 0.016, 0.0
-
 
252
; dd 0.016, 0.0
-
 
253
; dd 0.016, 0.0
-
 
254
; dd 0.027, 0.0
-
 
255
; dd 0.06369, 0.0
-
 
256
; dd 0.082285714288, -16.9691428598999
-
 
257
; dd 0.016, 0.0
-
 
258
; dd 0.016, 0.0
-
 
259
; dd 0.016, 0.0
-
 
260
 
-
 
261
; --- 8 ---
-
 
262
; dd 0.01653, 0.0
-
 
263
; dd 0.016, 0.0
-
 
264
; dd 0.016, 0.0
-
 
265
; dd 0.0265, 0.0
-
 
266
; dd 0.06398, 0.0
-
 
267
; dd 0.0, 0.0
-
 
268
; dd 0.0, 0.0
-
 
269
; dd 0.016, 0.0
-
 
270
; dd 0.016, 0.0
-
 
271
 
-
 
272
; --- 9 ---
-
 
273
; dd 0.016, 0.0
-
 
274
; dd 0.01565, 0.0
-
 
275
; dd 0.016, 0.0
-
 
276
; dd 0.0265, 0.0
-
 
277
; dd 0.06398, 0.0
-
 
278
; dd 0.09152, -20.592
-
 
279
; dd 0.03728, -8.388
-
 
280
; dd 0.016, 0.0
-
 
281
; dd 0.016, 0.0
-
 
282
 
-
 
283
; --- 10 ---
-
 
284
; dd 0.016, 0.0
-
 
285
; dd 0.016, 0.0
-
 
286
; dd 0.016, 0.0
-
 
287
; dd 0.0265, 0.0
-
 
288
; dd 0.06398, 0.0
-
 
289
; dd 0.016, 0.0
-
 
290
; dd 0.0512, -9.0112
-
 
291
; dd 0.0, 0.0
-
 
292
; dd 0.0, 0.0
-
 
293
 
-
 
294
; --- 11 ---
-
 
295
; dd 0.016, 0.0
-
 
296
; dd 0.0, 0.0
-
 
297
; dd 0.016, 0.0
-
 
298
; dd 0.016, 0.0
-
 
299
; dd 0.06564, 0.0
-
 
300
; dd 0.0, 0.0
-
 
301
; dd 0.0, 0.0
-
 
302
; dd 0.0, 0.0