2007-02-02 11:23:31 +01:00
|
|
|
|
;
|
|
|
|
|
; Ghost Monitor - <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> (<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>) <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; Copyright (C) 2005, 2006, 2007 Mihailov Ilia (ghost.nsk@mail.ru)
|
|
|
|
|
; All Right Reserved
|
|
|
|
|
|
2006-11-28 16:54:36 +01:00
|
|
|
|
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
|
; SMBus interface
|
|
|
|
|
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
|
|
2007-02-03 12:09:00 +01:00
|
|
|
|
;include 'smb_nf2.inc'
|
2006-11-28 16:54:36 +01:00
|
|
|
|
|
|
|
|
|
smb_base dd 0 ; IO port base for SMBus acces
|
2024-05-29 13:30:32 +02:00
|
|
|
|
smb_slave dd 0 ; SMBus address for monitoring chip
|
2006-11-28 16:54:36 +01:00
|
|
|
|
|
|
|
|
|
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
|
smbInit:
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> !!!
|
|
|
|
|
; mov dword[IO_Read ], nf2_readb
|
|
|
|
|
; mov dword[IO_Write], nf2_writeb
|
2024-05-29 13:30:32 +02:00
|
|
|
|
|
|
|
|
|
|
2006-11-28 16:54:36 +01:00
|
|
|
|
; See pci_pm.c -> pci_pm_smb_prob
|
2024-05-29 13:30:32 +02:00
|
|
|
|
|
2006-11-28 16:54:36 +01:00
|
|
|
|
|
|
|
|
|
.exit_err:
|
|
|
|
|
stc
|
|
|
|
|
ret
|
|
|
|
|
.exit_ok:
|
|
|
|
|
clc
|
|
|
|
|
ret
|
2024-05-29 13:30:32 +02:00
|
|
|
|
|
2006-11-28 16:54:36 +01:00
|
|
|
|
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
|
; pci_bus_num: db 2 ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
; 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:
|
2024-05-29 13:30:32 +02:00
|
|
|
|
|
2006-11-28 16:54:36 +01:00
|
|
|
|
ret
|
|
|
|
|
;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|