* GMon now support ABIT uGuru

* kernel.asm free port area 0xe0-0xe4 (special for uGuru)
+ CPUID by Wildwest
* APM GDT limit fix 3

git-svn-id: svn://kolibrios.org@223 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Iliya Mihailov (Ghost) 2006-11-28 15:54:36 +00:00
parent b648a77792
commit 8871a59fcf
33 changed files with 6273 additions and 448 deletions

View File

@ -59,17 +59,17 @@ os_data_l:
; --------------- APM --------------------- ; --------------- APM ---------------------
apm_code_32: apm_code_32:
dw 0x10 ; limit 64kb dw 0x0f ; limit 64kb
db 0, 0, 0 db 0, 0, 0
dw 11010000b *256 +10011010b dw 11010000b *256 +10011010b
db 0x00 db 0x00
apm_code_16: apm_code_16:
dw 0x10 dw 0x0f
db 0, 0, 0 db 0, 0, 0
dw 10010000b *256 +10011010b dw 10010000b *256 +10011010b
db 0x00 db 0x00
apm_data_16: apm_data_16:
dw 0x10 dw 0x0f
db 0, 0, 0 db 0, 0, 0
dw 10010000b *256 +10010010b dw 10010000b *256 +10010010b
db 0x00 db 0x00

View File

