On Mon, Jan 10, 2000 at 06:39:25AM -0800, Estabridis, Janet P wrote:
> Hi,
> This is not really a real-time question, but if someone could help I'd
> appreciate it.  Eventually a real-time task will update my video monitor at
> 30 Hz.
> 
> I have kernel 2.0.36 with RTLv1.1.  I am currently trying to get a
> Imagenation ISA video frame grabber  (model CX100-30) with overlay memory up
> and running.  Alessandro Rubini has created a very limited device driver for
> it which does not support video overlay memory.  My task is quite simple, I
> simply need to update some text fields of the video overlay memory.  So, I
> figured that I would do it in user space first to create all the static text
> and see how I need to update the dynamic text in non-real time, then worry
> about real-time and a device driver.
> 
> The card has I/O register that I can control.  The overlay memory (or ram
> memory - they share the same addresses and you select which you want to
> write to via an i/o register) take up 64K (0xFFFF) of address space from
> 0x80000 to 0xF0000.  I have set the card up to be at address 0xA0000 because
> when I used Rubini's device driver there was a routine to check to see where
> there was free space and 0xA0000 and 0xB0000 came up as free.  (I did notice
> in the companies DOS routines that this was also shared with the vga card
> and they turn the vga card off to write to the frame grabber.  But, I have
> e-mailed Rubini and he never mentioned that I needed to do anything like
> that and there was nothing that I could see in his device driver source)  
> 
> In order to get to that address I'm using the mmap routine.
> 
> My mmap is as follows:
> 
> unsigned char * address;
> int         fd;
> 
> address = (unsigned char *) mmap( (void *)0xA0000, 0xFFFF, PROT_READ |
> PROT_WRITE, MAP_FILE | MAP_PRIVATE | MAP_FIXED, fd, 0 );
> 
> This returns successfully and address = 0xA0000. 
> 
> But, if I assign values to this address space  0xA0000 - 0xAFFFF it is as if
> I am not accessing the cards memory at all.  I simply use *address =
> (unsigned char)0xff which should make the overlay pixel a white dot.
> 
> So, am I using mmap wrong ?  Is there something else I need to do to utilize
> this card via Linux ?  Am I doing something stupid and someone out there can
> set me straight ?  Is there a better way to do this ?  HELP !!!!! 
> 

What fd are you using?  Are you doing this from user space?  I can't
possibly see how this would work.

In a driver, you can get the mapped address of ISA himem by using

   ptr = bus_to_virt( 0xa0000 );

If you really want to access the device from user space, you could probably
map /dev/kmem at the appropriate pointer.  To do this, I'd start by looking
at the source for SVGAlib, which does (used to do) a similar mapping for
video cards.

As for kernel drivers, look in drivers/net for examples.  Grep for 0xa0000.
Some older SCSI cards used to use high memory, also.



dave...

--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to