From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,7b6ba2262aaeae72,start X-Google-Attributes: gid111c93,public From: acher@informatik.tu-muenchen.de (Georg Acher) Subject: How to access PCI-memory in user code??? Date: 1998/08/12 Message-ID: <6qrog4$dps$1@sunsystem5.informatik.tu-muenchen.de>#1/1 X-Deja-AN: 380348406 Distribution: world Organization: Technische Universitaet Muenchen, Germany Newsgroups: comp.os.linux.alpha Originator: acher@hphalle4.informatik.tu-muenchen.de Hi, while trying to get the Direct Grafics Access of Xfree to work (first bug seems to be a corrupt libxf86dga, compiling helps), I came across the problem, that neither the DGA-lib nor me can access the video memory directly. What libxf86dga does, is to query the PCI-address of the video memory from the X-server and then mmap it into user space. This works OK on x86, but not on Alpha. I've reduced it to the the simple open("/dev/mem"),mmap(..., HW-address)-frame, but that gives strange results: /proc/pci tells me the address of the video memory is at 0x98000000, so I mmap it. On a read of the mapped space I get a CIA-machine check (unknown exception) with a dump of about 128K data (takes about 10secs to scroll, a bit too much info ;-) on writes the total system crashes after a few tries with 'Killing interrupt handler'... So the 0x98000000 is obviously not correct ;-) But what is the right address to mmap? I've read IO-mapping.txt, cia.h etc. but I didn't found any hint, how to do it in user space. Please enlighten me... -- Bye Georg Acher, acher@informatik.tu-muenchen.de http://www.informatik.tu-muenchen.de/~acher/ "Oh no, not again !" The bowl of petunias