forked from KolibriOS/kolibrios
last AGP updates
git-svn-id: svn://kolibrios.org@2902 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
3ee5118adc
commit
7dadbba2bb
@ -16,8 +16,7 @@
|
|||||||
format MS COFF
|
format MS COFF
|
||||||
|
|
||||||
DEBUG equ 1
|
DEBUG equ 1
|
||||||
FAST_WRITE equ 0
|
FAST_WRITE equ 0 ; may cause problems with some motherboards
|
||||||
SIDE_BAND_ADDRESSING equ 0
|
|
||||||
|
|
||||||
include 'proc32.inc'
|
include 'proc32.inc'
|
||||||
include 'imports.inc'
|
include 'imports.inc'
|
||||||
@ -150,10 +149,8 @@ proc detect
|
|||||||
jna .next_bus
|
jna .next_bus
|
||||||
|
|
||||||
.error:
|
.error:
|
||||||
if DEBUG
|
|
||||||
mov esi, msgFail
|
mov esi, msgFail
|
||||||
call SysMsgBoardStr
|
call SysMsgBoardStr
|
||||||
end if
|
|
||||||
|
|
||||||
xor eax, eax
|
xor eax, eax
|
||||||
inc eax
|
inc eax
|
||||||
@ -237,6 +234,7 @@ proc detect
|
|||||||
stdcall PciRead32, [bus], [devfn], edi ; read AGP status
|
stdcall PciRead32, [bus], [devfn], edi ; read AGP status
|
||||||
test al, 1 shl 3
|
test al, 1 shl 3
|
||||||
jz .agp_2m
|
jz .agp_2m
|
||||||
|
|
||||||
test eax, 10b
|
test eax, 10b
|
||||||
jnz .8x
|
jnz .8x
|
||||||
mov [cmd], 01b
|
mov [cmd], 01b
|
||||||
@ -259,26 +257,21 @@ if FAST_WRITE
|
|||||||
call SysMsgBoardStr
|
call SysMsgBoardStr
|
||||||
@@:
|
@@:
|
||||||
end if
|
end if
|
||||||
if SIDE_BAND_ADDRESSING
|
|
||||||
test ax, 1 shl 9
|
test ax, 1 shl 9 ; Side band addressing
|
||||||
jz @f
|
jz @f
|
||||||
or [cmd], 1 shl 9
|
or [cmd], 1 shl 9
|
||||||
mov esi, msgside
|
mov esi, msgside
|
||||||
call SysMsgBoardStr
|
call SysMsgBoardStr
|
||||||
@@:
|
@@:
|
||||||
end if
|
|
||||||
add edi, 4
|
|
||||||
mov eax, [cmd]
|
|
||||||
stdcall PciWrite32, [bus], [devfn], edi, eax ; write AGP cmd
|
|
||||||
|
|
||||||
|
add edi, 4
|
||||||
mov eax, [cmd]
|
mov eax, [cmd]
|
||||||
or eax, 1 shl 8 ; enable AGP
|
or eax, 1 shl 8 ; enable AGP
|
||||||
stdcall PciWrite32, [bus], [devfn], edi, eax ; write AGP cmd
|
stdcall PciWrite32, [bus], [devfn], edi, eax ; write AGP cmd
|
||||||
|
|
||||||
if DEBUG
|
|
||||||
mov esi, msgOK
|
mov esi, msgOK
|
||||||
call SysMsgBoardStr
|
call SysMsgBoardStr
|
||||||
end if
|
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user