@ -912,12 +912,21 @@ reserve_irqs_ports:
; RESERVE PORTS ; RESERVE PORTS
mov edi,1 ; 0x00-0xff mov edi,1 ; 0x00-0xdf
mov [0x2d0000],edi mov [0x2d0000],edi
shl edi,4 shl edi,4
mov [0x2d0000+edi+0],dword 1 mov [0x2d0000+edi+0],dword 1
mov [0x2d0000+edi+4],dword 0x0 mov [0x2d0000+edi+4],dword 0x0
mov [0x2d0000+edi+8],dword 0xdf
inc dword [0x2d0000] ; 0xe5-0xff
mov edi,[0x2d0000]
shl edi,4
mov [0x2d0000+edi+0],dword 1
mov [0x2d0000+edi+4],dword 0xe5
mov [0x2d0000+edi+8],dword 0xff mov [0x2d0000+edi+8],dword 0xff
; cmp [0xf604],byte 2 ; com1 mouse -> 0x3f0-0x3ff ; cmp [0xf604],byte 2 ; com1 mouse -> 0x3f0-0x3ff
; jne ripl1 ; jne ripl1
; inc dword [0x2d0000] ; inc dword [0x2d0000]

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,185 @@
;******************************************************************************
; project name: CPUID
; target platform: KolibriOS, x86 (IA-32), x86-64 achitectures
; compability: probably some functions would work in MenuetOS 32 and MenuetOS 64, may be even in Miraculix;
; CPUID (versions before 2.00) works in MS Windows by means of emulators
; compiler: flat assembler 1.67.5
; version: 2.05
; last update: 1st November 2006
; maintained by: Sergey Kuzmin aka Wildwest
; e-mail: kuzmin_serg@list.ru
; site: http://coolthemes.narod.ru/files.html
;******************************************************************************
; Summary:
; supported vendors - Intel, AMD, VIA, Cyrix, IDT (Centaur),Transmeta
; displayed features - CPU frequency;
; Internal Name;
; Multiplier and System Clock frequency;
; Standard and Extended Features;
; CPU signature (family, model,stepping);
; Codename;
; L1, L2 and L3 Caches;
; Technology;
; CPU Vendor;
; Type and Brand ID;
; Logo for Vendors;
; calculation of PR-rating for AMD AthlonXP;
; Amout of RAM (available and total)
; Highest input values for standard and extended calls
; performed tests - Performance test (RSA encoding)
;******************************************************************************
;HISTORY:
;2.1: CPUID 01/11/2006 (not finished)
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features:
; (+) detection of dual-core AMD Opteron, but I came to conclusion that detection of AMD Fxxh CPU's should be changed (don't know how yet)
; (+) new caches for Intel
; (+) fixed Celeron detection based on L2 cache size for newest Intel CPU (there are Celeron models with 512 Kb);
; (+) CPUID now display System Clock with accuracy 0.01 MHz;
; (+) new logo for Intel (they changed it some time ago);
;Known issues: Sempron marked as AthlonXP
; second window doesn't closed when you close main window
;-----------------------------------------------------------------------------
;2.0: CPUID 31/10/2006
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
; Eugeniy Grechnikov aka Diamond <diamondz@land.ru>
; Iliya Mikhailov aka Ghost <Ghost.nsk@gmail.com>
;Features:
; (+) detection of Brand ID of AMD CPU's (Opteron etc - not finished)
; (+) detection of Extended family and Model of AMD CPU's
; (+) interface+(redesign)
; (+) calculation of System Clock
; (++) added multiplier detection for AMD and Intel (thanks a lot to Ghost)
; (+) optimization of GIF decoder, code cleanup and bugfix by Diamond;
; (+) fixed bug with MMX+ detection for Cyrix CPU (in second window;
; it was properly recognized in main window);
; (+) we show appropiate message in second window if Extended Features
; ($8000_000x) aren't available;
; (+) we mark unknown CPU models as "Next generation CPU";
;Known issues: Sempron marked as AthlonXP
; second window doesn't closed when you close main window
;-----------------------------------------------------------------------------
;1.1: CPUID 17/03/2006
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features:
; (+) performance test now runs after click at "Press for more" button => we start app without test, i.e.
; immediately, but application can be unstable during multiple switching between windows(need testing)
; (++) added detection of total and available amount of RAM (would work only in KolibriOS)
; (++) added detection of extended family and model (not shown, but if you want...);
; (++) added detection of effective family and model;
; (+) more codenames: Intel Tejas, Presler, Yonah, Conroe;
; (+) more codenames: AMD Toledo;
; (+) interface+(redesign).
;Bugs: probably some non-critical graphical issues
;Known issues: Sempron is not supported (marked as AthlonXP)
;-----------------------------------------------------------------------------
;1.0: CPUID 26/09/2005
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Additions: Marat Zakiyanov aka Mario79 <mario79@bk.ru>
; Andrey Halyavin aka halyavin <halyavin@land.ru>
;Features:
; (+) fixed bug, when processor doesn't support extented features and program don't report 'no' in such case
; (+) fixed bug in CPU Type detection
; (+) fixed bug, when program crashes on AMD AthlonXP when after click on 'Press for more' button
; you click on 'Choose FSB' button;
; (+) added output of highest standard and extended calls
; (+) Extended Features(phase 1 - big part of AMD/Intel specific EF)
; (+) reworked P-rating calculation for AMD AthlonXP ->
; now one program for 266, 333, 400 MHz FSB
; (but unstable - see Bugs section)
; (+) support for Intel F5x, renamed C3(Esther) to C7(Esther)
; (+) more codenames
; (Intel: new Prescott's model; Dothan; VIA: Esther;
; AMD: Newcastle, Paris, Winchester, San Diego, Venice, Palermo)
; (+) performance test (RSA encoding, fixed-point arithmetics)
; by Andrey Halyavin
; (+) interface+(thanks to Mario79 for additional window
; and to me for nice button)
;Bugs: probably some non-critical graphical issues
;Known issues: Sempron is not supported (marked as AthlonXP)
;-----------------------------------------------------------------------------
;0.9: CPUID 24/01/2005
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Additions: Madis Kalme aka Madis731 <madis.kalme@mail.ee>
; Jeffrey Amelynck aka Profkid <the_adams_familie@hotmail.com>
;Features:
; (+) deleting leading whitespaces in Intel P4's internal name
; by Madis Kalme
; (+) all standard features
; (+) more codenames (Transmeta series)
; (+) caches for Cyrix
; (+) Brand ID for Intel
; (+) detect L3 cache for Intel
; (+) detect Xeon (will be improved later, at this moment see Brand)
; (+) interface+(redesign and grafical logos for vendors)
; (+) MMX+ test for Cyrix
; (+) Type for Intel
;Bugs: no !!!
;Known issues: Sempron is not supported (marked as AthlonXP)
; caches for IDT is not detected
;-----------------------------------------------------------------------------
;0.8: CPUID 10/12/2004
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features: (+) CPUID now display frequency in Mhz with accuracy 0.01 MHz
; (+) more codenames - Intel Itanium :-)
; (+) display Internal Name
; (+) caches for Intel Pentium
; (+) Technology
; (+) detect L1 Trace Instruction cache and some new caches for Intel
; (+) detect Celerons based on Pentium III/4 kernels
; (+) interface+(redesign) and Logo for Vendors
; (+) fix for HTT detection on Celeron(it wasn't bug, just Intel's marketing)
; (+) test for MMX+ and 3DNow!+
;Bugs: no !!!
;Known issues: Sempron not supported (marked as AthlonXP)
; Xeon is not fully supported (marked as Pentium except some models)
;-----------------------------------------------------------------------------
;0.7: CPUID 28/11/2004
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features: updated calculation of PR-rating for AMD AthlonXP,
; more codenames (AMD series: Applebred, Thorton),
; added L1 and L2 cache size detection,
; fix for 3DNow! detection on non-AMD CPU's
;Bugs: HTT detection on Celeron 4 (really Celeron 4 have HTT,
; but Intel disabled it in microcode)
;-----------------------------------------------------------------------------
;0.6: CPUID 28/10/2004
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features: added calculation of PR-rating for AMD AthlonXP(on request of
; RU-team), more codenames (VIA, Cyrix, IDT (Centaur) series),
; interface+ (redesign), added output of CPU frequency in MHz,
; fix for CPU clock detection (needs changes in kernel.asm),
; fixed bugs which were founded during public testing,
; decreased required memory 0x100000->0x340
;Bugs: problem with 3DNow! detection on non-AMD CPU's (VIA C3 and others)
;-----------------------------------------------------------------------------
;0.5: CPUID 16/10/2004
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features: added test for Hyper-Threading Technology support,
; more codenames (Intel and AMD series)
; fasm 1.50 compability, interface+ (window type 2->3 and redesign)
; fix for window redrawing bug
;Bugs: error in CPU clock detection (cause: error in sysfunc 18 subfunc 5)
;-----------------------------------------------------------------------------
;0.4: CPUID 27/09/2004
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features: added processor codename's detection engine and little database of
; codenames (P1 and K7)
;Bugs: window redrawing bug, error in CPU clock detection
;-----------------------------------------------------------------------------
;0.3: CPUID 26/09/2004
;Author: Sergey Kuzmin aka Wildwest <kuzmin_serg@list.ru>
;Features: display CPU frequency; CPU Vendor;
; CPU signature(family, model,stepping),
; test for MMX,SSE,SSE2,SSE3,3DNow!
;Bugs: window redrawing bug, error in CPU clock detection
;-----------------------------------------------------------------------------
;0.2: TIMES from old OFFICIAL distribution 11/10/2001
;Author: unknown hero (VT?)
;Features: display CPU frequency, CPU Vendor,
; test for MMX, Process Management
;-----------------------------------------------------------------------------
;0.1: CPUSPEED from OFFICIAL distribution 21/05/2001
;Author: unknown hero (VT?)
;Features: display CPU frequency
;*****************************************************************************

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,81 @@
WINDOWS (1251) CODEPAGE
ENGLISH
Hi! My name is Sergey Kuzmin aka Wildwest.
This is one of the mostly famous program for KolibriOS/MenuetOS.
I called it CPUID. CPUID talks with you CPU and show log.
Current version is 2.05 and you can use it on your own risk without any warranty.
E-mail me (kuzmin_serg@list.ru) if you have some problems or suggestions.
All righs on this program are mine, except parts of code written by other developers.
Further versions will be soon on my site: http://coolthemes.narod.ru/files.html
People from international KolibriOS/MenuetOS team help me and I wish to mention his effort here:
Ville Turjanmaa (Finland), which wrote MenuetOS and programs TIMES&CPUSPEED
Ivan Poddubny and /^S0rG^\ (Russia) for useful macroces
Madis Kalme (Estonia), which wrote fix for strange Intel's Internal names
Jeffrey Amelynck (Belgium), who send me logos and code for its displaying
(code was based on macros, written by Evgeniy Pavlyushin (Russia), which was
just a shell for GIF decoding routine made by Andrey Ivushkin (Ukraine))
Marat Zakiyanov (Russia) for its kind propose of help in creating additional window
Andrey Halyavin (Russia) for his patience during debugging performance test
Eugeniy Grechnikov (Russia) for great code clean-up and optimization
Iliya Mikhailov (Russia) for piece of code from his great GMON
Also I want to thank folks which help me by testing and suggestions -
Sonny, Smiddy and all the RU-Team.
Please, test it and e-mail me screenshot.
Bye...
RUSSIAN
Ïðèâåò! Ìåíÿ çîâóò Ñåðãåé Êóçüìèí aka Wildwest.
Ýòî îäíà èç ñàìûõ èçâåñòíûõ ïðîãðàìì äëÿ KolibriOS/MenuetOS.
Îíà íàçûâàåòñÿ CPUID è ïîêàçûâàåò ðåçóëüòàòû èäåíòèôèêàöèè ïðîöåññîðà.
Ýòî âåðñèÿ 2.05 è ÂÛ ìîæåòå å¸ èñïîëüçîâàòü íà ñâîé ñîáñòâåííûé ðèñê áåçî âñÿêèõ ãàðàíòèé.
Åñëè áóäóò êàêèå-òî ïðîáëåìû èëè ïðåäëîæåíèÿ, òî íàïèøèòå ìíå (kuzmin_serg@list.ru).
Âñå ïðàâà íà ïðîãðàììó ïðèíàäëåæàò ìíå, êðîìå ïðàâ íà ÷àñòè, íàïèñàííûõ îñòàëüíûìè ðàçðàáîò÷èêàìè.
Ñëåäóþùèå âåðñèè áóäóò âûêëàäûâàòüñÿ íà ñòðàíè÷êå: http://coolthemes.narod.ru/files.html
Ëþäè èç ìåæäóíàðîäíîé êîìàíäû MenuetOS ïîìîãàëè ìíå è ÿ õîòåë áû óïîìÿíóòü èõ çäåñü:
Ville Turjanmaa (Ôèíëÿíäèÿ), íàïèñàâøåãî MenuetOS, à òàêæå ïðîãðàììû TIMES è CPUSPEED
Èâàí Ïîääóáíîãî and /^S0rG^\ (Ðîññèÿ), íàïèñàâøèõ ïîëåçíûå ìàêðîñû
Madis Kalme (Ýñòîíèÿ), íàïèñàâøåãî îáðàáîò÷èê äëÿ ñòðàííûõ âíóòðåííèõ èìåí ïðîöåññîðîâ Èíòåë
Jeffrey Amelynck (Áåëüãèÿ), ïðèñëàâøåãî ìíå ëîãîòèïû è êîä äëÿ èõ ïîêàçà
(êîä îñíîâàí íà ìàêðîñå îò Åâãåíèÿ Ïàâëþøèíà (Ðîññèÿ), êîòîðûé áûë ïðîñòî îáåðòêîé
äëÿ àëãîðèòìà äåêîäèðîâàíèÿ GIF, ðåàëèçîâàííîãî Àíäðååì Èâóøêèíûì (Óêðàèíà))
Ìàðàòà Çàêèÿíîâà (Ðîññèÿ) çà åãî ëþáåçíîå ïðåäëîæåíèå ïîìî÷ü ñ ñîçäàíèåì äîïîëíèòåëüíîãî îêíà
Àíäðåÿ Õàëÿâèíà (Ðîññèÿ) çà åãî òåðïåíèå â ïðîöåññå îòëàäêè òåñòà ïðîèçîâèòåëüíîñòè
Åâãåíèÿ Ãðå÷íèêîâà (Ðîññèÿ) çà ÷èñòêó êîäà è îïòèìèçàöèþ
Èëüþ Ìèõàéëîâà (Ðîññèÿ) çà êóñîê êîäà èç åãî çàìå÷àòåëüíîé ïðîãðàììû GMON
Òàêæå ÿ õî÷ó ïîáëàãîäàðèòü ëþäåé, ïîìîãàâøèõ ìíå òåñòèðîâàíèåì è ïðåäëîæåíèÿìè -
Sonny, Smiddy è âñþ "ñîâåòñêóþ êîìàíäó" KolibriOS/MenuetOS .
Ïîæàëóéñòà, ïðîòåñòèðóéòå ïðîãðàììó è ïðèøëèòå ìíå ñêðèíøîò ïî e-mail.
Äî âñòðå÷ íà ôîðóìàõ( http://meos.sysbin.com, http://board.flatassembler.net/forum.php?f=12).

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,301 @@
COLOR_ORDER equ MENUETOS
gif_hash_offset = gif_hash_area
macro gif2img gifsrc,imgsrc
{
local hasharea, ReadGIF, nextblock,_null
local globalColor, img_count, cur_info, img_start
local codesize, compsize, bit_count, CC, EOI, Palette
local block_ofs, table_ptr, gifmacend
local no_gc, block_skip, no_comm, noextblock, uselocal
local setPal, filltable, reinit, cycle, zadd, noinc
local notintable, er, zend, nxt, continue, ex, Gif_skipmap
local Gif_get_sym, shift, nextbl, noblock, loop1, exx
local Gif_output, next, loop2
_null fix 0x1000 ; 0x1000
if ~gifsrc eq esi
mov esi,gifsrc
end if
if ~imgsrc eq edi
mov edi,imgsrc
end if
if defined gif_hash_offset
mov eax,gif_hash_offset
else
mov eax,hasharea
end if
call ReadGIF
jmp gifmacend
if defined gif_hash_offset
else
hasharea:
times 4096 dd 0 ;4096
end if
ReadGIF:
push esi edi
mov [table_ptr],eax
mov [cur_info],edi
xor eax,eax
mov [globalColor],eax
mov [img_count],eax
inc eax
cmp dword[esi],'GIF8'
jne er ; signature
mov ecx,[esi+0xa]
inc eax
add esi,0xd
mov edi,esi
bt ecx,7
jnc nextblock
mov [globalColor],esi
call Gif_skipmap
nextblock:
cmp byte[edi],0x21
jne noextblock
inc edi
cmp byte[edi],0xf9 ; Graphic Control Ext
jne no_gc
add edi,7
jmp nextblock
no_gc:
cmp byte[edi],0xfe ; Comment Ext
jne no_comm
inc edi
block_skip:
movzx eax,byte[edi]
lea edi,[edi+eax+1]
cmp byte[edi],0
jnz block_skip
inc edi
jmp nextblock
no_comm:
cmp byte[edi],0xff ; Application Ext
jne nextblock
add edi,13
jmp block_skip
noextblock:
cmp byte[edi],0x2c ; image beginning
jne er
inc [img_count]
inc edi
mov esi,[cur_info]
xchg esi,edi
; movsd
; movsd
mov bp,word[esi+4]
movzx ebx,bp
mov [edi],ebx
mov bp,word[esi+6]
movzx ebx,bp
mov [edi+4],ebx
add edi,8
add esi,8
push edi
movzx ecx,word[esi]
inc esi
bt ecx,7
jc uselocal
push [globalColor]
mov edi,esi
jmp setPal
uselocal:
call Gif_skipmap
push esi
setPal:
movzx ecx,byte[edi]
inc ecx
mov [codesize],ecx
dec ecx
pop [Palette]
lea esi,[edi+1]
mov edi,[table_ptr]
xor eax,eax
cld
lodsb ; eax - block_count
add eax,esi
mov [block_ofs],eax
mov [bit_count],8
mov eax,1
shl eax,cl
mov [CC],eax
inc eax
mov [EOI],eax
lea ecx,[eax-1]
mov eax, _null shl 16
filltable:
stosd
inc eax
loop filltable
pop edi
mov [img_start],edi
reinit:
mov edx,[EOI]
inc edx
push [codesize]
pop [compsize]
call Gif_get_sym
cmp eax,[CC]
je reinit
call Gif_output
cycle:
movzx ebx,ax
call Gif_get_sym
cmp eax,edx
jae notintable
cmp eax,[CC]
je reinit
cmp eax,[EOI]
je zend
call Gif_output
zadd:
push eax
mov eax,[table_ptr]
mov [eax+edx*4],ebx
pop eax
cmp edx,0xFFF
jae cycle
inc edx
bsr ebx,edx
cmp ebx,[compsize]
jne noinc
inc [compsize]
noinc:
jmp cycle
notintable:
push eax
mov eax,ebx
call Gif_output
push ebx
movzx eax,bx
call Gif_output
pop ebx eax
jmp zadd
er:
pop edi
jmp ex
zend:
; mov eax,[.cur_info] ; skip offset to next frame
; mov [eax],edi
mov [cur_info],edi
add esi,2
xchg esi,edi
nxt:
cmp byte[edi],0
jnz continue
inc edi
jmp nxt
continue:
; cmp byte[edi],0x3b ;read next frame
; jne nextblock
xor eax,eax
stosd
mov ecx,[img_count]
ex:
pop edi esi
ret
Gif_skipmap:
; in: ecx - image descriptor, esi - pointer to colormap
; out: edi - pointer to area after colormap
and ecx,111b
inc ecx ; color map size
mov ebx,1
shl ebx,cl
lea ebx,[ebx*2+ebx]
lea edi,[esi+ebx]
ret
Gif_get_sym:
mov ecx,[compsize]
push ecx
xor eax,eax
shift:
ror byte[esi],1
rcr eax,1
dec [bit_count]
jnz loop1
inc esi
cmp esi,[block_ofs]
jb noblock
push eax
xor eax,eax
lodsb
test eax,eax
jnz nextbl
mov eax,[EOI]
sub esi,2
add esp,8
jmp exx
nextbl:
add eax,esi
mov [block_ofs],eax
pop eax
noblock:
mov [bit_count],8
loop1:
loop shift
pop ecx
rol eax,cl
exx:
xor ecx,ecx
ret
Gif_output:
push esi eax edx
mov edx,[table_ptr]
next:
push word[edx+eax*4]
mov ax,word[edx+eax*4+2]
inc ecx
cmp ax,_null
jnz next
shl ebx,16
mov bx,[esp]
loop2:
pop ax
lea esi,[eax+eax*2]
add esi,[Palette]
if COLOR_ORDER eq MENUETOS
mov esi,[esi]
bswap esi
shr esi,8
mov [edi],esi
add edi,3
else
movsw
movsb
end if
loop loop2
pop edx eax esi
ret
globalColor dd 1
img_count dd 1
cur_info dd 1 ; image table pointer
img_start dd 1
codesize dd 1
compsize dd 1
bit_count dd 1
CC dd 1
EOI dd 1
Palette dd 1
block_ofs dd 1
table_ptr dd 1
gifmacend:
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,29 @@
amd:
file 'amd.gif' ;include gif file
rb 50 ;50 bytes temp back zone
cyrix:
file 'cyrix.gif' ;include gif file
rb 50 ;50 bytes temp back zone
idt:
file 'idt.gif' ;include gif file
rb 50 ;50 bytes temp back zone
intel:
file 'intel.gif' ;include gif file
rb 50 ;50 bytes temp back zone
transmeta:
file 'transmet.gif' ;include gif file
rb 50 ;50 bytes temp back zone
via:
file 'via.gif' ;include gif file
rb 50 ;50 bytes temp back zone
knopka:
file 'knopka.gif' ;include gif file
rb 50 ;50 bytes temp back zone

View File

@ -0,0 +1,607 @@
;testing speed of RSA coding (256 bit)
;for program CPUID (WildWest)
;author: halyavin
;structure of long number:
;rd 1 : length of number
;rd 39: digits of number
;length of zero number is equal to 1.
number_digits=39
number_size=4*(number_digits+1)
;calling convention:
;procedures can change eax,ecx,edx
init_rsatest:
;to do: add initialization which depends on processor.
ret
set_zero:
;eax - address of number
;[eax]:=0
;result: eax isn't changed
xor ecx,ecx
xor edx,edx
inc edx
mov dword [eax],edx
mov edx,39
add eax,4
.loop:
mov dword [eax],ecx
add eax,4
dec edx
jnz .loop
sub eax,160 ;size of number
ret
ladd:
;eax - first number
;edx - second number
;[eax]:=[eax]+[edx]
pushad
mov ecx,dword [eax]
mov esi,dword [edx]
mov ebp,eax
cmp ecx,esi
jg .l1
mov ecx,esi
.l1:
add eax,4
add edx,4
xor ebx,ebx
xor esi,esi
mov edi,ecx
.l2:
add ebx,dword [eax]
adc ebx,dword [edx]
adc esi,esi
mov dword [eax],ebx
mov ebx,esi
add eax,4
xor esi,esi
add edx,4
dec ecx
jnz .l2
test ebx,ebx
jz .lend
inc dword [eax]
inc edi
.lend:
mov eax,ebp
mov dword [eax],edi
popad
ret
lsub:
;eax - first number
;edx - second number
;[eax]=[eax]-[edx]
;[eax]>=[edx]
pushad
mov ecx,dword [eax]
mov edi,ecx
mov ebp,eax
add eax,4
add edx,4
xor ebx,ebx
xor esi,esi
.l1:
mov esi,dword [eax]
sub esi,ebx
sbb esi,dword [edx]
mov dword [eax],esi
sbb esi,esi
mov ebx,esi
neg ebx
add eax,4
add edx,4
dec ecx
jnz .l1
dec edi
jz .lend
sub eax,4
.l2:
mov ebx,dword [eax]
test ebx,ebx
jnz .lend
sub eax,4
dec edi
jnz .l2
.lend:
inc edi
mov eax,ebp
mov [eax],edi
popad
ret
lcmp:
;eax - address of number
;edx - address of number
;result: ecx=1 if eax>edx
; ecx=0 if eax=edx
; ecx=-1 if eax<edx
push ebx
mov ebx,dword [eax]
cmp ebx,dword [edx]
jg .l1
jl .l2
push esi
push eax
push edx
lea eax,[eax+4*ebx]
lea edx,[edx+4*ebx]
.l3:
mov esi,dword [eax]
cmp esi,dword [edx]
ja .l4
jb .l5
sub eax,4
sub edx,4
dec ebx
jnz .l3
xor ecx,ecx
.lend:
pop edx
pop eax
pop esi
pop ebx
ret
.l4:
mov ecx,1
jmp .lend
.l5:
mov ecx,-1
jmp .lend
.l1:
mov ecx,1
pop ebx
ret
.l2:
mov ecx,-1
pop ebx
ret
lshr:
;eax - number
;edx - shift
;[eax]=[eax] shr edx
cmp edx,32
jl .general
mov ecx,edx
shr ecx,5
and edx,31
push esi
mov esi,ecx
cmp ecx,dword [eax]
jng .norm
xor esi,esi
mov ecx,dword [eax]
.norm:
push edi
push ebp
mov ebp,eax
add eax,4
.loop1:
test esi,esi
jz .endloop1
mov edi,dword [eax+4*ecx]
mov dword [eax],edi
add eax,4
dec esi
jmp .loop1
.endloop1:
mov eax,ebp
mov esi,dword [eax]
lea eax,[eax+4*esi]
xor edi,edi
mov esi,ecx
.loop2:
mov dword [eax],edi
sub eax,4
dec ecx
jnz .loop2
mov eax,ebp
sub dword [eax],esi
jz .len0
.lend1:
pop ebp
pop edi
pop esi
jmp .general
.len0:
inc dword [eax]
jmp .lend1
.general:
test edx,edx
jz .lend
push ebx
push esi
push edi
push ebp
push eax
mov ebx,dword [eax]
lea eax,[eax+4*ebx]
mov ecx,edx
sub ecx,32
neg ecx
mov esi,1
shl esi,cl
dec esi
mov ecx,edx
xor ebp,ebp
.loop3:
mov edi,dword [eax]
ror edi,cl
mov edx,edi
and edx,esi
or edx,ebp
mov dword [eax],edx
mov edx,esi
not edx
and edi,edx
mov ebp,edi
sub eax,4
dec ebx
jnz .loop3
pop eax
mov ebx,dword [eax]
mov ecx,dword [eax+4*ebx]
dec ebx
jz .norm1
test ecx,ecx
jnz .norm1
dec dword [eax]
.norm1:
pop ebp
pop edi
pop esi
pop ebx
.lend:
ret
lshl:
;eax - number
;edx - shift
;[eax]:=[eax] shl edx
cmp edx,32
jl .general
cmp dword [eax],1
jnz .l1
cmp dword [eax+4],0
jnz .l1
ret
.l1:
push esi
push ebx
mov ecx,edx
shr ecx,5
and edx,31
mov ebx,dword [eax]
add dword [eax],ecx
lea eax,[eax+4*ebx]
.loop1:
mov esi,dword [eax]
mov dword [eax+4*ecx],esi
sub eax,4
dec ebx
jnz .loop1
xor esi,esi
lea eax,[eax+4*ecx]
.loop2:
mov dword [eax],esi
sub eax,4
dec ecx
jnz .loop2
pop ebx
pop esi
jmp .general
.general:
test edx,edx
jz .lend
pushad
mov ecx,edx
mov ebx,1
shl ebx,cl
dec ebx
mov edx,dword [eax]
xor esi,esi
lea eax,[eax+4*edx]
.loop3:
mov edi,dword [eax]
rol edi,cl
mov ebp,edi
and ebp,ebx
add esi,ebp
mov dword [eax+4],esi
mov ebp,ebx
not ebp
and edi,ebp
mov esi,edi
sub eax,4
dec edx
jnz .loop3
mov dword [eax+4],esi
mov edx,dword [eax]
cmp dword [eax+4*edx+4],0
jz .l2
inc dword [eax]
.l2:
popad
.lend:
ret
lwrite_bit:
;eax - address of number
;edx - number of bit
;set bit to 1. First bit has number 0.
mov ecx,edx
shr edx,5
inc edx
cmp dword [eax],edx
jg .norm
mov dword [eax],edx
.norm:
push ebx
mov ebx,1
shl ebx,cl
or dword [eax+4*edx],ebx
pop ebx
ret
lcopy:
;eax - address of first number
;edx - address of second number
;[eax]:=[edx]
push ebx
push esi
push eax
push edx
push dword [eax]
mov ebx,dword [edx]
mov ecx,ebx
add edx,4
add eax,4
.loop1:
mov esi,dword [edx]
mov dword [eax],esi
add eax,4
add edx,4
dec ecx
jnz .loop1
pop ecx
sub ecx,ebx
jng .l1
xor esi,esi
.loop2:
mov dword [eax],esi
add eax,4
dec ecx
jnz .loop2
.l1:
pop edx
pop eax
mov dword [eax],ebx
pop esi
pop ebx
ret
lmul:
;eax - first number
;edx - second number
;ecx - third number
;[eax]:=[ecx]*[edx]
push ecx
push edx
call set_zero
pop edx
pop ecx
pushad
sub esp,16 ; local variables
mov ebp,edx
mov ebx,dword [edx]
mov dword [esp],ebx
mov ebx,dword [ecx]
mov dword [esp+4],ebx
mov ebx,eax
add ebp,4
add ecx,4
add ebx,4
xor esi,esi
mov dword [esp+8],esi
.loop1:
xor esi,esi
mov dword [esp+12],esi
.loop2:
mov eax,dword [esp+12]
mov eax,dword [ecx+4*eax]
mov edi,dword [esp+8]
mov edi,dword [ebp+4*edi]
mul edi
add eax,esi
adc edx,0
mov edi,dword [esp+12]
add edi,dword [esp+8]
add eax,dword [ebx+4*edi]
adc edx,0
mov dword [ebx+4*edi],eax
mov esi,edx
inc dword [esp+12]
mov eax,dword [esp+4]
cmp dword [esp+12],eax
jnz .loop2
test esi,esi
jz .loop1end
mov eax,dword [esp+12]
add eax,dword [esp+8]
mov [ebx+4*eax],esi
.loop1end:
inc dword [esp+8]
mov eax,dword [esp]
cmp dword [esp+8],eax
jnz .loop1
add esp,16
sub ebx,4
mov ecx,39
xor edx,edx
.loop3:
cmp dword [ebx+4*ecx],edx
jnz .loop3end
dec ecx
jnz .loop3
.loop3end:
test ecx,ecx
jnz .l1
inc ecx
.l1:
mov dword [ebx],ecx
popad
ret
lmod:
;eax - address of first number
;edx - address of second number
;[eax]:=[eax] mod [edx]
mov ecx,dword [eax]
sub ecx,dword [edx]
jl .lend
pushad
inc ecx
mov ebp,eax
mov eax,edx
mov edi,eax
shl ecx,5
mov edx,ecx
mov esi,ecx
call lshl
.loop:
mov eax,ebp
mov edx,edi
call lcmp
test ecx,ecx
jl .l1
call lsub
.l1:
dec esi
js .endloop
mov eax,edx
mov edx,1
call lshr
jmp .loop
.endloop:
popad
.lend:
ret
rsacode:
;eax - address of message
;edx - open key
;ecx - address of module
;esi - temparary number1
;edi - temparary number2
;esi - [eax]^edx mod (ecx)
;[eax] is changed.
push eax
push edx
push ecx
xchg eax,esi
call set_zero
mov dword [eax+4],1
mov esi,eax
mov eax,edi
call set_zero
.loop:
mov ecx,dword [esp+4]
test ecx,1
jz .l1
mov eax,edi
mov edx,esi
mov ecx,dword [esp+8]
call lmul
mov edx,dword [esp]
call lmod
mov eax,esi
mov edx,edi
call lcopy
.l1:
shr dword [esp+4],1
jz .endloop
mov edx,dword [esp+8]
mov ecx,edx
mov eax,edi
call lmul
mov edx,dword [esp]
call lmod
mov eax,dword [esp+8]
mov edx,edi
call lcopy
jmp .loop
.endloop:
pop ecx
pop edx
pop eax
ret
rsa_test:
mov eax,num1
mov dword [eax],16
mov ecx,1
mov edx,16
.loop:
add eax,4
mov dword [eax],ecx
dec edx
jnz .loop
mov eax,num1
mov ebx,[iter]
mov dword [eax+4],ebx
inc dword [iter]
mov edx,[openkey]
mov ecx,module
mov esi,num2
mov edi,num3
call rsacode
ret
init_test:
xor eax,eax
mov [iter],eax
mov [openkey],10007
mov eax,num2
call set_zero
mov eax,num3
call set_zero
ret
module:
;module=p*q.
;where
;p=
;dd 9
;dd 147,2,3,4,5,6,7,8,9
;times 30 dd 0
;q=
;dd 9
;dd 163,4,5,6,7,8,9,10,11
;times 30 dd 0
dd 17
dd 23961,914,1232,1556,1887,2226,2574,2932,3301,288,308,314,305,280,238,178,99
times 22 dd 0
;in decimal
;p=1042128803351525332193283695592003066548124262686459610611886292768993621049491
;q=1273712981880077616387281148672409277231717442781838063285512054053473668300963
;n=1327372985619988354987062708438042005329282516404896732667039640816200186465366322016844458439816997285872910403676793109807015096535910981266920474905959833
macro udata
{
udata
num1 rd 40
num2 rd 40
num3 rd 40
iter rd 1
openkey rd 1
}

View File

@ -0,0 +1,2 @@
fasm cpuid.asm cpuid
pause

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,322 @@
; Brand
;======================
brand0:
db 'n/a'
brand0len:
brand01:
db '01 Celeron'
brand01len:
brand02:
db '02 Pentium III'
brand02len:
brand03:
db '03 Pentium III Xeon'
brand03len:
brand03d:
db '03 Celeron'
brand03dlen:
brand04:
db '04 Pentium III'
brand04len:
brand06:
db '06 Pentium III M'
brand06len:
brand07:
db '07 Celeron M'
brand07len:
brand08:
db '08 Pentium 4'
brand08len:
brand09:
db '09 Pentium 4'
brand09len:
brand0A:
db '0A Celeron'
brand0Alen:
brand0B:
db '0B Xeon'
brand0Blen:
brand0Bd:
db '0B Xeon MP'
brand0Bdlen:
brand0C:
db '0C Xeon MP'
brand0Clen:
brand0E:
db '0E Pentium 4 M'
brand0Elen:
brand0Ed:
db '0E Xeon'
brand0Edlen:
brand0F:
db '10 Celeron M'
brand0Flen:
brand11:
db '11 Mobile CPU'
brand11len:
brand12:
db '12 Celeron M'
brand12len:
brand13:
db '13 Celeron M'
brand13len:
brand14:
db '14 Celeron'
brand14len:
brand15:
db '15 Mobile CPU'
brand15len:
brand16:
db '16 Pentium M'
brand16len:
brand17:
db '17 Celeron M'
brand17len:
;======================
;features
FPU:
db 'FPU: '
FPUlen:
VME:
db 'VME: '
VMElen:
DE:
db 'DE: '
DElen:
PSE:
db 'PSE: '
PSElen:
TSC:
db 'TSC: '
TSClen:
MSR:
db 'MSR: '
MSRlen:
PAE:
db 'PAE: '
PAElen:
MCE:
db 'MCE: '
MCElen:
CX8:
db 'CX8: '
CX8len:
APIC:
db 'APIC: '
APIClen:
SEP:
db 'SEP: '
SEPlen:
MTRR:
db 'MTRR: '
MTRRlen:
PGE:
db 'PGE: '
PGElen:
MCA:
db 'MCA: '
MCAlen:
CMOV:
db 'CMOV: '
CMOVlen:
PAT:
db 'PAT: '
PATlen:
PSE36:
db 'PSE36: '
PSE36len:
PSNUM:
db 'PSNUM: '
PSNUMlen:
CLFLUSHn:
db 'CLFLSH: '
CLFLUSHnlen:
DTS:
db 'DTS: '
DTSlen:
ACPI:
db 'ACPI: '
ACPIlen:
MMX:
db 'MMX: '
MMXlen:
FXSR:
db 'FXSR: '
FXSRlen:
SSE:
db 'SSE: '
SSElen:
SSE2:
db 'SSE2: '
SSE2len:
SSn:
db 'SS: '
SSnlen:
TM:
db 'TM: '
TMlen:
IA64:
db 'IA64: '
IA64len:
PBE:
db 'PBE: '
PBElen:
Res:
db 'Reserved'
Reslen:
;Extended
SS3:
db 'SSE3: '
SS3len:
MON:
db 'MON: '
MONlen:
DS_CPL:
db 'DS-CPL: '
DS_CPLlen:
EST:
db 'EST: '
ESTlen:
TM2:
db 'TM2: '
TM2len:
CNXT_ID:
db 'CNXT-ID: '
CNXT_IDlen:
CX16:
db 'CX16: '
CX16len:
ETPRD:
db 'ETPRD: '
ETPRDlen:
;Extended2
SYS:
db 'SYSCALL: '
SYSlen:
MP:
db 'MP: '
MPlen:
NX:
db 'NX(XD): '
NXlen:
MMXPi:
db 'MMX+: '
MMXPilen:
MMXn:
db 'MMX: '
MMXnlen:
FXSRn:
db 'FXSR: '
FXSRnlen:
FFXSR:
db 'FFXSR: '
FFXSRlen:
TSCP:
db 'TSCP: '
TSCPlen:
LM:
db 'LM(AA64): '
LMlen:
DNo:
db '3DNow!+: '
DNolen:
DN:
db '3DNow!: '
DNlen:
LAF:
db 'LAHF: '
LAFlen:
;================================
abrand00:
db '8-bit Brand (no details)'
abrand00len:
abrand0:
db 'AMD Opteron UP'
abrand0len:
abrand1:
db 'AMD Opteron DP'
abrand1len:
abrand2:
db 'AMD Opteron MP'
abrand2len:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -0,0 +1,67 @@
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
; SMBus interface
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
;include 'smb_nf2.inc'
smb_base dd 0 ; IO port base for SMBus acces
smb_slave dd 0 ; SMBus addres for monitoring chip
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
smbInit:
; Èçìåíèòü, êîä òîëüêî äëÿ òåñòèðîâàíèÿ !!!
; mov dword[IO_Read ], nf2_readb
; mov dword[IO_Write], nf2_writeb
; See pci_pm.c -> pci_pm_smb_prob
.exit_err:
stc
ret
.exit_ok:
clc
ret
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
; pci_bus_num: db 2 ; Íîìåð øèíû
; pci_devfn: db 255
; find_north_bridg:
; mov bl, 6
; xor cl, cl
; nbus: mov bh, [pci_bus_num]
; ndevfn: mov ch, [pci_devfn]
; mov eax, 62
; int 0x40
; cmp eax, 0xffffffff
; je bd_next
;;;;---------
; mov esi, bd_table_end - bd_table - 12
; @@: cmp eax, [bd_table + esi]
; je bd_found
; test esi, esi
; jz bd_next
; sub esi, 12
; jmp @b
;;;;---------
; bd_next:dec byte[pci_devfn]
; jns ndevfn
; mov byte[pci_devfn], 0
; dec byte[pci_bus_num]
; jns nbus
; ret
; bd_found:
; add esi, bd_table + 4
; mov edi, nb_name
; mov ecx, 2
; rep movsd
; mov [bd_id], eax
; ret
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
smbClose:
ret
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

View File

@ -1,4 +1,3 @@
nl equ 0x0d, 0x0a
; 0x00xx - Menuet 0.xx ; 0x00xx - Menuet 0.xx
; 0x0400 - Kolibi 4 (новое завершение процесса) ; 0x0400 - Kolibi 4 (новое завершение процесса)
@ -6,3 +5,5 @@ nl equ 0x0d, 0x0a
; 0x0530 - всего/свободно памяти ; 0x0530 - всего/свободно памяти
; 0x0580 - новое завершение процесса ; 0x0580 - новое завершение процесса
OS_version equ 0x0580 OS_version equ 0x0580
SMBus fix no ; yes

View File

@ -21,11 +21,11 @@ d_show:
mov ebx, 12 * 65536 + 13 mov ebx, 12 * 65536 + 13
xor eax, eax xor eax, eax
lodsb lodsb
mov cx, 220 mov cx, 240
sub ecx, eax sub ecx, eax
@@: shl ecx, 16 @@: shl ecx, 16
mov cx, 220 mov cx, 240
lodsb lodsb
sub ecx, eax sub ecx, eax
mov eax, 38 mov eax, 38

View File

@ -38,6 +38,11 @@
; 18/07/2006 - Óëè÷øèë âûâîä ìíîæèòåëÿ, èñïðàâëåííû ìíîæèòåëè äëÿ P6 Tualatin, config.inc ; 18/07/2006 - Óëè÷øèë âûâîä ìíîæèòåëÿ, èñïðàâëåííû ìíîæèòåëè äëÿ P6 Tualatin, config.inc
; 22/07/2006 - P6 multiplier bugfix ; 22/07/2006 - P6 multiplier bugfix
; 30/07/2006 - P6 multiplier bugfix ; 30/07/2006 - P6 multiplier bugfix
; --- v 0.4 ---
; 10/08/2006 - íà÷àòà ðàáîòà ïî ïîääåðæêå SMBus, ïåðåïèñàíû ôóíêöèè äëÿ ÷èïîâ ìîíèòîðèíãà
; 24/08/2006 - äîáàâëåííà ÷àñòîòà ïðîöåññîðà
; 10/09/2006 - bugfix
; 25/11/2006 - äîáàâëåí ABIT uGuru
; ;
; Ýé! Ó ìåíÿ íåò ìíîãî âðåìåíè. ; Ýé! Ó ìåíÿ íåò ìíîãî âðåìåíè.
@ -46,7 +51,7 @@
; system.inc - âû÷èñëåíèå çàãðóçêè ïðîöåññîðà, çàâåðøåíèå òåñòà, etc... ; system.inc - âû÷èñëåíèå çàãðóçêè ïðîöåññîðà, çàâåðøåíèå òåñòà, etc...
; tests.inc - òåñòû ;-) ; tests.inc - òåñòû ;-)
; diag.inc - ïîääåðæêà äèàãðàì ; diag.inc - ïîääåðæêà äèàãðàì
; *_tab.inc - ïðîöåäóðû îòðèñîâêè ñîîòâåòñòâóþøèõ âêëàäîê ; tab_*.inc - ïðîöåäóðû îòðèñîâêè ñîîòâåòñòâóþøèõ âêëàäîê
; Èäåíòèôèêàòîðû êíîïîê : ; Èäåíòèôèêàòîðû êíîïîê :
@ -202,22 +207,15 @@ no_ut_dec:
movzx ecx, ah movzx ecx, ah
mov esi, [d_colors + ecx * 4] mov esi, [d_colors + ecx * 4]
mov eax, [esi] mov eax, [esi]
call next_color mov ecx, (colors_end - colors) / 4 ; êîëè÷åñòâî öâåòîâ
mov [esi], ebx
jmp draw_window
no_change_color:
jmp wait_for_event
;---------------------------------------------------------------------
; Öâåòà ãðàôèêîâ
colors: dd 0xff0000, 0xff00, 0xff, 0xffffff, tcol, 0xFF7E23, 0x8BA169, 0xff0000 ; ïåðâûé è ïîñëåäíèé ðàâíû
next_color:
mov ecx, (next_color - colors) / 4 ; êîëè÷åñòâî öâåòîâ
@@: dec ecx @@: dec ecx
cmp eax, [colors + ecx * 4] cmp eax, [colors + ecx * 4]
jne @b jne @b
mov ebx, [colors + ecx * 4 - 4] mov ebx, [colors + ecx * 4 - 4]
ret mov [esi], ebx
jmp draw_window
no_change_color:
jmp wait_for_event
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
draw_window: draw_window:
mov eax,12 mov eax,12
@ -226,7 +224,7 @@ draw_window:
; Ñîçäà¸ì îêíî ; Ñîçäà¸ì îêíî
xor eax, eax xor eax, eax
mov ebx, 300 * 65536 + 309 mov ebx, 300 * 65536 + 309
mov ecx, 150 * 65536 + 430 mov ecx, 150 * 65536 + 450
mov edx, tcol + 0x3000000 ; color of work area RRGGBB,8->color mov edx, tcol + 0x3000000 ; color of work area RRGGBB,8->color
mov esi, 0x805080d0 ; color of grab bar RRGGBB,8->color mov esi, 0x805080d0 ; color of grab bar RRGGBB,8->color
mov edi, 0x005080d0 ; color of frames RRGGBB mov edi, 0x005080d0 ; color of frames RRGGBB
@ -234,20 +232,20 @@ draw_window:
; Ñîçäà¸ì ðàìêó ãðàôèêà ; Ñîçäà¸ì ðàìêó ãðàôèêà
mov eax, 13 mov eax, 13
mov ebx, 10 * 65536 + 290 mov ebx, 10 * 65536 + 290
mov ecx, 118 * 65536 + 105 mov ecx, 138 * 65536 + 105
mov edx, atcol mov edx, atcol
int 0x40 int 0x40
mov ebx, 12 * 65536 + 286 mov ebx, 12 * 65536 + 286
mov ecx, 120 * 65536 + 101 mov ecx, 140 * 65536 + 101
mov edx, tcol mov edx, tcol
int 0x40 int 0x40
mov eax, 38 mov eax, 38
mov edx, atcol mov edx, atcol
mov ebx, 12 * 65536 + 286 + 12 mov ebx, 12 * 65536 + 286 + 12
mov ecx, 120 * 65536 + 120 mov ecx, 140 * 65536 + 140
@@: add ecx, 10 * 65536 + 10 @@: add ecx, 10 * 65536 + 10
int 0x40 int 0x40
cmp cx, 210 ; ïðèâÿçàíî ê êîîðäèíàòàì îêíà cmp cx, 230 ; ïðèâÿçàíî ê êîîðäèíàòàì îêíà
jl @b jl @b
; Ïèøèì çàãîëîâîê ; Ïèøèì çàãîëîâîê
mov eax, 4 mov eax, 4
@ -310,7 +308,7 @@ draw_window:
cmp byte[hwm_enable], 0 cmp byte[hwm_enable], 0
jne show_mon jne show_mon
; Íåò äàò÷èêîâ - ïèøåì NO ; Íåò äàò÷èêîâ - ïèøåì NO
mov ecx, 6 ;<- êîëè÷åñòâî ïàðàìåòðîâ mov ecx, 8 ;<- êîëè÷åñòâî ïàðàìåòðîâ
mov eax, 4 mov eax, 4
mov ebx, 121 * 65536 + 50 mov ebx, 121 * 65536 + 50
mov edx, msg_no mov edx, msg_no
@ -332,7 +330,7 @@ show_mon:
;--------------------------- ;---------------------------
; Òåìïåðàòóðó ; Òåìïåðàòóðó
mov ecx, 3 mov ecx, 3
mov esi, temps mov esi, hwm_temps
mov edx, 121 * 65536 + 50 mov edx, 121 * 65536 + 50
xor eax, eax xor eax, eax
sh_temp:push ecx sh_temp:push ecx
@ -360,25 +358,25 @@ sh_temp:push ecx
pop ecx pop ecx
loop sh_temp loop sh_temp
;;--- äîáàâëÿåì íà ãðàôèê temp1 --- ;;--- äîáàâëÿåì íà ãðàôèê temp1 ---
movzx eax, word[temps] movzx eax, word[hwm_temps]
mov esi, d_temp1 mov esi, d_temp1
call d_add call d_add
call d_show call d_show
;;--- äîáàâëÿåì íà ãðàôèê temp2 --- ;;--- äîáàâëÿåì íà ãðàôèê temp2 ---
movzx eax, word[temps + 2] movzx eax, word[hwm_temps + 2]
mov esi, d_temp2 mov esi, d_temp2
call d_add call d_add
call d_show call d_show
;;--- äîáàâëÿåì íà ãðàôèê temp3 --- ;;--- äîáàâëÿåì íà ãðàôèê temp3 ---
movzx eax, word[temps + 4] movzx eax, word[hwm_temps + 4]
mov esi, d_temp3 mov esi, d_temp3
call d_add call d_add
call d_show call d_show
;--------------------------- ;---------------------------
; Ñêîðîñòè âðàøåíèÿ âåíòèëåé ; Ñêîðîñòè âðàøåíèÿ âåíòèëåé
mov ecx, 3 mov ecx, 5
mov esi, rpms mov esi, hwm_rpms
mov edx, 121 * 65536 + 80 mov edx, 121 * 65536 + 80
sh_fan: push ecx sh_fan: push ecx
lodsd lodsd
@ -400,7 +398,7 @@ sh_fan: push ecx
;--------------------------- ;---------------------------
; Íàïðóãè ; Íàïðóãè
mov esi, Vcore mov esi, hwm_voltages
mov edi, old_volts mov edi, old_volts
mov ecx, 7 mov ecx, 7
mov ebx, 260 * 65536 + 30 mov ebx, 260 * 65536 + 30
@ -441,7 +439,7 @@ volt_nxt:
no_monitor: no_monitor:
;--------------------------- ;---------------------------
; Ñîçäà¸ì êíîïêè âêëàäîê ; Ñîçäà¸ì êíîïêè âêëàäîê
mov edi, 230 * 65536 + 25 mov edi, 250 * 65536 + 25
mov ecx, 4 mov ecx, 4
mov eax, 8 mov eax, 8
mov ebx, 10 * 65536 + 70 mov ebx, 10 * 65536 + 70
@ -459,7 +457,7 @@ na1: int 0x40
loop n_bt loop n_bt
; Ïèøèì íàçâàíèÿ âêëàäîê ; Ïèøèì íàçâàíèÿ âêëàäîê
mov eax, 4 mov eax, 4
mov ebx, 35 * 65536 + 240 mov ebx, 35 * 65536 + 260
mov edx, tab_lab mov edx, tab_lab
mov ecx, 0x10000000 mov ecx, 0x10000000
mov esi, 39 mov esi, 39
@ -467,11 +465,11 @@ na1: int 0x40
; ñîçäà¸ì ðàìêó âíèçó ýêðàíà ; ñîçäà¸ì ðàìêó âíèçó ýêðàíà
mov eax, 13 mov eax, 13
mov ebx, 10 * 65536 + 290 mov ebx, 10 * 65536 + 290
mov ecx, 255 * 65536 + 160 mov ecx, 275 * 65536 + 160
mov edx, atcol mov edx, atcol
int 0x40 int 0x40
mov ebx, 12 * 65536 + 286 mov ebx, 12 * 65536 + 286
mov ecx, 257 * 65536 + 156 mov ecx, 277 * 65536 + 156
mov edx, tcol mov edx, tcol
int 0x40 int 0x40
; ðèñóåì âûáðàííóþ âêëàäêó ; ðèñóåì âûáðàííóþ âêëàäêó
@ -490,16 +488,16 @@ end_drow_tab:
jmp wait_for_event jmp wait_for_event
;--- Drow Info tab --------------- ;--- Drow Info tab ---------------
info_tab: info_tab:
include "info_tab.inc" include "tab_info.inc"
;--- Drow test tab --------------- ;--- Drow test tab ---------------
test_tab: test_tab:
include "test_tab.inc" include "tab_test.inc"
;--- Drow Config tab ------------- ;--- Drow Config tab -------------
config_tab: config_tab:
include "conf_tab.inc" include "tab_conf.inc"
;--- Drow About tab -------------- ;--- Drow About tab --------------
about_tab: about_tab:
include "abou_tab.inc" include "tab_about.inc"
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
include "system.inc" include "system.inc"
include "hwm.inc" include "hwm.inc"
@ -509,7 +507,7 @@ about_tab:
DATA DATA
act_tab db 2 ; Íîìåð àêòèâíîé âêëàäêè act_tab db 2 ; Íîìåð àêòèâíîé âêëàäêè
tab_lab db 'Info Tests Configs About' tab_lab db 'Info Tests Configs About'
title db 'Ghost Monitor v0.3 [30/07/06]' title db 'Ghost Monitor v0.4 [25/11/06]'
msgs_mon mls \ msgs_mon mls \
'CPU Load (%)',\ 'CPU Load (%)',\
@ -519,7 +517,9 @@ msgs_mon mls \
'Temp3',\ 'Temp3',\
'Fan1',\ 'Fan1',\
'Fan2',\ 'Fan2',\
'Fan3' 'Fan3',\
'Fan4',\
'Fan5'
msgs_mon2 mls \ msgs_mon2 mls \
'Vcore',\ 'Vcore',\
@ -536,6 +536,10 @@ msg_no db 'N/A'
update_time dd 300 ; ïåðèîä îáíîâëåíèÿ â ñîòûõ äîëÿõ ñåêóíäû update_time dd 300 ; ïåðèîä îáíîâëåíèÿ â ñîòûõ äîëÿõ ñåêóíäû
d_colors dd d_cpu_load, d_mem_usage, d_temp1, d_temp2, d_temp3 d_colors dd d_cpu_load, d_mem_usage, d_temp1, d_temp2, d_temp3
c_eps dd 0.01 c_eps dd 0.01
; Öâåòà ãðàôèêîâ
colors: dd 0xff0000, 0xff00, 0xff, 0xffffff, tcol, 0xFF7E23, 0x8BA169, 0xff0000 ; ïåðâûé è ïîñëåäíèé ðàâíû
colors_end:
;--------------------------------------------------------------------- ;---------------------------------------------------------------------
UDATA UDATA

