Thanks James,

I think I have enough info now.  Thanks I'll definitely 
email you with any other questions.

Adam

At 10:41 AM 11/4/99 -0500, James Simmons wrote:
>
>On Thu, 4 Nov 1999, Adam Meyerowitz wrote:
>
>> James,
>> 
>> Yes it is an actually video card and I am using fbcon.  In my user space
>> process I have no problem mapping the memory and using it via a pointer.
>
>Your doing a mmap of fb_fix_screeninfo.smem_start in userland. Yes this
>will work. This pointer you retrieve from mmap in userland only works for
>the process that mmapped it. Its the virtual memory address with respect
>to the process. Say you have 2 process that mmap the framebuffer. The
>physical address (fix.smem_start) will be the same but the pointer
>returned from the mmap will be different for each process.  
>
>> However in the rtlinux module, I tried mmap (which was successful) and then
>> once I accessed the pointer the kernel complained.
>
>Can you post the code so I can look at it. I need to see what exactly you
>are trying to do. 
>
>> Are you implying that instead of using mmap on /dev/mem in the rtlinux
module
>> I should be using /dev/fb0 and then do a mmap on that.  
>
>Yes. Wait, are you mmapping in the module itself? You don't need to do
>that.
>
>> Someone suggested using ioremap in the module but that appears to act on
>> io space which is not what I want.
>
>Io space is pci space for machines with a pci bus. You have the normal RAM
>that occupies the lower memory regions of a machine. Then you have the pci
>bus which maps the memory it has on board a pci card into the high address 
>of a system. In theory high enough that its doesn't overlap memory in the
>lower regions. So ioremap maps the memory in pci space to system memory
>space. By the way ioremap works for most buses. I think only sparcs the
>rules are different. So yes you need a ioremap in the fbcon module. Now as
>for your question on how to access that memory. In fbcon their is a
>display struct that is the data structure that interfaces the console
>system with framebuffer drivers. In that struct there exist a screen_base
>which is the ioremap video memory. If you look in fbcon-cfbX you will see
>direct access to the video memory from the kernel. In display their is a
>field called screen_base. This is what you want to use to access the
>framebuffer from the kernel in your driver. If you look at fbcon-cfb32.c
>in function fbcon_cfb32_putc you will see the function places font data
>into the framebuffer using screen_base. So what basically is done their is
>what you will need to do. If you need help just email me.     
>
>
>> Thanks for the help
>> Adam 
>
>
--- [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