Date: Fri, 22 Mar 1996 13:08:34 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: dwhite@resnet.uoregon.edu Cc: terry@lambert.org, russelld@cpsc.ucalgary.ca, questions@FreeBSD.org Subject: Re: ATI Mach64D Message-ID: <199603222008.NAA03176@phaeton.artisoft.com> In-Reply-To: <Pine.BSF.3.91.960322102825.1431B-100000@riley-net170-164.uoregon.edu> from "Doug White" at Mar 22, 96 10:28:44 am
next in thread | previous in thread | raw e-mail | index | archive | help
> > > > Last night I put together a new Pentium 150 machine for a friend of mine
> > > > with an ATI Mach64D PCI video card.
> >
> > [ ... ]
> >
> > > You need to disable the sio probe. See the FAQ.
> >
> > Where is ATI's web page?
>
> www.atitech.ca
>
> Wacky, eh?
Thank you. After futzing around a bit...
Here is their probe code for their cards.
This code should be integrated into the serial driver probe so that
com3 and com4 can be reeenabled if the Mach card isn't there:
Terry Lambert
terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.
==============================================================================
Application Note
Developer Relations
33 Commerce Valley Drive East
Thornhill, Ontario
Canada L3T 7N6
Tel: (905) 882-2600 extension 6000
Fax: (905) 882-2620^M^G^M^G
Subject: Detecting the Mach32 video adapter
Date: Nov 9, 1992
P/N: APPL0003-01
Detecting the Mach32 can be done in two steps. First, check for the
ATI signature in the Mach32 ROM. The segment value of the ROM address
is required for the check and can be retrieved from register ROM_ADDR_1
(52EEh) which is loaded by the boot ROM code. See the example code
below. The ATI signature is a 9 byte ascii-numeric code ('761295520')
that starts at address rom_segment:0031h. Successful detection of this
code will establish that an ATI video adapter is installed. Second,
write a value to the extended Mach32 register SRC_X (8EE8h). If the
same value can be read back from R_SRC_X (DAEEh), a Mach32 video
adapter has been detected. The following is example code to detect a
Mach32 video adapter:
ati_sig db '761295520', 0
...
; Retrieve rom segment address from 68800 register in ax
mov dx, ROM_ADDR_1 ; 52EEh
in al, dx
and al, 7Fh
mov ah, 0
mov cl, 7
shl ax, cl
add ax, 0C000h
; Check for ATI signature in ROM
push ax
pop es ; load rom_seg into es
mov si, 31h ; signature is at rom_seg:0031h
mov di, offset ati_sig ; compare with ati_sig string
sig_check:
mov al, byte ptr es:[si]
mov ah, byte ptr ds:[di]
inc si
inc di
cmp ah, 0 ; 0 = end of string
je end_check
cmp al, ah
je sig_check
jmp not_found ; not ATI ROM
end_check:
; Check for existence of EXT_FIFO_STATUS register. This
; register is needed to wait for engine idle between SRC_X
; checks. If the register does not exist, an FFFFh will be
; read. This is also the value read back if the register
; exists and the engine FIFO is full (all 16 bit entries
; are set to 1). Therefore, if FFFFh is read the first time,
; wait for about 200 milliseconds (for the FIFO is clear)
; and read the register again.
mov dx, EXT_FIFO_STATUS ; 9AEEh
in ax, dx
cmp ax, 0ffffh
jne reg_ok
; try again after a time delay, FIFO may be full
call delay ; delay should be >= 200 msec
mov dx, EXT_FIFO_STATUS
in ax, dx
cmp ax, 0ffffh
jne reg_ok
jmp not_found ; not found, leave
reg_ok:
; reset the engine
mov dx, SUBSYS_CNTL ; 42E8h
mov ax, 9000h
out dx, ax
mov ax, 500Fh
out dx, ax
; write 555h to SRC_X register. This register is read from R_SRC_X.
mov dx, SRC_X ; 8EE8h
mov ax, 555h
out dx, ax
; wait for engine idle
mov dx, EXT_FIFO_STATUS
wfi1:
in ax, dx
cmp ax, 0
jne wfi1
; attempt to read 555h from SRC_X register value (R_SRC_X)
mov dx, R_SRC_X ; DAEEh
in ax, dx
cmp ax, 555h
jne not_found
; write 2AAh to SRC_X register
mov dx, SRC_X
mov ax, 2aah
out dx, ax
; wait for engine idle
mov dx, EXT_FIFO_STATUS
wfi2:
in ax, dx
cmp ax, 0
jne wfi2
; attempt to read 2AAh from SRC_X register value (R_SRC_X)
mov dx, R_SRC_X
in ax, dx
cmp ax, 2aah
je detected
not_found:
mov ax, 0 ; return of 0 for not found
jmp detect_done
detected:
mov ax, 1 ; return of 1 for detected
detect_done:
==============================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199603222008.NAA03176>