View File

@ -1,11 +1,26 @@
;
; HWM abstract interface, provide:
; hwm_init, hwm_get_params, hwm_enable, hwm_temps, hwm_rpms, hwm_voltages, hwm_chip_name
;
if SMBus eq yes
include 'SMBus.inc'
end if
include 'hwm_wb.inc' include 'hwm_wb.inc'
include 'hwm_it87.inc' include 'hwm_it87.inc'
include 'hwm_uguru.inc'
;include 'hwm_via686.inc'
uglobal uglobal
hwm_enable:db 0 ; 0 - no, 1 - Winbond, 2 - ITE hwm_enable:
temps db 0,0, 0,0, 0,0 ; ãðàäóñ, äåñÿòûå, ãðàäóñ, ... dd 0 ; 0 - no, 1 - Winbond, 2 - ITE, ... see HWMProbe list
rpms dd 0, 0, 0 ; fan1, fan2, fan3 hwm_temps:
db 0,0, 0,0, 0,0 ; ãðàäóñ, äåñÿòûå, ãðàäóñ, ...
hwm_rpms:
dd 0, 0, 0, 0, 0 ; fan1, fan2, fan3, ...
hwm_voltages:
Vcore dd 0.0 Vcore dd 0.0
Vin0 dd 0.0 Vin0 dd 0.0
Vin1 dd 0.0 Vin1 dd 0.0
@ -13,68 +28,126 @@ uglobal
Vin2 dd 0.0 Vin2 dd 0.0
V12 dd 0.0 V12 dd 0.0
V5 dd 0.0 V5 dd 0.0
vol8 dd 0.0
vol9 dd 0.0
vol10 dd 0.0
vol11 dd 0.0
acc_type db 0 ; 0 - ISA Bus, 1 - SMBus, 2 - other
endg endg
IO_Read dd isaRead ; In : al - addr, out : al - value
IO_Write dd isaWrite ; In : al - addr, bl - value
hwm_unk db 9, 'Not found' hwm_unk db 9, 'Not found'
hwm_chip_name dd hwm_unk hwm_chip_name dd hwm_unk
; NOTE !!!
; HWMProbe - ñïèñîê, ïðîöåäóð ïðîâåðêè ÷èïîâ, çàêàí÷èâàåòñÿ
; íóëåâûì äâîéíûì ñëîâîì
; HWMGetParam - ñïèñîê, ïðîöåäóð ïîëó÷åíèÿ ïàðàìåòðîâ
; îáà ýòè ñïèñêà äîëæíû ñîîòâåòñòâîâàòü äðóã äðóãó ïî
; ïî ïîðÿäêó ïðîöåäóð
HWMProbe: dd wb_init
dd it87_init
dd uGuru_init
dd 0 ; <- êîíåö ñïèñêà
HWMGetParam: dd wb_getparam
dd it87_getparam
dd uGuru_getparam
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
hwm_init: hwm_init:
; Ïðîâåðêà íàëè÷èÿ è èíèöèàëèçàöèÿ ; Ïðîâåðêà íàëè÷èÿ è èíèöèàëèçàöèÿ
pusha pusha
; Èùåì äàò÷èêè íà øèíå ISA
call isaInit
jc @f
call chips_probe
cmp byte[hwm_enable], 0
jne .exit
@@: call isaClose
mov eax, 46 ; ðåçåðâèðóåì 0x295 è 0x296 ïîðòû ; Èùåì äàò÷èêè íà øèíå SMBus
xor ebx, ebx inc byte [acc_type]
mov ecx, 0x295 if SMBus eq yes
mov edx, 0x296 call smbInit
int 0x40 jc @f
call chips_probe
cmp byte[hwm_enable], 0
jne .exit
@@: call smbClose
end if
; Èùåì äàò÷èêè íà ñîáñòâåííîé øèíå (LPC etc)
inc byte [acc_type]
call chips_probe
.exit: popa
ret
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
chips_probe:
; Íàõîäèì íóæíûé ÷èï
; Out : hwm_enable = !0 if found, else hwm_enable not changed
cld ; Paranoia
mov esi, HWMProbe
@@: lodsd
test eax, eax test eax, eax
jz hwm_ports_ok jz @f ; Êîíåö ñïèñêà
hwm_no: call eax
mov eax, 46 ; îñâîáîæäàåì 0x295 è 0x296 ïîðòû jc @b
xor ebx, ebx sub esi, HWMProbe
inc ebx shr esi, 2
mov dword[hwm_enable], esi
@@: ret
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
hwm_get_params:
pusha
mov eax, [hwm_enable]
test eax, eax
jz @f
dec eax
sal eax, 2
call dword[eax + HWMGetParam]
@@: popa
ret
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
; ISA interface
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
isaRead:
push edx
mov dx, 0x295
out dx, al
inc edx
in al, dx
pop edx
ret
isaWrite:
push edx
mov dx, 0x295
out dx, al
inc edx
mov al, bl
out dx, al
pop edx
ret
isaInit:
; Out : CF = 0 if Ok
; ðåçåðâèðóåì 0x295 è 0x296 ïîðòû
mov ecx, 0x295 mov ecx, 0x295
mov edx, 0x296 mov edx, 0x296
int 0x40 call ReservePorts
popa ; jc @f
; mov [IO_Read], isaRead
; mov [IO_Write], isaWrite
; @@:
ret ret
hwm_ports_ok:
call wb_init isaClose:
jc not_wb ; îñâîáîæäàåì 0x295 è 0x296 ïîðòû
mov byte [hwm_enable], 1 mov ecx, 0x295
call wb_get_name mov edx, 0x296
jmp hwm_ok call FreePorts
not_wb: call it87_init
jc hwm_no
mov byte [hwm_enable], 2
call it87_get_name
hwm_ok: mov [hwm_chip_name], edx
popa
ret ret
;----------------------------------------------------
hwm_get_params:
; Âûçûâàòü òîëüêî åñëè íàéäåí
pusha
mov al, [hwm_enable]
dec al
jnz @f
call wb_get_temp
call wb_get_fan_speed
mov edi, wb_coeff
call wb_get_volt
fld dword[V12]
fld dword[wb_n12v_const]
faddp st1, st0
fstp dword[V12]
popa
ret
@@: call it87_get_temp
call it87_get_fan_speed
mov edi, ite_coeff
call wb_get_volt
popa
ret
;----------------------------------------------------

