linux 2.6Ô´´úÂëÇé¾°·ÖÎö±Ê¼ÇÖ®ÖжÏÓëÒì³£3
³õʼ»¯ÖжÏÃèÊö·û±í
ÄÚºËÆôÓÃÖжÏÒÔÇ°£¬±ØÐë°Ñidt±íµÄ³õʼµØÖ·×°µ½idtr¼Ä´æÆ÷£¬²¢³õʼ»¯±íÖеÄÿһÏî¡£ÕâÏ×÷ÊÇÔÚ³õʼ»¯ÏµÍ³Ê±Íê³É¡£
intÖ¸ÁîÔÊÐíÓû§Ì¬½ø³Ì·¢³öÒ»¸öÖжÏÐźţ¬ÆäÖµ¿ÉÒÔÊÇ0-255µÄÈÎÒâÒ»¸öÏòÁ¿¡£Òò´Ë¡£ÎªÁË·ÀÖ¹Óû§Í¨¹ýintÖ¸ÁîÄ£Äâ·Ç·¨µÄÖжϺÍÒì³££¬idtµÄ³õʼ»¯±ØÐë·Ç³£Ð¡ÐÄ¡£Õâ¿ÉÒÔͨ¹ý°ÑÖжϻòÕßÏÝÚåÃÅÃèÊö·ûµÄdpl×Ö¶ÎÉèÖóÉ0À´ÊµÏÖ¡£Èç¹û½ø³ÌÊÔͼ·¢³öÆäÖеÄÒ»¸öÖжÏÐźţ¬¿ØÖƵ¥Ôª½«¼ì²é³öcplµÄÊýÖµÓëdplµÄ×Ö¶ÎÓгåÍ»£¬²¢ÇÒ²úÉúÒ»¸ögeneral protectionÒì³£¡£
intelÌṩÁËÈýÖÖÀàÐ͵ÄÖжÏÃèÊö·û£ºÈÎÎñÃÅ£¬ÖжÏÃÅ£¬ÒÔ¼°ÏÝÚåÃÅÃèÊö·û¡£linuxʹÓÃÓëinetl²»Í¬µÄϸĿ·ÖÀàºÍÊõÓ
ÖжÏÃÅ£¨interrupt gate£©ËùÓÐlinuxÖжϴ¦Àí³ÌÐò¶¼Í¨¹ýÖжÏÃż¤»î£¬È«²¿ÏÞÖÆÔÚÄÚºË̬¡£
ϵͳÃÅ£¨system gate£©Óû§Ì¬µÄ½ø³Ì¿ÉÒÔ·ÃÎÊÒ»¸öintelÏÝÚåÃÅdpl×Ö¶ÎΪ3.ͨ¹ýϵͳÃÅÀ´¼¤»îÈý¸ölinuxÒì³£´¦Àí³ÌÐò£¬ÏòÁ¿ÊÇ4,5,128.ÔÚÓû§Ì¬Ï£¬¿ÉÒÔ·¢²¼into,bound,int $0x80ÈýÌõ»ã±àÓïÑÔÖ¸Áî¡£
ϵͳÖжÏÃÅ£¨system interrtup gate£©Äܹ»±»Óû§Ì¬½ø³Ì·ÃÎʵÄintelÖжÏÃÅ£¨ÃŵÄdpl×Ö¶ÎΪ3£©¡£ÓëÏòÁ¿3Ïà¹ØµÄÒì³£´¦Àí³ÌÐòÊÇÓÉϵͳÃÅÖжÏÃż¤»îµÄ£¬ÔÚÓû§Ì¬Ï£¬¿ÉÒÔʹÓûã±àÓïÑÔÖ¸Áîint3.
ÏÝÚåÃÅ£¨trap gate£©Óû§Ì¬µÄ½ø³Ì²»ÄÜ·ÃÎÊÒ»¸öintelÏÝÚåÃÅ£¨ÃŵÄdpl×Ö¶ÎΪ0£©¡£´ó²¿·ÖlinuxÒì³£´¦Àí³ÌÐò¶¼Í¨¹ýÏÝÚåÃÅÀ´¼¤»î¡£
ÈÎÎñÃÅ£¨task gate£©²»Äܱ»Óû§Ì¬½ø³Ì·ÃÎʵÄintelÈÎÎñÃÅ£¨ÃŵÄdpl×Ö¶ÎΪ0£©¡£linux¶Ô“double fault”Òì³£´¦Àí³ÌÐòÊÇÓÉÈÎÎñÃż¤»îµÄ¡£
ÏÂÁÐÌåϵ½á¹¹Ïà¹ØµÄº¯ÊýÓÃÀ´ÔÚidtÖвåÈëÃÅ¡£
ÔÚidtµÄµÚn¸ö±íÏîÖвåÈëÒ»¸öÖжÏÃÅ¡£ÃÅÖеĶÎÑ¡Ôñ·ûÉèÖóÉÄں˴úÂëµÄ¶ÎÑ¡Ôñ·û£¬Æ«ÒÆÁ¿ÉèÖÃΪÖжϴ¦Àí³ÌÐòµÄµØÖ·addr,dpl×Ö¶ÎÉèÖÃΪ0.
void set_intr_gate(unsigned int n, void *addr)
{
_set_gate(idt_table+n,14,0,addr,__KERNEL_CS);
}
ÔÚidtµÄµÚn¸ö±íÏîÖвåÈëÒ»¸öÏÝÚåÃÅ¡£ÃÅÖеĶÎÑ¡Ôñ·ûÉèÖóÉΪÄں˴úÂëµÄ¶ÎÑ¡Ôñ·û£¬Æ«ÒÆÁ¿ÉèÖÃΪÒì³£´¦Àí³ÌÐòµÄµØÖ·addr,dpl×Ö¶ÎÉèÖÃΪ3.
static void __init set_system_gate(unsigned int n, void *addr)
{
_set_gate(idt_table+n,15,3,addr,__KERNEL_CS);
}
ÔÚidtµÄµÚn¸ö±íÏî²åÈëÒ»¸öÖжÏÃÅ¡£ÃÅÖеĶÎÑ¡Ôñ·ûÉèÖóÉÄں˴úÂëµÄ¶ÎÑ¡Ôñ·û£¬Æ«ÒÆÁ¿ÉèÖÃΪÒì³£´¦Àí³ÌÐòµÄµØÖ·addr,dpl×Ö¶ÎÉèÖÃΪ3.
static inline void set_s
Ïà¹ØÎĵµ£º
£¨L2CAPÐÒé¼ò½é£¬L2CAPÔÚBlueZÖеÄʵÏÖÒÔ¼°L2CAP±à³Ì½Ó¿Ú£©
Ò»£ºL2CAPÐÒé¼ò½é£º
Logical Link Control and Adaptation Protocol(L2CAP)
Âß¼Á¬½Ó¿ØÖƺÍÊÊÅäÐÒé (L2CAP) ΪÉϲãÐÒéÌṩÃæÏòÁ¬½ÓºÍÎÞÁ¬½ÓµÄÊý¾Ý·þÎñ£¬²¢Ìṩ¶àÐÒ鹦ÄܺͷָîÖØ×é²Ù×÷¡£L2CAP ³äÐíÉϲãÐÒéºÍÓ¦ÓÃÈí¼þ´«ÊäºÍ½ÓÊÕ×î´ó³¤¶ÈΪ 64K µÄ L2CAP Ê ......
Service Discovery Protocol(SDP)ÌṩһÖÖÄÜÁ¦£¬ÈÃÓ¦ÓóÌÐòÓз½·¨·¢ÏÖÄÄÖÖ·þÎñ¿ÉÓÃÒÔ¼°ÕâÖÖ·þÎñµÄÌØÐÔ¡£
·þÎñ·¢ÏÖÐÒé(SDP»òBluetooth SDP)ÔÚÀ¶ÑÀÐÒéÕ»ÖжÔÀ¶ÑÀ»·¾³ÖеÄÓ¦ÓóÌÐòÓÐÌØÊâµÄº¬Ò⣬·¢ÏÖÄĸö·þÎñÊÇ¿ÉÓõĺÍÈ·¶¨ÕâЩ¿ÉÓ÷þÎñµÄÌØÕ÷¡£SDP¶¨ÒåÁËbluetooth client·¢ÏÖ¿ÉÓÃbluetooth server·þÎñºÍËüÃǵÄÌØÕ÷µÄ·½·¨¡£ ......
tty0£6ÊÇlinux±¾µØÖնˣ¬pts/xÊÇÔ¶³ÌµÇ½ÐèÒªµÄÖնˣ¬±ÈÈçijÈËÒªtelnetµ½ÄãµÄ»ú×Ó£¬¾ÍÐèÒªÄãµÄϵͳÓÐpts/x¡£
»ù±¾¸ÅÄ
¡¡
¡¡1. tty(ÖÕ¶ËÉ豸µÄͳ³Æ):
¡¡¡¡ttyÒ»´ÊÔ´ÓÚTeletypes£¬»òÕßteletypewriters£¬ÔÀ´Ö¸µÄÊǵ紫´ò×Ö»ú£¬ÊÇͨ¹ý´®ÐÐÏßÓôòÓ¡»ú¼üÅÌͨ¹ýÔĶÁºÍ·¢ËÍÐÅÏ¢µÄ¶«Î÷£¬ºóÀ´ÕⶫÎ÷±»¼üÅÌÓëÏÔʾÆ÷È¡´ú ......
ARP (Address Resolution Protocol) ÊÇÓÃÀ´°ÑIPµØַת»¯³É»úÆ÷µÄÍø¿¨ÎïÀíµØÖ·£¨Ó²¼þµØÖ·£©¡£µ±Ò»Ì¨»úÆ÷ÒªÏòÁíÍâһ̨ÎïÀíÉÏÏàÁ¬µÄ»úÆ÷·¢ËÍIP°üµÄʱºò£¬ËüÒªÏȼì²éÒ»ÏÂ×Ô¼ºµÄARP»º´æ£¬ÊÔͼÕÒµ½¶Ô·½µÄÓ²¼þµØÖ·£¬Èç¹ûÕÒ²»µ½µÄ»°£¬°ÑÒª·¢Ë͵ÄIP°ü·ÅÈëµÈ´ý¶ÓÁÐÖУ¬½Ó×Å·¢³öÒ»¸öARPÇëÇ󡣵ȵ½ÊÕµ½ARPÓ¦´ðµÄʱºò£¬¹¹ÔìºÃÔÀ´ÕýÔڵȴ ......