Subject: Memory Mapping graphics registers!
From: [email-masked] (Stefan Dirsch)

22 Jun 1997 07:00:06 -0700
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-2
Content-Transfer-Encoding: 7bit
Original-To: [email-masked]
X-Mailer: ELM [version 2.4 PL24 PGP6]
Original-Sender: [email-masked]

Hi

I'm developping an Xserver under Linux for the GLINT-based display
adapter Gloria-L from Elsa. The board contains the VGA compatible chip 
S3 ViRGE + Glint Delta + Glint 500TX from 3dlabs. The problem is that
on some boards we can't write to the framebuffer under Linux, so I
decided to make some register dumps under Win95 to compare these with
mine under Linux. 

Under Linux you just memory map the linear register space 
(Base:0xF0000000, Size:128k), which simply looks like this:

--
fd = open("/dev/mem", O_RDWR);
base = (pointer)mmap((caddr_t)0, Size,
                     PROT_READ|PROT_WRITE,
                     MAP_SHARED, fd,
                     (off_t)((off_t)Base));
close(fd)
--

Is there a possibility to mmap these registers also under Windows 95
or read them otherwise during the Win95 driver runs? 
Any ideas?

I use the gnu-win32 C Compiler, which contains a "mmap" and "open"
function since Beta 18, but I know there is no "/dev/mem" under
Windows95 ...

Stefan

P.S.: Glint Delta and Glint 500TX use the same control register space.

Windows 95 System Information follows:
--------------------------------------
Display Adapters:
-----------------
Gloria L Properties:    (GLINT 500TX)
--------------------
Interrupt Request       11
Memory Range            F3FC0000 - F3FDFFFF     128k Control Registers 
Memory Range            F2000000 - F2FFFFFF      16M Localbuffer
Memory Range            F1800000 - F1FFFFFF       8M Framebuffer 
Memory Range            F0000000 - F0FFFFFF      16M Localbuffer2 

Standard Display Adapter (VGA) Properties (disabled):   (ViRGE)
----------------------------------------------------
Memory Range            000C0000 - 000C7FFF
Memory Range            000A0000 - 000AFFFF
Memory Range            000B0000 - 000BFFFF
Input/Output Range      03B0 - 03BB
Input/Output Range      03C0 - 03DF
Interrupt Request       11
Memory Range            F4000000 - F7FFFFFF     
			
Other devices:
--------------
Gloria-M/L/XL (DELTA) (working properly):    (GLINT Delta)
-----------------------------------------
Interrupt Request       11
Memory Range            F0000000 - F001FFFF	128k Control Registers  

-- 
PGP Public Key:	http://www.rrze.uni-erlangen.de/~sz0560/pgpkey.html 
-------------------------------------------------------------------------
SNAIL: Stefan Dirsch		EMAIL: [email-masked]
       Am Sandberg 21	 	PHONE: +49 9131 22770
       91088 Bubenreuth	 	FAX:   +49 9131 22770 (tell me in advance)
       Germany		 	HTTP:  http://www.rrze.uni-erlangen.de/~sz0560/
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".