View File

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

View File

@ -0,0 +1,212 @@
; ABIT uGuru
;
; Chip Temp Volt Fan ISA SMBus LPC
; W83L950D(?) 3 11 5 - - +
; uGuru ports
UGURU_CMD_PORT equ 0x0e0
UGURU_DATA_PORT equ 0x0e4
; temp sensors
UGURU_CPUTEMP equ 0x2100
UGURU_SYSTEMP equ 0x2101
UGURU_PWMTEMP equ 0x210f
; fans. These are placed at bank 2
SENS_CPUFAN equ 0x2600
SENS_NBFAN equ 0x2601
SENS_SYSFAN equ 0x2602
SENS_AUXFAN1 equ 0x2603
SENS_AUXFAN2 equ 0x2604
; Voltage sensors
SENS_VCORE equ 0x2103 ; 3.49V max
SENS_DDRVDD equ 0x2104 ; 3.49V max
SENS_DDRVTT equ 0x210A ; 3.49V max
SENS_NBVDD equ 0x2108 ; 3.49V max
SENS_SBVDD equ 0x210E ; 3.49V max
SENS_HTV equ 0x2102 ; 3.49V max
SENS_AGP equ 0x2109 ; 3.49V max
SENS_5V equ 0x2106 ; 6.25V max
SENS_3V3 equ 0x2105 ; 4.36V max
SENS_5VSB equ 0x210B ; 6.25V max
SENS_3VDUAL equ 0x210D ; 4.36V max
; Voltage ADC multipliers
MLTP_3V49 equ 0.0136862745098039
MLTP_4V36 equ 0.0170980392156863
MLTP_6V25 equ 0.0245098039215686
v_addr: dw SENS_VCORE, SENS_DDRVDD, SENS_DDRVTT, SENS_NBVDD, SENS_SBVDD
dw SENS_HTV, SENS_AGP, SENS_5V, SENS_3V3, SENS_5VSB, SENS_3VDUAL
v_mult: dd MLTP_3V49, MLTP_3V49, MLTP_3V49, MLTP_3V49, MLTP_3V49, MLTP_3V49
dd MLTP_3V49, MLTP_6V25, MLTP_4V36, MLTP_6V25, MLTP_4V36
msg_uguru: db 10, 'ABIT uGuru'
;-----------------------------------
uGuru_init:
; Ïðîâåðêà íàëè÷èÿ è èíèöèàëèçàöèÿ
; OUT - CF = 1 - error
cmp byte[acc_type], 3 ; Special IO interface
jne .uGuru_no
pusha
mov ecx, UGURU_CMD_PORT
mov edx, UGURU_DATA_PORT
call ReservePorts
test eax, eax
jnz .no_lpc
in al, UGURU_CMD_PORT
test al, al
jz @f
cmp al, 0xac
jne .bad_sig
@@: in al, UGURU_DATA_PORT
test al, al
jz @f
cmp al, 8
jne .bad_sig
@@: mov [hwm_chip_name], msg_uguru
popa
clc
ret
.bad_sig:
; popa ;
; clc ; <- uncomment this three line, if you certain that you
; ret ; have ABIT uGuru but he is not defined
.no_lpc:
mov ecx, UGURU_CMD_PORT
mov edx, UGURU_DATA_PORT
call FreePorts
popa
.uGuru_no:
stc
ret
;-----------------------------------
uGuru_getparam:
; Temperature
mov ax, UGURU_CPUTEMP
call uGuru_ReadSensor
mov [hwm_temps + 0], al
mov ax, UGURU_SYSTEMP
call uGuru_ReadSensor
mov [hwm_temps + 1], al
mov ax, UGURU_PWMTEMP
call uGuru_ReadSensor
mov [hwm_temps + 2], al
; Fan speed
mov ax, SENS_CPUFAN
call uGuru_ReadSensor
mov dl, 60
mul dl
mov word[hwm_rpms + 0 ], ax
mov ax, SENS_NBFAN
call uGuru_ReadSensor
mov dl, 60
mul dl
mov word[hwm_rpms + 4 ], ax
mov ax, SENS_SYSFAN
call uGuru_ReadSensor
mov dl, 60
mul dl
mov word[hwm_rpms + 8 ], ax
mov ax, SENS_AUXFAN1
call uGuru_ReadSensor
mov dl, 60
mul dl
mov word[hwm_rpms + 12], ax
mov ax, SENS_AUXFAN2
call uGuru_ReadSensor
mov dl, 60
mul dl
mov word[hwm_rpms + 16], ax
; voltages
cld ; Paranoia
xor ecx, ecx
mov esi, v_addr
@@: push ecx
lodsw
call uGuru_ReadSensor
movzx eax, al
fld dword[v_mult + ecx * 4]
push eax
fild dword [esp]
fmulp st1, st0
fstp dword [hwm_voltages + ecx * 4]
pop eax
pop ecx
inc ecx
cmp ecx, 11 ; <-- êîëè÷åñòâî äàò÷èêîâ (ADC Vin)
jne @b
ret
;-----------------------------------
uGuru_ReadSensor:
; Read a sensor
; In : ax - sensorID
; Out : al - result
mov ebx, eax ; Ask to read from uGuru
shr eax, 8
out UGURU_DATA_PORT, al
mov ecx, 1000 ; I guess this is to se if uGuru is ready to take a command
.is_ready:
in al, UGURU_DATA_PORT
dec ecx
jnz @f
xor al, al
ret
@@: cmp al, 8
jne .is_ready
mov al, bl ; Whitch sensor to read?
out UGURU_CMD_PORT, al
mov ecx, 1000 ; Wait until uGuru is ready to be read
.is_ready2:
in al, UGURU_DATA_PORT
dec ecx
jnz @f
xor al, al
ret
@@: cmp al, 1
jne .is_ready2
in al, UGURU_CMD_PORT ; Read the sensor
push eax
call uGuru_Ready ; Put the chip in ready state
pop eax ; Return the result of the sensor
ret
;-----------------------------------
uGuru_Ready:
; Put uGuru in ready state. uGuru will hold 0x08 at Data port and 0xAC at Command port after this.
; Out : CF = 1 - error
; Wait until uGuru is in ready-state
; The loop shouldn't be needed to execut more then one time
mov edx, 1000
.nxt: in al, UGURU_DATA_PORT
cmp al, 8
je .ok
xor al, al ; after 0x00 is written to Data port
out UGURU_DATA_PORT, al
mov ecx, 1000 ; Wait until 0x09 is read at Data port
.is_ready:
in al, UGURU_DATA_PORT
dec ecx
jnz @f
stc
ret
@@: cmp al, 9
jne .is_ready
mov ecx, 1000 ; Wait until 0xAC is read at Cmd port
.is_ready2:
in al, UGURU_CMD_PORT
dec ecx
jnz @f
stc
ret
@@: cmp al, 0xAC
jne .is_ready2
dec edx ; Prevent a lockup
jnz .nxt
stc
ret
.ok: clc
ret

