From: Bipin T S <bi...@lg...> - 2001-04-06 07:39:20
|
Hi, > We are using a Walnut board with a PPC processor. We don't have a graphics chip/card in this board and so we planned to use the virtual > frame buffer concept for debugging and testing the frame buffer system. We build the kernel with the virtual frame buffer enabled in Console > drivers and we gave video = vfb:enable (Thanks to Simmons) in the command line options. 1) We tried giving echo "Hello World" > /dev/fb0. It works fine. 2) We wrote an application that mmaps the /dev/fb0 into user memory. This works fine and mmap() returns a valid address fb = open("/dev/fb0", O_RDWR); addr =(unsigned char*) mmap(NULL, size, PROT_READ|PROT_WRITE, MAP_SHARED, fb, 0); 3) But when we try to write something into the MAPPED address, we get a segmentation fault!! *( addr + 10) = 20; We would like to know the reason for the above behaviour. Pointers and references will be appreciated Thanks and regards Bipin |