Linux device driver 3 ±Ê¼Ç Ö® ÄÚ´æÓ³Éä
½ñÌì×Ô¼ºÑ§Ï° LinuxÉ豸Çý¶¯³ÌÐò µÚÈý°æ µÚ15Õ ÄÚ´æÓ³ÉäºÍDMA. ¸Ð¾õÓеã³ÔÁ¦¡£Ö÷ÒªÊǶÔÄÚ´æÓ³ÉäºÜ¶àÊõÓïºÍ¸ÅÄî²»ÊǺÜÇå³þ£¬Àí½âÆðÀ´Óеã·Ñ¾¢¡£
ºóÀ´½áºÏÓ¢ÎÄ԰棬¾²ÏÂÐÄÀ´×Ðϸѧϰ£¬²ÅËãÊÇÓÐÁËÒ»µã½øÕ¹¡£
ÏÖÔÚÔÚÕâÀï×öÒ»¸ö±Ê¼Ç£¬ÒÔ±¸ÒÔºó¸´Ï°Óá£
µÍ¶ËÄÚ´æºÍ¸ß¶ËÄÚ´æ
ÊéÖеÄͼ15-1ÓеãÎóµ¼ÈË¡£Í¼Öн« ÄÚºËÐéÄâµØÖ· ºÍ ÄÚºËÂß¼µØÖ· ·Ö¿ªÁË¡£ÆäʵӦ¸ÃÊDz¢ÔÚÒ»ÆðµÄ¡£
ÄÚºËÐéÄâµØÖ· ÊÇ ÄÚºËÂß¼µØÖ· µÄÒ»¸ö³¬¼¯¡£ ËùÓеÄÄÚºËÂß¼µØÖ·¶¼ÊÇÄÚºËÐéÄâµØÖ·¡£ µ«ÄÚºËÐéÄâµØÖ·²»Ò»¶¨ÊÇÄÚºËÂß¼µØÖ·¡£
ÔÚ32λϵͳÖУ¬ÓÃ32λ×î´óÄܱíʾ4GÄÚ´æ¡£Õâ4G¾ÍÐγÉÁËÐéÄâµØÖ·µÄ·¶Î§¡£Äں˽«Õâ4G×öÁËÒ»¸ö»®·Ö¡£
Ò»°ã½«3G»®¸øÓû§¿Õ¼ä£¬1G»®¸øÄں˿ռ䡣Õâ1G¾ÍÊÇËùνµÄÄں˵ØÖ·¿Õ¼ä¡£Ò²¾ÍÊÇ1GÄÚºËÐéÄâµØÖ·¡££¨×¢ÒâÇ°Ãæ˵ÁË£¬ÄÚºËÐéÄâµØÖ·ÊÇÄÚºËÂß¼µØÖ·µÄ³¬¼¯£©
ÄÚºËÖ»ÄÜ·ÃÎÊÕâ1GµÄÄں˵ØÖ·¿Õ¼ä¡£¶ÔËùÓÐÎïÀíÄÚ´æµÄ·ÃÎÊ£¬¶¼±ØÐëÓ³Éäµ½Õâ1GÄں˵ØÖ·¿Õ¼ä¡£
ÔÚÕâ1GÄں˵ØÖ·¿Õ¼äÖУ¬ÓÐÒ»²¿·ÖµØÖ·ÊÇÓëÎïÀíµØÖ·¾ßÓÐÒ»Ò»¶ÔÓ¦¹ØϵµÄ£¬ËûÃÇÖ®¼äÖ»²»¹ýÊDzîÁËÒ»¸ö¹Ì¶¨µÄÆ«ÒÆÁ¿¡£
Õⲿ·ÖµØÖ·¾ÍÊÇÄÚºËÂß¼µØÖ·ÁË¡£Ò²¾ÍÊÇ˵ÄÚºËÂß¼µØÖ·ÓëÎïÀíÄÚ´æµÄÓ³ÉäÊÇÏßÐԵġ£
¶øÓëÄÚºËÂß¼µØÖ·¶ÔÓ¦µÄÎïÀíÄڴ棬»òÕß˵ͨ¹ýÄÚºËÂß¼µØÖ·Ó³Éäµ½ÎïÀíÄڴ棬¾ÍÊÇËùνµÄµÍ¶ËÄÚ´æ¡£
Ç°Ãæ˵ÁË£¬Äں˵ØÖ·¿Õ¼äÖ»ÓÐ1G£¬ÄÇÆäÖеÄÄÚºËÂß¼µØÖ··¶Î§Ò»¶¨»áÂÔСÓÚ1G¡£ÄÇÔÚÅäÖÃÁ˺ܴóÄÚ´æµÄϵͳÖУ¨³¬¹ý1G£©£¬Óв¿·ÖÄÚ´æ¾Í¿Ï¶¨ÎÞ·¨Í¨¹ýÄÚºËÂß¼µØÖ·À´Ö±½ÓÓ³Éä¡£
Õⲿ·ÖÎÞ·¨Í¨¹ýÄÚºËÂß¼µØÖ·À´Ö±½ÓÓ³ÉäµÄÄÚ´æ¾ÍÊÇ ¸ß¶ËÄÚ´æ¡£
ÄÚºËÖ»ÄÜͨ¹ý×Ô¼ºµÄ1GµÄÄں˵ØÖ·¿Õ¼äÀ´·ÃÎÊÄÚ´æ¡£ÄÇÒª·ÃÎÊÕâЩ¸ß¶ËÄڴ棬¾Í±ØÐë½øÐбØÒªµÄÓ³Éä¡£°Ñ¸ß¶ËÄÚ´æÓ³Éäµ½Äں˵ØÖ·¿Õ¼ä·¶Î§ÄÚ¡£
ÒýÓÃLinux device driver Ò»Êé µÚÈý°æ µÚ15Õ ÖÐ kmap() º¯ÊýµÄ½éÉÜ£º
¶ÔÓڸ߶ËÄڴ棬kmapÔÚרÓõÄÄں˵ØÖ·¿Õ¼ä´´½¨ÌØÊâµÄÓ³Éä¡£¶Ô¸ÃÖÖÓ³ÉäµÄÊýÁ¿ÊÇÓÐÏ޵ġ£
Ò²¼´ÊÇ˵£¬ÄÚºËÔÚÄں˵ØÖ·¿Õ¼ä£¨1G£©Öл®·Ö³öÒ»²¿·Ö£¬×¨ÃÅÓÃÀ´Ó³Éä¸ß¶ËÄÚ´æ¡£
µÈÓÚ˵£¬Õⲿ·ÖÄں˵ØÖ·¿Õ¼äµÄµØÖ·ÊÇËùÓи߶ËÄÚ´æ¹²ÏíµÄ¡£ÒªÓõÄʱºò£¬Í¨¹ýkmap½øÐÐÓ³É䣬ÓÃÍêÁË£¬Í¨¹ýkunmap·µ»¹¡£
ÄÚ´æÓ³Éä ºÍ page struct
Ìáµ½page£¬Ïëµ½µÄÓ¦¸ÃÊÇÎïÀíÄÚ´æ¡£¿ÉÒÔ°ÑpageÀí½â³ÉÎïÀíÄÚ´æµÄÒ»¸öµ¥Î»¡£Äں˲»ÊÇÒÔ×Ö½ÚΪµ¥Î»À´¹ÜÀíÄÚ´æµÄ£¬¶øÊÇÒÔҳΪµ¥Î»À´¹ÜÀíÄÚ´æµÄ¡£
ËùÓеÄpage£¬¶¼ÊÇÖ¸ÎïÀíÄÚ´æ¡£
ÒòΪÄں˵ØÖ·¿Õ¼äÎÞ·¨Ö±½Ó±íʾËùÓеÄÎïÀíÄڴ棬ËùÒÔ½öͨ¹ýÒ»¸öÄÚ´æµØÖ·ÎÞ·¨´ú±íÒ»¸ö
Ïà¹ØÎĵµ£º
´´½¨×ÀÃæͼ±ê
Ä¿Ç°½«ÍøÂçÓ¦ÓÃÀ©Õ¹µ½×ÀÃæÊÇÒ»¸öÇ÷ÊÆ£¬´æÔÚןܶà½â¾ö·½°¸£¬±¾ÎÄÒÔ Mozilla Prism ΪÀý£¬ÀàËƵķ½·¨Í¬ÑùÊÊÓÃÓÚ Google Chrome ¡£
1. µ½ Mozilla Prism µÄÍøÕ¾ÉÏÏÂÔØ Prism£¬µã»÷ Download Now Ö®ºó»áÌáʾÓÐÁ½ÖÖ£¬Ò»ÖÖÊÇÒÔ Mozilla Firefox À©Õ¹µÄ·½Ê½£¬ÊʺÏÒѾ°²×°ÓÐ Firefox µÄÅóÓÑ£»Ò»Ö ......
µÝ¹é²éÕÒÎļþÄÚÈÝ£º
grep -n -ri "slewing" ./
ÔÚµ±Ç°Ä¿Ïµݹé²éÕÒËùÓеÄÎļþ
-i, --ignore-case
Ignore case distinctions  ......
¼¶±ð£º ³õ¼¶
·®Ææ (fanqi@cn.ibm.com), Xseries eServer ¹¤³Ìʦ, IBM TSS China Beijing
2004 Äê 11 ÔÂ 01 ÈÕ
Linux I/O Öض¨ÏòËäÈ»ºÜ¼òµ¥£¬µ«Ôڽű¾±àд¡¢ÏµÍ³¹ÜÀíʱȴҪ³£³£´ò½»µÀ£¬¸ãÇåÆäÖÐʹÓü¼Çɷdz£ÓÐÓá£
Ê×ÏÈ˵һÏÂʲôÊÇI/OÖض¨Ïò£¬ËùνI/OÖض¨Ïò¼òµ¥À´Ëµ¾ÍÊÇÒ»¸ö¹ý³Ì£¬Õâ¸ö¹ý³Ì²¶×½Ò»¸öÎļþ£¬»òÕßÃüÁ³ÌÐò ......
http://hi.baidu.com/j_fo/blog/item/55f4014f1a226937aec3ab01.html
Linux Kernel Thread µÄÌÖÂÛ
2007-05-14 11:45
kernel thread
Gearheads Written by Sreekrishnan Venkateswaran
Thursday, 15 September 2005
Threads are programming abstractions used in concurrent processing. A ke ......
ÒýÓà 2 Â¥ cokeliu µÄ»Ø¸´:
лл! ÇëÎÊÊÇ·ñÿµ÷ÓÃÒ»´Îtasklet_schedule(B task); B taskÈÎÎñ±»¼Óµ½Á´±íÉÏÖ»»á±»Ö´ÐÐÒ»´Î?
Êǵģ¬Ö»±»¼ÓÒ»´Î
µÚÒ»´Îtasklet_schedule(B task)¸øËûÒ»¸ö״̬TASK_STATE_SCHED
×÷±ê¼Ç£¬ÒÔºóµÄtasklet_schedule(B task)»á¼ì²éÕâ¸ö±ê¼Ç
http://os.inf.tu-dresden.de/l4env/doc/html/dde_linux ......