View File

@ -6,229 +6,44 @@
; + 16.03.06 Èñïðàâëåíà îøèáêà â wb_get_cpu_temper ñ äåñÿòûõ ãðàäóñà (áûëî 30.5 30.0 31.5 ...) ; + 16.03.06 Èñïðàâëåíà îøèáêà â wb_get_cpu_temper ñ äåñÿòûõ ãðàäóñà (áûëî 30.5 30.0 31.5 ...)
; ;
; ;
uglobal ; | Chip name | ID Vin Fanin PWM Temp ISA SMBus
wb_chip_id: db 0 ; Èäåíòèôèêàòîð ÷èïà (åñëè íàøëè) msg_wb27HF: db 8, 'W83627HF' ; 0x20|0x21 9 3 2 3 + +
endg msg_wb27THF: db 9, 'W83627THF' ; 0x90|0x91 7 3 3 3 + +
; | Chip name | ID Vin Fanin PWM Temp msg_wb37THF: db 9, 'W83637THF' ; 0x80 7 3 3 3 + +
msg_wb27HF: db 8, 'W83627HF' ; 0x20|0x21 9 3 2 3 msg_wb97HF: db 8, 'W83697HF' ; 0x60|0x61 8 2 2 2 + -
msg_wb27THF: db 9, 'W83627THF' ; 0x90|0x91 7 3 3 3
msg_wb37THF: db 9, 'W83637THF' ; 0x80 7 3 3 3
msg_wb97HF: db 8, 'W83697HF' ; 0x60|0x61 8 2 2 2
msg_wb27EHF: db 11,'W83627EHF-A' ; 0x88 msg_wb27EHF: db 11,'W83627EHF-A' ; 0x88
msg_wb27THFA: db 11,'W83627THF-A' ; 0x1A msg_wb27THFA: db 11,'W83627THF-A' ; 0x1A
; db 7, 'W83781D' ; 0x10|0x11 7 3 3 ; db 7, 'W83781D' ; 0x10|0x11 7 3 3 + +
; db 7, 'W83782D' ; 0x30 9 3 3 ; db 7, 'W83782D' ; 0x30 9 3 3 + +
; db 8, 'AS99127F' ; 0x31 ; db 8, 'AS99127F' ; 0x31 7 3 3 - +
; db 7, 'W83783S' ; 0x40|0x41 5-6 3 1-2 ; db 7, 'W83783S' ; 0x40|0x41 5-6 3 1-2 - +
; db 7, 'W83791D' ; 0x70|0x71 10 5 3 ; db 7, 'W83791D' ; 0x70|0x71 10 5 3 - +
msg_wbunk: db 15,'Unknown Winbond' ; other, non zero ;-) msg_wbunk: db 15,'Unknown Winbond' ; other, non zero ;-)
;----------------------------------- ;-----------------------------------
wb_init: wb_init:
; Ïðîâåðêà íàëè÷èÿ è èíèöèàëèçàöèÿ ; Ïðîâåðêà íàëè÷èÿ è èíèöèàëèçàöèÿ
; OUT - CF = 1 - error ; OUT - CF = 1 - error
mov dx, 0x295 cmp byte[acc_type], 2 ; Only ISA and SMBus
jae wb_no
mov al, 0x4e mov al, 0x4e
out dx, al xor bl, bl
inc edx call [IO_Write]
xor al, al
out dx, al
dec edx
mov al, 0x4f mov al, 0x4f
out dx, al call [IO_Read]
inc edx
in al, dx
mov ah, al ;! mov ah, al ;!
dec edx
mov al, 0x4e mov al, 0x4e
out dx, al mov bl, 0x80
inc edx call [IO_Write]
mov al, 0x80
out dx, al
dec edx
mov al, 0x4f mov al, 0x4f
out dx, al call [IO_Read]
inc edx
in al, dx
cmp ax, 0xa35c cmp ax, 0xa35c
jne wb_no ; ýòî íå Winbond !!! jne wb_no ; ýòî íå Winbond !!!
dec edx ; --- óçíà¸ì èäåíòèôèêàòîð ÷èïà --
mov al, 0x58
out dx, al
inc edx
in al, dx
mov byte[wb_chip_id], al
clc
ret
wb_no: stc
ret
;-----------------------------------
wb_get_temp:
; temp 1
mov dx, 0x295 ; Âûáèðàåì bank 1
mov al, 0x4e
out dx, al
inc edx
mov al, 1
out dx, al
dec edx ; Ïîëó÷àåì ñòàðøèé áàéò òåìïåðàòóðû (ãðàäóñû)
mov al, 0x50
out dx, al
inc edx
in al, dx
mov [temps], al
dec edx ; Ïîëó÷àåì ìëàäøèé áàéò òåìïåðàòóðû (0.5`C)
mov al, 0x51
out dx, al
inc edx
in al, dx ; if al == 0 then 0.0, else 0.5
cmp al, 0
je @f
mov al, 5
@@: mov [temps + 1], al
; temp 2 (3 SYSTIN)
dec edx ; Âûáèðàåì bank 0
mov al, 0x4e
out dx, al
inc edx
mov al, 0
out dx, al
dec edx ; Ïîëó÷àåì ñòàðøèé áàéò òåìïåðàòóðû (ãðàäóñû)
mov al, 0x27
out dx, al
inc edx
in al, dx
mov [temps + 2], al
; temp 3 (VTIN)
dec edx ; Âûáèðàåì bank 2
mov al, 0x4e
out dx, al
inc edx
mov al, 2
out dx, al
dec edx ; Ïîëó÷àåì ñòàðøèé áàéò òåìïåðàòóðû (ãðàäóñû)
mov al, 0x50
out dx, al
inc edx
in al, dx
mov [temps + 4], al
dec edx ; Ïîëó÷àåì ìëàäøèé áàéò òåìïåðàòóðû (0.5`C)
mov al, 0x51
out dx, al
inc edx
in al, dx ; if al == 0 then 0.0, else 0.5
cmp al, 0
je @f
mov al, 5
@@: mov [temps + 5], al
; Ïðîâåðêà òåìïåðàòóðû, äàò÷èêè ñ 127.5`C íå èñïîëüçóþòñÿ
mov ecx, 3
mov esi, temps
wb_check_temp:
cmp word[esi + ecx * 2 - 2], 0x057F
jne wb_temp_ok
mov word[esi + ecx * 2 - 2], 0
wb_temp_ok:
loop wb_check_temp
ret ; --- óçíà¸ì èäåíòèôèêàòîð ÷èïà --
;----------------------------------- mov al, 0x58
wb_get_fan_speed: call [IO_Read]
; fan1
mov al, 0x47
mov dx, 0x295
out dx, al
inc edx
in al, dx
and al, 0x30
shr al, 4
mov ebx, 1
mov cl, al
shl ebx, cl ; <- div1
dec edx
mov al, 0x28
out dx, al
inc edx
xor eax, eax
in al, dx
cmp al, 255
jne @f
xor eax, eax
ret
@@: mul ebx
mov ebx, eax
mov eax, 1350000
xor edx, edx
div ebx
mov [rpms], eax
mov al, 0x47
mov dx, 0x295
out dx, al
inc edx
in al, dx
shr al, 6
mov ebx, 1
mov cl, al
shl ebx, cl ; <- div2
dec edx
mov al, 0x29
out dx, al
inc edx
xor eax, eax
in al, dx
cmp al, 255
jne @f
xor eax, eax
ret
@@: mul ebx
mov ebx, eax
mov eax, 1350000
xor edx, edx
div ebx
mov [rpms + 4], eax
ret
;-----------------------------------
wb_get_volt:
mov dx, 0x295
;mov edi, vcoeff ; <-- possible differences for miscellaneous chip
mov esi, Vcore
xor ecx, ecx
@@: mov eax, ecx
add al, 0x20
out dx, al
inc edx
in al, dx
fld dword [edi + ecx * 4]
push eax
fild dword [esp]
fmulp st1, st0
fstp dword [esi + ecx * 4]
pop eax
inc ecx
dec edx
cmp ecx, 7
jb @b
ret
wb_coeff: dd 0.016 ; Vcore
dd 0.016 ; Vin0
dd 0.016 ; Vin1 (+3.3V)
dd 0.02688 ; AVcc (+5V)
dd 0.0608 ; Vin2 (+12V)
dd 0.0822857142857145 ; -12V
dd -0.02408 ; -5V ; false
wb_n12v_const dd -14.9142857142857
;-----------------------------------
wb_get_name:
; Âîçâðàùàåò èìÿ ÷èïà
; Out : EDX - pointer to string (size:string - Pascal style)
mov al, [wb_chip_id]
and al, 0xFE ; 0x20 = 0x21, 0x60 = 0x61, etc and al, 0xFE ; 0x20 = 0x21, 0x60 = 0x61, etc
mov edx, msg_wb27HF mov edx, msg_wb27HF
cmp al, 0x20 cmp al, 0x20
@ -249,6 +64,143 @@ wb_get_name:
cmp al, 0x1A cmp al, 0x1A
je @f je @f
mov edx, msg_wbunk mov edx, msg_wbunk
@@: ret @@: mov [hwm_chip_name], edx
clc
ret
wb_no: stc
ret
;-----------------------------------
wb_getparam:
call wb_get_temp
call wb_get_fan_speed
mov edi, wb_coeff
call wb_get_volt
fld dword[V12]
fld dword[wb_n12v_const]
faddp st1, st0
fstp dword[V12]
ret
;-----------------------------------
wb_get_temp:
; temp 1
mov al, 0x4e ; Âûáèðàåì bank 1
mov bl, 1
call [IO_Write]
mov al, 0x50 ; Ïîëó÷àåì ñòàðøèé áàéò òåìïåðàòóðû (ãðàäóñû)
call [IO_Read]
mov [hwm_temps], al
mov al, 0x51 ; Ïîëó÷àåì ìëàäøèé áàéò òåìïåðàòóðû (x.5`C)
call [IO_Read]
cmp al, 0 ; if al == 0 then x.0, else x.5
je @f
mov al, 5
@@: mov [hwm_temps + 1], al
; temp 2 (3 SYSTIN)
mov al, 0x4e ; Âûáèðàåì bank 0
xor bl, bl
call [IO_Write]
mov al, 0x27 ; Ïîëó÷àåì ñòàðøèé áàéò òåìïåðàòóðû (ãðàäóñû)
call [IO_Read]
mov [hwm_temps + 2], al
; temp 3 (VTIN)
mov al, 0x4e ; Âûáèðàåì bank 2
mov bl, 2
call [IO_Write]
mov al, 0x50 ; Ïîëó÷àåì ñòàðøèé áàéò òåìïåðàòóðû (ãðàäóñû)
call [IO_Read]
mov [hwm_temps + 4], al
mov al, 0x51 ; Ïîëó÷àåì ìëàäøèé áàéò òåìïåðàòóðû (x.5`C)
call [IO_Read]
cmp al, 0 ; if al == 0 then x.0, else x.5
je @f
mov al, 5
@@: mov [hwm_temps + 5], al
; Ïðîâåðêà òåìïåðàòóðû, äàò÷èêè ñ 127.5`C íå èñïîëüçóþòñÿ
mov ecx, 3
mov esi, hwm_temps
wb_check_temp:
cmp word[esi + ecx * 2 - 2], 0x057F
jne wb_temp_ok
mov word[esi + ecx * 2 - 2], 0
wb_temp_ok:
loop wb_check_temp
ret
;-----------------------------------
wb_get_fan_speed:
; fan1
mov al, 0x47
call [IO_Read]
and al, 0x30
shr al, 4
mov ebx, 1
mov cl, al
shl ebx, cl ; <- div1
xor eax, eax
mov al, 0x28
call [IO_Read]
cmp al, 255
jne @f
xor eax, eax ; ???
ret ; ???
@@: mul ebx
mov ebx, eax
mov eax, 1350000
xor edx, edx
div ebx
mov [hwm_rpms], eax
mov al, 0x47
call [IO_Read]
shr al, 6
mov ebx, 1
mov cl, al
shl ebx, cl ; <- div2
xor eax, eax
mov al, 0x29
call [IO_Read]
cmp al, 255
jne @f
xor eax, eax
ret
@@: mul ebx
mov ebx, eax
mov eax, 1350000
xor edx, edx
div ebx
mov [hwm_rpms + 4], eax
ret
;-----------------------------------
wb_get_volt:
;mov edi, wb_coeff ; <-- possible differences for miscellaneous chip
mov esi, hwm_voltages
xor ecx, ecx
@@: mov eax, ecx
add al, 0x20
call [IO_Read]
fld dword [edi + ecx * 4]
push eax
fild dword [esp]
fmulp st1, st0
fstp dword [esi + ecx * 4]
pop eax
inc ecx
cmp ecx, 7
jb @b
ret
wb_coeff: dd 0.016 ; Vcore
dd 0.016 ; Vin0
dd 0.016 ; Vin1 (+3.3V)
dd 0.02688 ; AVcc (+5V)
dd 0.0608 ; Vin2 (+12V)
dd 0.0822857142857145 ; -12V
dd -0.02408 ; -5V ; false
wb_n12v_const dd -14.9142857142857

View File

@ -4,6 +4,7 @@ lang fix en ; ru en fr ge fi
@^ fix macro comment { @^ fix macro comment {
^@ fix } ^@ fix }
nl equ 0x0d, 0x0a
;~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~- ;~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
macro uglobal { macro uglobal {
UGlobals equ UGlobals, UGlobals equ UGlobals,

View File

@ -1,38 +1,46 @@
==[CP1251]========================================
Ghost Monitor Ghost Monitor
Автор : Михайлов Илья Андреевич aka Ghost Автор : Михайлов Илья Андреевич aka Ghost
Версия : 0.3 от 30/07/06 Версия : 0.4 от 25/11/06
ОС : для полного функционирования Kolibri 0.5.8.0 и старше ОС : для полного функционирования скачайте последнне ядро, или последний дистрибутив.
files : svn://kolibrios.org/programs/system/gmon/
http://iam.gorodok.net/Gmon.zip
forum : meos.sysbin.com -> Программы -> GMon forum : meos.sysbin.com -> Программы -> GMon
file : http://iam.gorodok.net/Gmon.zip
mailto : ghost.nsk@mail.ru mailto : ghost.nsk@mail.ru
Назначение : Назначение :
Мониторинг температуры и скорости врашения вентиляторов процессора и Мониторинг температуры, напряжения и скорости врашения вентиляторов процессора и
материнской платы, стресс тестирование надёжности системы охлаждения и блока материнской платы, стресс тестирование надёжности системы охлаждения и блока
питания компьютера. питания компьютера.
Мониторинг : Мониторинг :
В настоящее время отображаются загрузка процессора, загрузка памяти, температура, скорости В настоящее время отображаются загрузка/частота процессора, загрузка памяти, температура,
врашения вентиляторов и напряжение. Поддерживаемые чипы мониторинга : скорости врашения вентиляторов и напряжение. Поддерживаемые чипы мониторинга :
WinBond chip : W83627HF/THF/THF-A/EHF-A, W83637THF, W83697HF, и аналоги. WinBond chip : W83627HF/THF/THF-A/EHF-A, W83637THF, W83697HF, и аналоги.
Integrated Technology Express : IT8705F, IT8712F, IT8716F, и аналоги. Integrated Technology Express (ITE) : IT8705F, IT8712F, IT8716F, и аналоги.
SiS : sis950 (аналог IT8705F) Silicon Integrated Systems Corp. (SiS) : sis950 (аналог IT8705F)
Функции мониторинга температуры можно проверить в Windows на эмуляторе KlbrInWin, для этого ABIT : uGuru
необходимо в файле настроек написать EnablePorts 295 296
Функции мониторинга можно проверить в Windows на эмуляторе KlbrInWin, для этого необходимо в
файле настроек написать (пользуйтесь последней версией):
EnablePorts=e0-e8 295 296
AllowReadMSR=true
Тесты : Тесты :
Тесты ориентированы на процессоры P5, P6, K6 и K7, основаны на Robert Redelmeier's CPUburn Тесты ориентированы на процессоры P5, P6, K6 и K7, основаны на Robert Redelmeier's CPUburn
[http://pages.sbcglobal.net/redelm/]. Цля тестирования Pentium 4, рекомендую тест для K7, для [http://pages.sbcglobal.net/redelm/]. Цля тестирования Pentium 4, рекомендую тест для K7, для
остальных процессоров подберите по максимальной температуре (напишите мне об этом). остальных процессоров подберите по максимальной температуре (напишите мне об этом).
Внимание! Программа не реагирует на критический порог температуры, поэтому для избежания
Внимание! Программа не реагирует на критический порог температуры, поэтому для избежания
порчи оборудования не оставляйте запушенный тест без присмотра! В связи с различием в порчи оборудования не оставляйте запушенный тест без присмотра! В связи с различием в
реализации функции 18-2, для Menuet и Kolibri необходимы различные реализации программы, по реализации функции 18-2, для Menuet и Kolibri необходимы различные реализации программы, по
умолчанию компилируется для Kolibri 0.5.8.0, при необходимости измените процедуру stop_test в умолчанию компилируется для Kolibri 0.5.8.0 и старше, при необходимости измените параметр
system.inc. Тесты работают одинаково эффективно как на реальном оборудовании, так и на OS_version в файле config.inc. Тесты работают одинаково эффективно как на реальном оборудовании,
виртуальных машинах. так и на виртуальных машинах, но не рекоммендуется запускать их на эмуляторах (KlbrInWin,
MeOSEmul, etc) в связи с плохой реализацией завершения процесса, что может привести к порче
оборудования.
На будущее : На будущее :
Новые чипы Новые чипы
@ -42,58 +50,9 @@ system.inc.
Особая благодарность всем участникам форума. Особая благодарность всем участникам форума.
Найденные ошибки и предложения пишите в форум или на почту. Найденные ошибки и предложения пишите в форум или на почту.
ВНИМАНИЕ !!! ВОЗМОЖНА ПОРЧА ОБОРУЦОВАНИЯ! И напоследок :
ИСПОЛЬЗУЙТЕ НА СВОЙ СТРАХ И РИСК!
ВНИМАНИЕ !!! ВОЗМОЖНА ПОРЧА ОБОРУДОВАНИЯ! ИСПОЛЬЗУЙТЕ НА СВОЙ СТРАХ И РИСК!
Программа распостраняется "as is", и автор не несет ответственности за возможный ущерб, причиненный Программа распостраняется "as is", и автор не несет ответственности за возможный ущерб, причиненный
программой. программой.
==[CP866]=========================================
Ghost Monitor
Ђўв®а : ЊЁе ©«®ў €«мп Ђ­¤аҐҐўЁз aka Ghost
‚ҐабЁп : 0.3 ®в 30/07/06
Ћ‘ : ¤«п Ї®«­®Ј® дг­ЄжЁ®­Ёа®ў ­Ёп Kolibri 0.5.8.0 Ё бв аиҐ
forum : meos.sysbin.com -> Џа®Ја ¬¬л -> GMon
file : http://iam.gorodok.net/Gmon.zip
mailto : ghost.nsk@mail.ru
Ќ §­ зҐ­ЁҐ :
Њ®­Ёв®аЁ­Ј ⥬ЇҐа вгал Ё бЄ®а®бвЁ ўа иҐ­Ёп ўҐ­вЁ«пв®а®ў Їа®жҐбб®а  Ё
¬ вҐаЁ­бЄ®© Ї« вл, бваҐбб вҐбвЁа®ў ­ЁҐ ­ ¤с¦­®бвЁ бЁбвҐ¬л ®е« ¦¤Ґ­Ёп Ё Ў«®Є 
ЇЁв ­Ёп Є®¬ЇмовҐа .
Њ®­Ёв®аЁ­Ј :
­ бв®п饥 ўаҐ¬п ®в®Ўа ¦ овбп § Јаг§Є  Їа®жҐбб®а , § Јаг§Є  Ї ¬пвЁ, ⥬ЇҐа вга , бЄ®а®бвЁ
ўа иҐ­Ёп ўҐ­вЁ«пв®а®ў Ё ­ Їа殮­ЁҐ. Џ®¤¤Ґа¦Ёў Ґ¬лҐ зЁЇл ¬®­Ёв®аЁ­Ј  :
WinBond chip : W83627HF/THF/THF-A/EHF-A, W83637THF, W83697HF, Ё  ­ «®ЈЁ.
Integrated Technology Express : IT8705F, IT8712F, IT8716F, Ё  ­ «®ЈЁ.
SiS : sis950 ( ­ «®Ј IT8705F)
”г­ЄжЁЁ ¬®­Ёв®аЁ­Ј  ⥬ЇҐа вгал ¬®¦­® Їа®ўҐаЁвм ў Windows ­  н¬г«пв®аҐ KlbrInWin, ¤«п нв®Ј®
­Ґ®Ўе®¤Ё¬® ў д ©«Ґ ­ бв஥Є ­ ЇЁб вм EnablePorts 295 296
’Ґбвл :
’Ґбвл ®аЁҐ­вЁа®ў ­л ­  Їа®жҐбб®ал P5, P6, K6 Ё K7, ®б­®ў ­л ­  Robert Redelmeier's CPUburn
[http://pages.sbcglobal.net/redelm/]. –«п вҐбвЁа®ў ­Ёп Pentium 4, ४®¬Ґ­¤го вҐбв ¤«п K7, ¤«п
®бв «м­ле Їа®жҐбб®а®ў Ї®¤ЎҐаЁвҐ Ї® ¬ ЄбЁ¬ «м­®© ⥬ЇҐа вгॠ(­ ЇЁиЁвҐ ¬­Ґ ®Ў н⮬).
‚­Ё¬ ­ЁҐ! Џа®Ја ¬¬  ­Ґ ॠЈЁагҐв ­  ЄаЁвЁзҐбЄЁ© Ї®а®Ј ⥬ЇҐа вгал, Ї®н⮬㠤«п Ё§ЎҐ¦ ­Ёп
Ї®азЁ ®Ў®а㤮ў ­Ёп ­Ґ ®бв ў«п©вҐ § Їг襭­л© вҐбв ЎҐ§ ЇаЁб¬®ва ! бўп§Ё б а §«ЁзЁҐ¬ ў
ॠ«Ё§ жЁЁ дг­ЄжЁЁ 18-2, ¤«п Menuet Ё Kolibri ­Ґ®Ўе®¤Ё¬л а §«Ёз­лҐ ॠ«Ё§ жЁЁ Їа®Ја ¬¬л, Ї®
㬮«з ­Ёо Є®¬ЇЁ«ЁагҐвбп ¤«п Kolibri 0.5.8.0, ЇаЁ ­Ґ®Ўе®¤Ё¬®бвЁ Ё§¬Ґ­ЁвҐ Їа®жҐ¤гаг stop_test ў
system.inc. ’Ґбвл а Ў®в ов ®¤Ё­ Є®ў® нд䥪⨢­® Є Є ­  ॠ«м­®¬ ®Ў®а㤮ў ­ЁЁ, в Є Ё ­ 
ўЁавг «м­ле ¬ иЁ­ е.
Ќ  Ўг¤г饥 :
Ќ®ўлҐ зЁЇл
ђҐ ЄжЁп ­  ЄаЁвЁзҐбЄЁ© Ї®а®Ј ⥬ЇҐа вгал
Џа®ўҐЄ  ­ ¤с¦­®бвЁ б奬 ЇЁв ­Ёп
Ћб®Ў п Ў« Ј®¤ а­®бвм ўбҐ¬ гз бв­ЁЄ ¬ д®аг¬ .
Ќ ©¤Ґ­­лҐ ®иЁЎЄЁ Ё ЇаҐ¤«®¦Ґ­Ёп ЇЁиЁвҐ ў д®аг¬ Ё«Ё ­  Ї®звг.
‚Ќ€ЊЂЌ€… !!! ‚Ћ‡ЊЋ†ЌЂ ЏЋђ—Ђ ЋЃЋђ“–Ћ‚ЂЌ€џ!
€‘ЏЋ‹њ‡“‰’… ЌЂ ‘‚Ћ‰ ‘’ђЂ• € ђ€‘Љ!
Џа®Ја ¬¬  а бЇ®бва ­пҐвбп "as is", Ё  ўв®а ­Ґ ­ҐбҐв ®вўҐвб⢥­­®бвЁ §  ў®§¬®¦­л© гйҐаЎ, ЇаЁзЁ­Ґ­­л©
Їа®Ја ¬¬®©.

View File

@ -161,7 +161,7 @@ multiplier:
; out : CL = êîýôô.óìíîæåíèÿ * 10, èëè 0 ; out : CL = êîýôô.óìíîæåíèÿ * 10, èëè 0
xor ecx, ecx xor ecx, ecx
if (OS_version >= 0x0510) if (OS_version >= 0x0510)
display nl, 'Multiplier : yes' display nl, 'Multiplier (RDMSR) : yes'
cmp dword [Vendor + 8], 'cAMD' ; Check for Advanced Micro Devices CPU cmp dword [Vendor + 8], 'cAMD' ; Check for Advanced Micro Devices CPU
jne noAMD jne noAMD
cmp byte [CPU_fam], 5 cmp byte [CPU_fam], 5
@ -369,3 +369,26 @@ uglobal
Data_String: times 20 db 0 ; ASCIIZ ñòîðêà ñ ïðåîáðàçîâàííûì ÷èñëîì Data_String: times 20 db 0 ; ASCIIZ ñòîðêà ñ ïðåîáðàçîâàííûì ÷èñëîì
endg endg
;-------------------------------------------------------------------- ;--------------------------------------------------------------------
ReservePorts:
; In : ecx - first port, edx - last port
; Out : CF = 1 if error
pusha
mov eax, 46
xor ebx, ebx
int 0x40
clc
test eax, eax
jz @f
stc
@@: popa
ret
FreePorts:
; In : ecx - first port, edx - last port
pusha
mov eax, 46 ; îñâîáîæäàåì 0x295 è 0x296 ïîðòû
xor ebx, ebx
inc ebx
int 0x40
popa
ret

View File

@ -1,6 +1,6 @@
mov edx, msg_about mov edx, msg_about
mov ebx, 17 * 65536 + 265 mov ebx, 17 * 65536 + 285
call show_text call show_text
jmp end_drow_tab jmp end_drow_tab
@ -12,10 +12,10 @@ msg_about mls \ ;
'Supported SuperIO : W83627HF,W83697HF',\ 'Supported SuperIO : W83627HF,W83697HF',\
' W83627THF,W83627THF-A,W83627EHF-A,',\ ' W83627THF,W83627THF-A,W83627EHF-A,',\
' W83637THF,IT8705F,IT8712F,SiS950',\ ' W83637THF,IT8705F,IT8712F,SiS950',\
' ABIT uGuru',\
'',\ '',\
'Tests based on R.J.Redelmeier CPUBurn',\ 'Tests based on R.J.Redelmeier CPUBurn',\
'',\ '',\
'Mailto : ghost.nsk@mail.ru',\ 'Mailto : ghost.nsk@mail.ru',\
'',\ '',\
'',\
' *** Use at YOUR own RISK ***' ' *** Use at YOUR own RISK ***'

View File

@ -6,7 +6,7 @@
; Âðåìÿ îáíîâëåíèÿ ; Âðåìÿ îáíîâëåíèÿ
mov eax, 8 mov eax, 8
mov ebx, 200 * 65536 + 15 mov ebx, 200 * 65536 + 15
mov ecx, 260 * 65536 + 15 mov ecx, 280 * 65536 + 15
mov edx, 11 mov edx, 11
mov esi, tcol mov esi, tcol
int 0x40 int 0x40
@ -16,13 +16,13 @@
int 0x40 int 0x40
mov eax, 4 mov eax, 4
mov ebx, 17 * 65536 + 265 mov ebx, 17 * 65536 + 285
mov edx, msg_cf_utime mov edx, msg_cf_utime
mov ecx, 0x10000000 mov ecx, 0x10000000
mov esi, 11 mov esi, 11
int 0x40 int 0x40
mov ebx, 205 * 65536 + 265 mov ebx, 205 * 65536 + 285
mov edx, msg_cf_pm mov edx, msg_cf_pm
xor ecx, ecx xor ecx, ecx
mov esi, 4 mov esi, 4
@ -30,14 +30,14 @@
mov ecx, [update_time] mov ecx, [update_time]
call digit_len call digit_len
mov edx, 160 * 65536 + 265 mov edx, 160 * 65536 + 285
xor esi, esi xor esi, esi
mov eax, 47 mov eax, 47
int 0x40 int 0x40
; Ðàññòàâëÿåì äâîåòî÷èÿ ; Ðàññòàâëÿåì äâîåòî÷èÿ
mov eax, 4 mov eax, 4
mov ebx, 152 * 65536 + 265 mov ebx, 152 * 65536 + 285
mov edx, dub_p mov edx, dub_p
mov esi, 1 mov esi, 1
mov ecx, 0x10000000 mov ecx, 0x10000000

View File

@ -8,16 +8,16 @@
; Ïèøåì ïàðàìåòðû ; Ïèøåì ïàðàìåòðû
mov edx, lab_info_tab mov edx, lab_info_tab
mov ebx, 17 * 65536 + 265 mov ebx, 17 * 65536 + 285
call show_text call show_text
; Ïèøåì ïðîèçâîäèòåëÿ ïðîöåññîðà ; Ïèøåì ïðîèçâîäèòåëÿ ïðîöåññîðà
mov edx, Vendor mov edx, Vendor
mov esi, 12 mov esi, 12
mov ebx, 160 * 65536 + 265 mov ebx, 160 * 65536 + 285
int 0x40 int 0x40
; Ïîääåðæêà MMX ; Ïîääåðæêà MMX
mov ebx, 160 * 65536 + 275 mov ebx, 160 * 65536 + 305
mov esi, 3 mov esi, 3
mov edx, msg_yes mov edx, msg_yes
cmp byte[CPU_mmx], 1 cmp byte[CPU_mmx], 1
@ -25,20 +25,40 @@
mov edx, msg_no mov edx, msg_no
mmx_en: int 0x40 mmx_en: int 0x40
; ×èï ìîíèòîðèíãà ; ×èï ìîíèòîðèíãà
int 0x40
mov edx, [hwm_chip_name] mov edx, [hwm_chip_name]
mov al, byte[edx] mov al, byte[edx]
movzx esi, al movzx esi, al
inc edx inc edx
mov ebx, 160 * 65536 + 285 mov ebx, 160 * 65536 + 315
mov al, 4 mov al, 4
int 0x40 int 0x40
; ×àñòîòà ïðîöåññîðà
mov eax, 18
mov ebx, 5
int 0x40
push eax
fild dword[esp]
push 1000;000
fidiv dword[esp]
fidiv dword[esp]
fstp dword[esp]
mov esi, esp
call ftoa
mov ebx, 160 * 65536 + 295
mov edx, Data_String
mov eax, 4
mov esi, 7
xor ecx, ecx
int 0x40
pop eax
pop eax
; Ñåìåéñòâî è ìîäåëü ïðîöåññîðà ; Ñåìåéñòâî è ìîäåëü ïðîöåññîðà
mov eax, 47 mov eax, 47
mov ebx, 0x10100 mov ebx, 0x10100
xor ecx, ecx xor ecx, ecx
mov cl, [CPU_fam] mov cl, [CPU_fam]
mov edx, 250 * 65536 + 265 mov edx, 250 * 65536 + 285
xor esi, esi xor esi, esi
int 0x40 int 0x40
mov cl, [CPU_mod] mov cl, [CPU_mod]
@ -57,7 +77,7 @@ mmx_en: int 0x40
fstp dword[esp] fstp dword[esp]
mov esi, esp mov esi, esp
call ftoa call ftoa
mov ebx, 160 * 65536 + 295 mov ebx, 160 * 65536 + 325
mov edx, Data_String mov edx, Data_String
mov eax, 4 mov eax, 4
mov esi, eax mov esi, eax
@ -74,17 +94,17 @@ if (OS_version >= 0x0530)
mov ecx, eax mov ecx, eax
call digit_len call digit_len
mov eax, 47 mov eax, 47
mov edx, 160 * 65536 + 305 mov edx, 160 * 65536 + 335
xor esi, esi xor esi, esi
int 0x40 int 0x40
end if end if
; Ðàññòàâëÿåì äâîåòî÷èÿ ; Ðàññòàâëÿåì äâîåòî÷èÿ
mov eax, 4 mov eax, 4
mov ebx, 152 * 65536 + 265 mov ebx, 152 * 65536 + 285
mov edx, dub_p mov edx, dub_p
mov esi, 1 mov esi, 1
mov ecx, 5 ; <- количество строк mov ecx, 6 ; <- êîëè÷åñòâî ñòðîê
nxt_dp: push ecx nxt_dp: push ecx
mov ecx, 0x10000000 mov ecx, 0x10000000
int 0x40 int 0x40
@ -97,6 +117,7 @@ dub_p db ':'
lab_info_tab mls \ lab_info_tab mls \
'CPU Vendor',\ 'CPU Vendor',\
'CPU frequency (MHz)',\
'MMX tehnology',\ 'MMX tehnology',\
'Monitoring chip',\ 'Monitoring chip',\
'Multiplier',\ 'Multiplier',\

View File

@ -21,7 +21,7 @@
; Pentium (P5) button ; Pentium (P5) button
mov eax, 8 mov eax, 8
mov ebx, 17 * 65536 + 145 mov ebx, 17 * 65536 + 145
mov ecx, 277 * 65536 + 25 mov ecx, 297 * 65536 + 25
mov edx, 6 mov edx, 6
mov esi, tcol mov esi, tcol
cmp byte[Vendor + 11], 'l' cmp byte[Vendor + 11], 'l'
@ -70,7 +70,7 @@ k7n: int 0x40
; mmxn: int 0x40 ; mmxn: int 0x40
; Ïèøåì íàçâàíèÿ êíîïîê ; Ïèøåì íàçâàíèÿ êíîïîê
mov eax, 4 mov eax, 4
mov ebx, 30 * 65536 + 287 mov ebx, 30 * 65536 + 307
mov esi, 7 mov esi, 7
mov edx, tmsg_p ; P5 mov edx, tmsg_p ; P5
mov ecx, 0x10000000 mov ecx, 0x10000000
@ -78,14 +78,14 @@ k7n: int 0x40
jne nr1 jne nr1
mov ecx, 0x10FF0000 mov ecx, 0x10FF0000
nr1: int 0x40 nr1: int 0x40
mov ebx, 30 * 65536 + 287 + 27 mov ebx, 30 * 65536 + 307 + 27
mov esi, 20 ; P6 mov esi, 20 ; P6
mov ecx, 0x10000000 mov ecx, 0x10000000
cmp byte[test_id], 7 cmp byte[test_id], 7
jne nr2 jne nr2
mov ecx, 0x10FF0000 mov ecx, 0x10FF0000
nr2: int 0x40 nr2: int 0x40
mov ebx, 30 * 65536 + 287 + 27 + 27 mov ebx, 30 * 65536 + 307 + 27 + 27
mov edx, tmsg_k6 ; K6 mov edx, tmsg_k6 ; K6
mov esi, 13 mov esi, 13
mov ecx, 0x10000000 mov ecx, 0x10000000
@ -93,7 +93,7 @@ nr2: int 0x40
jne nr3 jne nr3
mov ecx, 0x10FF0000 mov ecx, 0x10FF0000
nr3: int 0x40 nr3: int 0x40
mov ebx, 30 * 65536 + 287 + 27 + 27 + 27 mov ebx, 30 * 65536 + 307 + 27 + 27 + 27
mov edx, tmsg_k7 ; K7 mov edx, tmsg_k7 ; K7
mov esi, 15 mov esi, 15
mov ecx, 0x10000000 mov ecx, 0x10000000
@ -101,7 +101,7 @@ nr3: int 0x40
jne nr4 jne nr4
mov ecx, 0x10FF0000 mov ecx, 0x10FF0000
nr4: int 0x40 nr4: int 0x40
; mov ebx, 30 * 65536 + 287 + 27 + 27 + 27 + 27 ; mov ebx, 30 * 65536 + 307 + 27 + 27 + 27 + 27
; mov edx, tmsg_mmx ; MMX ; mov edx, tmsg_mmx ; MMX
; mov esi, 12 ; mov esi, 12
; mov ecx, 0x10000000 ; mov ecx, 0x10000000
@ -111,12 +111,12 @@ nr4: int 0x40
; nr5: int 0x40 ; nr5: int 0x40
; recommendate ; recommendate
mov ecx, 0x10000000 mov ecx, 0x10000000
mov ebx, 190 * 65536 + 400 mov ebx, 190 * 65536 + 420
mov edx, tmsg_rec mov edx, tmsg_rec
mov esi, 14 mov esi, 14
int 0x40 int 0x40
; read about ; read about
mov ebx, 30 * 65536 + 262 mov ebx, 30 * 65536 + 282
mov edx, tmsg_war mov edx, tmsg_war
mov esi, 34 mov esi, 34
mov ecx, 0x10FF0000 mov ecx, 0x10FF0000
@ -124,7 +124,7 @@ nr4: int 0x40
; recommendate color ; recommendate color
mov eax, 13 mov eax, 13
mov ebx, 170 * 65536 + 10 mov ebx, 170 * 65536 + 10
mov ecx, 398 * 65536 + 10 mov ecx, 418 * 65536 + 10
mov edx, atcol mov edx, atcol
int 0x40 int 0x40