[prev in list] [next in list] [prev in thread] [next in thread] 

List:       redhat-devel
Subject:    Re: ioremap: How to
From:       Nathan Bryant <nbryant () optonline ! net>
Date:       2003-07-19 17:24:30
[Download RAW message or body]

Have you tried mmap()ing /dev/mem? You would then directly access 
0x10000 - start + base, where base is the address of the virtual memory 
that mmap assigned to your pages, and start is the first address of 
physical memory that you actually specified to map.

You should avoid mapping any more pages than you need, so the addresses 
you specify depend on the physical page size of your processor 
architecture. If you need to write an interrupt handler, or if there are 
other processes in the system that will try to access your display 
device, you must write a kernel device driver.

> hi,
> I want build an application that requires the exact memory address (for 
> LCD display). I use ioremap to achieve that. However, when i try to 
> compile the file, i get the following error.
> 
> implicit declaration of ioremap
> and hence
> unreferenced ioremap
> 
> I assume that this is becuase I can use ioremap only in kernel mode. I 
> have tried using ioperm and iopl, but these work only on intel 
> architecure and my platform does not support this. Nor do i have the 
> device file /dev/port for my platform.
> 
> Is there are any way, I can access and set the memory directly in the 
> user(application) mode ? I do want to avoid building a driver and 
> recompiling with the kernel.
> 
> The source code is as simple as
> #include<asm/io.h>
> void main()
> {
>  ioremap(0x10000,100);
> }
> 


_______________________________________________
Redhat-devel-list mailing list
Redhat-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/redhat-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic