LinuxÏÂÈçºÎ°ÑIO¿Õ¼äÓ³Éäµ½Óû§½ø³Ì¿Õ¼ä£¿
ÆäʵÊǸöÂù¼òµ¥µÄÎÊÌâ¡£ÔÚLDD3µÄµÚ15ÕÂÉÏÓÐд£¨¼û“Remapping Specific I/O Regions”ÕâÒ»½Ú£©¡£²»¹ýµ±Ê±×÷ÕßÑ¡ÔñÁËÒ»¸ö´íÎóµÄ×ö·¨£ºÏȰÑÕâ¿éIO¿Õ¼äÓÃioremapÓ³Éäµ½ÁËÄں˿ռ䣬ȻºóÔÚÓû§½ø³Ì·ÃÎʱ»Ó³ÉäµÄµØÖ·Ëù²ú ÉúµÄȱҳÖжÏÀÓÃvmalloc_to_pageµÃµ½page£¬·µ»Ø¸øÓû§½ø³Ì¡£
È»¶ø£¬vmalloc_to_pageû·¨ÓÃÔÚioremapËùµÃµ½µÄµØÖ·ÉÏ£¬ÒòΪIO¿Õ¼ä¸ù±¾¾ÍûÓжÔÓ¦µÄPage½á¹¹£¬·µ»ØµÄpageÖ¸Õë×ÔÈ»ÊDz»¶ÔµÄ¡£
ÕýÈ·µÄ×ö·¨ÊÇÔÚmmapº¯ÊýÀʹÓÃremap_pfn_rangeº¯Êý¡£´úÂëÈçÏ¡£×¢ÒâÒªÉèÖÃÒ»ÏÂvma->vm_pgoffΪÄãÒªmapµÄio¿Õ¼äµÄÎïÀíµØÖ·¶ÔÓ¦µÄÒ³¡£
static int filter_mmap(struct file *filp, struct vm_area_struct *vma)
{
vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
vma->vm_pgoff = ( (u32)map_start >> PAGE_SHIFT);
if (remap_pfn_range(vma,
vma->vm_start,
vma->vm_pgoff,
vma->vm_end-vma->vm_start,
vma->vm_page_prot))
return -EAGAIN;
return 0;
}
Ïà¹ØÎĵµ£º
ÔÎĵØÖ·£ºhttp://wanping.blogbus.com/logs/28663569.html
1¡¢Ê±¼ä´Áת»»ÎªÕý³£ÏÔʾµÄʱ¼ä¸ñʽ
Freebsd
ϵͳÏ£º
ת»»ÃüÁîΪ£º
date -r 1112173761 »òÕߣºdate -r 1112173761 +"%Y-%m-%d %T %z"£¨ÄêÔÂÈյĸñʽ²»Ò»Ñù£©
Linux
ϵͳÏ£º
ת»»ÃüÁdate -d '1970-01-01 UTC 11121 ......
תÖÁ£º http://dev.yesky.com/412/2639912.shtml
¶ÔÓÚÌṩÁËMMU£¨´æ´¢¹ÜÀíÆ÷£¬¸¨Öú²Ù×÷ϵͳ½øÐÐÄÚ´æ¹ÜÀí£¬ÌṩÐéʵµØÖ·×ª»»µÈÓ²¼þÖ§³Ö£©µÄ´¦ÀíÆ÷¶øÑÔ£¬LinuxÌṩÁ˸´ÔӵĴ洢¹ÜÀíϵͳ£¬Ê¹µÃ½ø³ÌËùÄÜ·ÃÎʵÄÄÚ´æ´ïµ½4GB¡£
¡¡¡¡½ø³ÌµÄ4GBÄÚ´æ¿Õ¼ä±»ÈËΪµÄ·ÖΪÁ½¸ö²¿·Ö--Óû§¿Õ¼äÓëÄں˿ռ䡣Óû§¿Õ¼äµØÖ··Ö²¼´Ó0µ½3GB(P ......
Òýµ¼£º
ÈçÐè»ñµÃ¶Ô vmlinux ºÍ zimage Ö®¼äÇø±ðµÄ¼«ºÃ½âÊÍ£¬ÇëÔÚ Alessandro Rubini ±àдµÄ“Kernel Configuration: dealing with the unexpected£¨Linux Magazine£©µÄÒ»ÎÄÖÐÕÒµ½“Booting your kernel”Ò»½Ú¡£
ÓйØÄںˡ¢Ó³ÏñºÍÒýµ¼¹ý³ÌµÄ¸ü¶àÐÅÏ¢£¬ÇëÔĶÁÖÐÑëÀ¥Ê¿À¼´óѧ£¨Central Queensland Universit ......
½Ó´¥linuxʱ¼ä»¹²»ÊǺܳ¤,ºÜ¶àÃüÁî¼Ç²»×¡,ºÇºÇ,Äõ½Ð·þÎñÆ÷¿´ÏÂÓ²ÅÌ·ÖÇø $df –lh Îļþϵͳ ÈÝÁ¿ ÒÑÓà ¿ÉÓà ÒÑÓÃ% ¹ÒÔØµã
/dev/sda1 2.0G ......
Õâ´Îתµ½Á˺½¿ÕµÄÒ»¸öÏîÄ¿£¬ÐèÒªÔÚLinuxÏÂÓÃC×ö¿ª·¢¡£°æ±¾¹ÜÀí²ÉÓÃSVN£¬´Ó×òÌìÏÂÎ翪ʼÎҾͿªÊ¼Á˰²×°£¬ÕæµÄÊÇÍ´¿àµÄ¹ý³Ì¡£ÏÖÔÚµ¹Êǰ²×°ºÃÁË£¬µ«ÊÇÅäÖÃÃüÁûÓÐÕÆÎÕ¡£
Èç¹ûÓÐȨÏÞ´ÓÍøÉÏÖ±½Ó¸üÐÂÈí¼þ£¬ÎÒ²»±ØÃ¿´Î¶¼È¥ÕÒÔ´Âë°ü£¬È ......