Forum Discussion
Altera_Forum
Honored Contributor
12 years agoHi,
--- Quote Start --- Now - my mapping needs to be fixed because this buffer is used in a contiguous manner in the firmware. So, I'm assuming that this command WILL adhere to that because I have already allocated this area in my device driver? and I'll use: MAP_FIXED with the address. --- Quote End --- It's possible to use the MAP_FIXED option, but in this case, your application code must know the value of physically mapped address and it affects the portability. To avoid this, 'device file' (e.g. /dev/fb0, etc.) is used and its file descripter is passed to the 'mmap' function as an argument. To regard everything as files is the key concept of Unix(Linux). Of course, to do so, your driver must have several 'file operations' functions. Two files 'fbmem.c' and 'altfb.c' in the directory of 'drivers/video' may be good(?) samples to understand these methodology. Kazu