From 7dadbba2bb4c220fcc782154719c890b486105e2 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Thu, 2 Aug 2012 09:05:35 +0000 Subject: [PATCH] last AGP updates git-svn-id: svn://kolibrios.org@2902 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/trunk/drivers/agp.asm | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/kernel/trunk/drivers/agp.asm b/kernel/trunk/drivers/agp.asm index 77a4bfc73e..d6d0fe1ce4 100644 --- a/kernel/trunk/drivers/agp.asm +++ b/kernel/trunk/drivers/agp.asm @@ -16,8 +16,7 @@ format MS COFF DEBUG equ 1 -FAST_WRITE equ 0 -SIDE_BAND_ADDRESSING equ 0 +FAST_WRITE equ 0 ; may cause problems with some motherboards include 'proc32.inc' include 'imports.inc' @@ -150,10 +149,8 @@ proc detect jna .next_bus .error: - if DEBUG mov esi, msgFail call SysMsgBoardStr - end if xor eax, eax inc eax @@ -237,6 +234,7 @@ proc detect stdcall PciRead32, [bus], [devfn], edi ; read AGP status test al, 1 shl 3 jz .agp_2m + test eax, 10b jnz .8x mov [cmd], 01b @@ -259,26 +257,21 @@ if FAST_WRITE call SysMsgBoardStr @@: end if -if SIDE_BAND_ADDRESSING - test ax, 1 shl 9 + + test ax, 1 shl 9 ; Side band addressing jz @f or [cmd], 1 shl 9 mov esi, msgside 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] or eax, 1 shl 8 ; enable AGP stdcall PciWrite32, [bus], [devfn], edi, eax ; write AGP cmd - if DEBUG mov esi, msgOK call SysMsgBoardStr - end if ret