The Linux Plug-and-Play HOWTO ���媩
�@��: David S.Lawyer [1]
[email protected]
��: ���J�� [2]
[email protected]
v0.00, November 1998
_________________________________________________________________
���U�A�z�ѩM�ϥ� PnP �]��. �p��ϧA�� Linux �� PnP. �Ĥ@�Ӫ����O����
�㪺, ���]�\��A����.
_________________________________________________________________
1. ����
* 1.1 ���v, �Ӽ�, ����O, �M �H��
* 1.2 ���ӭp��: �A�]�i�H����
* 1.3 �� HOWTO ���s����
2. PnP ���: ���t "�귽"
* 2.1 ����O Plug-and-Play (PnP)?
* 2.2 �p���p���]��(�M �ϹL��)
* 2.3 IRQ's -- ���z
* 2.4 DMA �q�D
* 2.5 Memory �q
* 2.6 ��� "�귽"
* 2.7 ���D
3. Plug-and-Play (PnP) �ѨM���
* 3.1 ����
* 3.2 Linux �ݭn PnP
* 3.3 �`�u���D
* 3.4 �]�m PnP BIOS
4. �p���I PnP �d
* 4.1 ����
* 4.2 �T�� PnP ?
* 4.3 BIOS �t�m PnP
* 4.4 Isapnp
* 4.5 �ɮ֤�� Linux �� PnP
* 4.6 PnP �n��M���
5. ����
* 5.1 �a�}
* 5.2 ���_ -- �ԭz
* 5.3 Isolation
_________________________________________________________________
1. ����
1.1 ���v, �Ӽ�, ����O, �M �H��
���p�`�Ьݭ��
���v
Copyright (c) 1998 by David S. Lawyer. Please freely copy and
distribute (sell or give away) this document. You may create
derivative works and distribute them provided you:
I. For the case of minor changes and corrections where there exists a
current maintainer:
Send your proposed changes to the current maintainer first. You may
distribute (per II. below) only if the current maintainer neglects to
incorporate your changes in a timely manner. If the changes are only
to correct typos, you need not wait for a reply from the maintainer
before you distribute.
II. In all other cases:
1. Make a good faith effort to insure that a copy of the derivative
work (including any master copy) gets on the Internet at a
well-known (and mirrored) site for free downloading.
2. If you change the license, license the work in the spirit of this
license, or use GPL (Free Software Foundation).
3. The major authors become the copyright owners (not to exceed 2).
Minor contributions do not make you an author.
4. Make a good faith effort to contact the maintainer (or copyright
owners if there is no maintainer) to let them know what you have
done. If the changes are extensive, then you should also attempt
to make more such contacts (including prior to your project).
5. Give full credit to significant previous authors and contributors
although the credits section need not exceed 1% of the length of
the document.
�Ӽ�
If certain words are trademarks, the context should make it clear to
whom they belong. For example "MS Windows" (or just "Windows") implies
that "Windows" belongs to Microsoft (Micro$oft).
����O
Much of the info in this HOWTO was obtained from Serial-HOWTO, the
Internet, sales clerks, etc. and may be unreliable. While I haven't
intentionally tried to mislead you, there are likely a number of
errors in this document. Please let me know about them. Since this is
free documentation, it should be obvious that neither I nor previous
authors can be held legally responsible for any errors.
1.2 ���ӭp��: �A�]�i�H����
�Чi�D�ڧA���غطQ�k. �������`�N, �p�G�A�⤤�������O�@�Ӥ�H�e��, �Ь�
�O�_���s����.
�� HOWTO �Ĥ@�Ӫ���, 0.00, �ڬƦܨS���ݮ�: PnP ��t���c, �]�ä������z��
PnP. �]�S����G�ӧ� Linux �ܦ� PnP �ާ@�t�Ϊ��ɤB�����P. �ڤ��|�R����
� BIOS �p��]�m PnP(�n���ɤB�p�F). �� HOWTO �O�����㪺�åB�i��
�����T(���p�ڿ��F, �Чi�D��). �b�� HOWTO ���ڨϥ� ?? �Ӫ�ܧڤ����D��
��. �A�Q��i(���g)�M���@�� HOWTO ��? �ڥ��b��H.
1.3 �� HOWTO ���s����
�� HOWTO ���s�����i�H�b LDP ���蹳���I�W���. ������
[3]
http://sunsite.unc.edu/LDP/mirrors.html, ��A���@�Ӫ��蹳���I
��, �I�� "Linux Documentation Project" (LDP), �b�䥦�榡 HOWTO ����. �p
�G�A�ȶȷQ���D�̷s��������, �A�����ϥ��蹳���I, ��
[4]
http://sunsite.unc.edu/LDP/HOWTO/Plug-and-Play-HOWTO.html �Y�i.
2. PnP ���: ���t "�귽"
2.1 ����O Plug-and-Play (PnP)?
Plug-and-Play �N�O�۰ʰt�m(�C�h)�p���������d�M��L�]��, �M��i�D��
���]�Ƴ����F����. Plug-and-Play ����ȬO�⪫�z�]�ƩM�n��(�]���X�ʵ{��)
�۰t�X, �þާ@�]��, �b�C�ӳ]�ƩM�����X�ʵ{�Ǥ����إ߳q�H�q�D. ���ػ�
�k, PnP ���t�U�C�귽���]�ƩM�w��: I/O �a�}, IRQ, DMA �q�D, ���s�q. ���p
�A���z�ѳo 4 ��, �ݤU����. �@���o�Ǹ귽�Q���t, �]��(�W�r�b /dev �ؿ�
��)�N��Ʀn�Q�ϥ�(�խY�o�Ǫ��z�]�Ʀb�A�� PC ��).
PnP �t�m�귽, ���ȬO�@�w�{�פW���t�m�귽. �ɺިϥΤF PnP, �\�h�]�Ƥ���
�O�Q PnP �Ӱt�m. �p�ը�ѽվ����t�m, 'init string' �Q�q�L I/O �a�}�q�D
�e���ը�ѽվ�, �ɺ� I/O �a�}�q�D�O�� PnP ���t��, �� 'init string' �P
PnP �L�. �]�m��f���t�O�ѥΤ���{�ǨӰ����Ӥ��� PnP. �ҥH���_
PnP ���ɭ�, '�귽'�N���۸귽�����@����, '�t�m'�N���۬Y��������t�m.
2.2 �p���p���]��(�M �ϹL��)
�p���]�A CPU �ӹB��, ���s�Ӧs�x�{�ǩM�ƾ�. �٦��@�dz]��, �p�ϽL�X��
��, ��ܥd, ��L, ��d, modem �d, �n�d, ��f�M�}�f, ����. �٦��q������
�q��, �D�O�W���U��`�u��]�ƩM CPU �s�b�@�_, ���c�⥦�̸˰_��.
�L�h, �\�h�]�Ƴ��O���d(�L��u��O). ����, ���F���d���~, �\�h�]�Ƥw�g�p
��@����Q���b�D���W. �D���W�����d�]�\�]�t����@�ӳ]��. ���s���ɤ]�Q
�{���O�]�Ʀ����O�� HOWTO ���� plug-and-play.
�p���n���`�u�@, �C�ӳ]�ƥ����b�����X�ʵ{��(���]�O�ާ@�t�Ϊ��@����,
�bCPU�W�B��)����U�B��. �X�ʵ{�ǻP /dev �ؿ��U���S����p�t�b�@�_, ��
�ޥL�̤��O�u�������. ���̦��H hda1, ttyS0, eth1 ���o�˪��W�r. �·Ъ��O
��ܯS��]�ƪ��X�ʵ{��, �N�� eth1 �a, �̿�_�A�ϥΪ���d�����. �o��
eht1 �N�����t�����F�i�H�ϧA�w�˪���d���`�u�@���X�ʵ{�ǥ~���䥦�X�ʵ{
��. ���F����]��, CPU (�b�X�ʵ{�Ǫ�����U)�V�]�Ƶo�e�R�O�M�q�]��Ū���H
��. �n�o�˰�, �C�ӳ]���X�ʵ{�ǥ������D�]�ƪ����f�a�}, ��p�Τ_�q�H���a
�}. ���D�o�˪��a�}�N�p�P�إߤF�@���q�H�q�D, �Y�ϳo�ӳq�D�O PC �����\�h
�]�Ʀ@�ɪ��ƾ�`�u.
PC �� 3 ��a�}�Ŷ�: ���s, I/O, �M�t�m(�ȭ��_ PCI �`�u). �u���e���(��
�s, I/O)�Q PnP �t�m. �b PC ���o3��������a�}�@�ɦP�˪��`�u. (�t�~: ��_
PCI �`�u, ���Τ_�ǿ�ƾ�). ���O�ѯS�w�q��ӧi�D�]�Ʀa�}�O�b I/O �Ŷ���
�b���s�Ŷ�.(Ķ�̪`: ���N�O�`�u����q������s�ϯ�u, ���� 0 �q��
��, ��ܷ�e�a�}�O���s�a�}, �� 1 �q����, ��ܷ�e�a�}�O I/O �a�}.) �]��
�q�`�ϥ� I/O �a�}�Ŷ�. ���t I/O �a�}�D�n����B.
1. �]�m���d�� I/O �a�},��.(���d�H�s���a�}�����@��)
2. ��]���X�ʵ{�Ǫ��D�o�� I/O �a�}.
�ĤT�B�O�b /dev �ؿ������]�ƩM�����X�ʵ{�Ǩ��@�ӦW�r, �p hda, ttyS0, ��
eth1. �e��B�N�H�ѨM�b�@����D�W��Y�H����v���X�����D. �A�������D��v
���X�åB�Y�H�����⸹�X��b��v�e��, �A�~�i�H��쥦. �b�p����, �X�ʵ{
�ǥ������D���f�a�}, �åB�w���]�m���ۦP���a�}, ��M�o�Ǧa�}���O���d
�H�s���a�}�����@��. �o��˳��n��, ���~���O���ǤH�Ȱ��F�䤤�@��, �M��o
��p���䤣��]�ƷP��_��. �U������W����: [5]IRQ's, [6]DMA �q�D IRQ,
DMA �q�D, �M [7]���s�a�}, �Ҧ��o�dz��s"�귽".
2.3 IRQ's -- ���z
�ݹL�U����²������, �A�]�\�ٷQ�ݧ�ԲӪ� [8]���_ -- �Ը�. ²�z: ���F�a
�}�~, �٦����_�ݭn�B�z(�p IRQ5). �⥦�s���_��. �ڭ̦b�W���w�g���L�]���X
�ʵ{�Ǭ��F��q�H�������D���d���a�}. ����ϹL�ӫ���O? �]�Ʀp��P�X��
�{�dzq�H�O? �ҥH�]�ƻݭn���D�X�ʵ{�Ǫ��a�}, �o�˳]�ƴN�i�H�I�s�X�ʵ{��
�F. �Ҧp: �]�Ʊ�����@�ǻݭn�ǰe��D�s���ƾ�, ���ݭn�i�D�X�ʵ{�ǰ��W��
���o�Ǽƾ�, �ç�ƾڱq�]�ƪ��w�İϰe��D�s.
�]�ƩI�s�X�ʵ{�ǥΧ�@�Ӥ��_�q��s�u(�`�u���@����)���q���ﰪ����k.
��16�ӳo�˪��s�u, �C�ӳs�u�P�@�ӯS�w���]���X�ʵ{����p. �C�ڳs�u���@��
�S�w�� IRQ(Interrupt ReQuest) ��. �]�ƻݭn�⤤�_������s�u�W, �}�B
�X�ʵ{�ǥ�����ť�P�@�s�u. �s���ϥέ��ڳs�u���M�_�s�J�b�]�Ƥ������_��,
�����_�������Q�X�ʵ{�Ǫ��D, �o�˥��~���D�ݭn��ť���ڤ��_�u.
2.4 DMA �q�D
DMA �N�� 'Direct Memory Access'(�������s�X��). �N�O���\�]�Ʊq CPU �⤤
���ިt��`�u, �}������ƾڶǰe��D���s. �q�` CPU ����B�Ӷǰe�ƾ�: 1.
�q�]�ƪ� I/O �s�x�Ŷ�Ū�ƾ�, ��ƾک�b CPU ����. 2. CPU ��ƾڱq�䤺��
�e��D���s. DMA �覡�q�`�Τ@�B�N�i��ƾڱq�]�ƪ����e��D���s. �]�Ƶw��
�������m���o�د�O�}���O�Ҧ����]�Ƴ��i�H�ϥ� DMA ��. �q DMA �ǿ�e�Ψt
��`�u�}�l���ǿ�L�{�� CPU �N��������F.
��@�ӳ]�Ƹչ϶i�� DMA ��, ���|�o�X�@�ӽШD(�Χ���`�u�� DMA �ШD�s�u��
�q�����覡). DMA �ШD�]�i�H�Τ��_���覡�ӹ�{, ���|���@�w������, �ҥH��
�F�ֳt, �N�Τ@�دS����������_ 'DMA-�ШD' �ӹ�{. �H���_�@��, �� 'DMA-
�ШD�u' �s�����ѧO�O���ӳ]�Ƶo�X���ШD. �o�ǽs���N�s DMA-�q�D. �]��
DMA �ǿ�ϥΨt��`�u(�P�@�ɶ��u��@�Өϥ�), �ҥH���̹�ڤW�ΦP�@�ӳq
�D, �s���D�n�Ψ��ѧO�֦b�ϥγq�D. �D�O�W���w��H�s�������U�q�D����e��
�A. �n�o�X�@�� DMA �ШD, �]�ƥ������D�ۤv�� DMA �q�D��, �q�D���Ѫ��z�]
�Ʀs�x�b�ۤv����.
2.5 Memory �q
�� I/O �a�}�@��, �@�dz]�Ʀb�D���s�����t���a�}. ��A���o�˪��d��, �A���
�W�]���F�@��s�Ҷ�(�D���s, ���O I/O ���s). �o�q���s�Q�]�ƩM CPU �@
��(�B��]���X�ʵ{�ǫ�). �o��s�N���۳]�ƩM�D���s����'����'�ǿ�ƾ�.
��ꤣ�O�u�����ǿ�, �]�Ƨ�ƾک�쥦�ۤv�����s���P�ɤ]�N���F�D���s
��. ���d�M�]���X�ʵ{�ǥ������D���s��a�}.
2.6 ��� "�귽"
������]���X�ʵ{�ǩM�L�̱���w��p�t�_��. �o�ѦV�L�̴��ѬۦP���귽��
�ѨM. �Ҧp: ���f�ϥΨ�Ӹ귽: �@�� IRQ �M �@�� I/O �a�}. �o�Ǹ귽����
���ѵ��]���X�ʵ{�ǩM���z�]�ƨ��. �X�ʵ{��(�M�����]��)�Q�R�W(�p
ttlyS1). �a�}�M IRQ ���Q���d�s�x�b�ۤv���O���餤(�ΥD�O���@�Ӫ���).
2.7 ���D
PC ��t�u���Ѧ����� IRQ, DMA �q�D, I/O �a�},��. ���p�u���X�س]�ƨåB�]
�Ƴ��ϥμзǪ��귽, ���X�ʵ{�ǩM�]��p�t�b�@�_�S������D. �C�ӳ]�Ʀ��@
�өT�w���귽�åB���P����������L�]�ƽĬ�. �S����ӳ]�ƨϥάۦP�� I/O �a
�}, IRQ, ��. �s�g�X�ʵ{�Ǯɧ�o�Ǹ귽�g�i�h�Y�i. �o�˨Ʊ��N²��F.
����ڱ��p���O�o��. ���Ѥ��Ȧ��\�h���P���]�ƥB���̷����i��o�ͽĬ�, ��
�B�P�ɤS�n�ϥΤ��u�@�ӦP��������]��. �Ҧp�@�ӤH�i��Q�ϥδX�Ӥ��P����
�L�X�ʾ�, �X�Ӧ�f, ����. �ҥH�]�ƥ������@�w���F���ʳo�˥i�H�⥦�̳]�m
����N���a�}, IRQ, ����. �]���n�}�귽�Ĭ�. ���O�@�� IRQ �M �a�}�O�۷�
�зǪ��p����M��L. ���̤��ݭn�o�˪��F����.
���F�귽�Ĭ𤧥~, �٦��@�Ӱ��D�O�i�D�X�ʵ{�ǿ��~���귽�H��. �Ҧp: �A��
�ڲq�Q�b�t�m���J IRQ4, �i�]�ƹ�ڨϥΪ��O IRQ5. �o�O�귽���t���t
�@�ؿ��~.
�귽���t, �p�G�������T, �i�H�b�w��M���̪��X�ʵ{�Ǥ����إ߳q�H�q�D. ��
�p, �@�ӯS�w�� I/O �a�}�d��t���@�ӳ]���X�ʵ{�ǩM�@��w��, ����N�i�b
���̤����إ߳q�H�q�D. �X�ʵ{�ǥi�H�V�]�ưe�R�O�M�H��. ��ڤW���u�@���q
�D, �]���X�ʵ{�ǥi��Ū�]�ƱH�s�����覡�o��H��. ���O�]�Ƥ���γo�ؤ覡
�q�H. ���t�@�� IRQ, �⥦�@���X�ʵ{�ǩM�]�ƥi�H�椬���t�@���q�H�q�D.
3. Plug-and-Play (PnP) �ѨM���
3.1 ����
PnP �� PnP �귽�۰ʤ��t���w��M�����n��. �N�O, ��]�ƩM���̪��X�ʵ{��
�t��}�إ߳q�H�q�D. �b�ϥ� PnP ���e, �w��a���u, �n��a�t�m���(�����
����k)�βq���w��ϥΪ��귽�Ӥ��t�귽. �o�˨ä���`�O���`�u�@.
������ PnP (�]����`�O���`�u�@), �ݭn PnP BIOS �M�ާ@�t�Ϊ��t�X. ��p��
���}���� BIOS �|�B��ӱҰ�. ���p�ާ@�t�Φs�x�b�w�L�W(�q�`�O�o��), ����
BIOS �����F�ѳo�ӵw�L. �p�G�w�L�O PnP ������ BIOS �|�ϥ� PnP �覡���
��. �P��, ��p���Ұʮɬ��F�t�m BIOS, ��ܥd�M��L�ɥ�����, �ҥH�p�G��
�n���� BIOS �����t�m�o�dz]��.
�@�� BIOS �ѧO�F�w�L, ��ܥd, �M��L, ���N�dz� 'boot'(�q�w�L�դJ�ާ@�t
��). ���p�A�w�g�i�D BIOS �A���@�� PnP ���ާ@�t��, ���N���o��h����ާ@
�t�Χ�����l�� PnP �t�m. �_�h, PnP-BIOS �N�����Ѿl�� PnP �t�m.
3.2 Linux �ݭn PnP
Wintel(Microsoft �M Intel) �гy�F PnP. �Ѥ_�غح�], Linux ���Ϧ��H����
�w PnP. �������w�P�_, ���Ѫ��w��j�����O PnP ��, ���F���Ī��B�z PnP
�~, Linux �O�L���.
3.3 �`�u���D
PnP ����b���`�u�W�B��p ISA,PCI. ISA �O IBM PC �W����`�u���c, PCI
�O Intel �гy���s���ֳt���`�u���c. �̲�, ISA �`�u�N���`. PCI �`�u���c�b
�`�u�W�O�d�F�\�h�a�}�Τ_ PnP �t�m. Linux �ϥγo�Ǧa�}�ӧ�X�A������
PnP PCI �]�ƨç⥦�̪��H����b /proc/pci '���'��. (��_PCI�`�u�W���D
PnP �]��, �ڤ�����).
��_ ISA �`�u, �Ѥ_�����O�� PnP �]�p��, �]�p ISA �ɨS����� PnP ����,
�ҥH���W���S���Τ_ PnP �� I/O �a�}. ���G, �b ISA �W��{ PnP �۷�_�,��
�ݭn PnP �]�ƳQ���w�@��{�ɪ�'handle'(�y�`)�Τ_ PnP �t�m. ���t�o��
'handles' �]�s�� 'isolation'. �Ьݪ�������� [9]Isolation ������y�z.
3.4 �]�m PnP BIOS
��}����, BIOS ��ާ@�t�Υ���դJ�B��. �s�� BIOS �� PnP, ���N�]�m����
�ΩҦ��� PnP �]��. ��_�j�h�� PnP BIOS �S����k��� PnP �\��, �A���o��
�ϥΥ�. �o��@�ǿﶵ,�b�A�� BIOS ��椤�]�\�]��:
* [10]�A���@�� PnP �ާ@�t�ζ�?
* [11]�p��t�귽?
* [12]���m�t�m?
�A���@�� PnP �ާ@�t�ζ�?
���p�A��'�O', PnP BIOS �N�� PnP �]�m�w�L, ��. ����ާ@�t�Χ����̲װt�m
���. BIOS �]�\�b ISA �`�u�W�� [13]Isolation, �M����ާ@�t�Ψӧ����o��
�]�ƪ��t�m. ���p�A���ާ@�t�Τ����o�ǰt�m�u�@(�@�� Linux ���ɤB����), ��
�_ BIOS �]�\�|��o�� ISA �]�Ƹm���T��A(??), �A�j�����|��'�O'.
���p�A���S��, BIOS �|�ۤv���t�m�u�@. ���A�W�[�s�� PnP �]�ƥ~, ���N�ϥ�
�����e�s�x�b�D���o�s�x�������t�m. ���p�ϥΪ��O Linux, �t�m���|��������
��. ���p�ϥΪ��O Windows 95/98 (�L�̬O PnP ��), ���̥i��|�]�m�t�m���P
�_�A�b Linux �U���t�m. �q�`, �A�i�H�b Linux �ҰʮɹB�� isapnp �u���
ISA �]�Ƴ]�m���A�Q�n���t�m. ���o�� PCI �d�S�����U, ���L�A��ά�
/proc/pci ���k��ˬd���̬O�Q�p��t�m��. �M��A���T�O Linux ���X��
�{�ǨϥΪ��t�m���("setserial", lilo.conf , ��)�P���۲�. �� [14]BIOS �t
�m PnP �o���h���H��.
�p��t�귽?
�o���M�_�A�M�w�p��t IRQ �M DMA. �]�� "auto"(�۰�), BIOS �N���t�귽.
�p�G�]�� "manual"(��u), �A�i�H�i�J�t�@�ӵ��ïର "legacy" (non-pnp)
�d�w�d�귽. �{�b BIOS �]�\�Τ��|���D�A�� legacy �d. ���p���D�d����, �|
�չϨϥ� "auto". �p�G�����D����, �ݭn��u�� legacy �d�w�d�ݭn�� IRQ, �
BIOS PnP �t�m�ɤ��ϥγo�Ǹ귽. ���p�A�b Windows �U�B�� ICU �i�D BIOS �
�_�A�� legacy �d�����p, BIOS �~�|���D�A�� legacy �d�����p. BIOS �|��o
�ǫH���s�b�����D���o�s�x����.
���m�t�m?
�o�|������ BIOS �s�x�b�D���o�s�J������ PnP �]�ƩM�W������ legacy �d���t
�m�H��. ���D�A�T�H�o�Ǽƾڦ��~�ݭn���g, �_�h�S�����n�o�˰�. �u���A����
������Ұʮɤ~�ݭn�o�˰�. ���p�A�� BIOS �ᥢ�F legacy �]�ƪ��H��, �A��
�n�b Windows �U�B�� ICA �ӭ��سo�ǫH��.
4. �p���I PnP �d
4.1 ����
����, �j�����s�����m���d�O PnP ��. �䤤���@�ǥd�����u(�������)�i�H��d
�]�m���D PnP. �]���\�h Linux (�M Dos/Windows)�{�ǥi�H�B�z PnP, �̦n�O�d
�d�� PnP �\��. ���p�A�⤺�֤ɯŬ��� PnP, �����ȷ|�t�m�w��ӥB�|��w��
�t�m�H�����ѵ��X�ʵ{��, �o�˧A�N���ݭn�t�m���̤F. �Ҧp, ��_��f�A�N��
���ϥ� "setserial" �F.
���p�A���@�� PnP �d, �A�|���U���@�өΦh�ӿﶵ�Ӱt�m��:
* [15]�T�� PnP �θ��u����k(���\�h�d����)�ίS���n��.
* [16]BIOS �t�m PnP (�ȥΤ_�A���@�� PnP BIOS)
* [17]Isapnp �@�ӥΤ_�t�m ISA �`�u�W PnP �]�ƪ��n��(������Τ_ PCI �`
�u�]��)
* [18]�� Kernel �� Linux ���ܬ��@�� PnP ���ާ@�t��
4.2 �T�� PnP ?
�\�h�d�� PnP �\��L�k��. �Y�ϧA�����|�o�˰�, �Ѥ_�U������]�A�]�\��
�|�o�˰�.
1. ���p�b�P�x�����W�� MS Windows, �A�]�\�Ʊ�b MS Windows �U�i�H��
PnP �Ӱ����P���t�m.
2. IRQ ���귽����, ���D�ϥ� PnP, �_�h����t�m.
3. ���p�ݭn�ϥ� Dos/Windows �U���n��]�m���D PnP �覡, �i���@�ѧA����
�ϥ� Dos/Windows �F, �]������A���ܰt�m.
4. �A��(�αN��)�䥦 PnP �]�t�ݭn�t�m, �ҥH�A�n�L�צp�ݭn PnP �\
��.
�]�Ƥ@���Q�]�m���D PnP �t�m�覡, ���̱N����Q PnP �n��� BIOS �t�m. (��
�D���h���u�Ψϥΰt�m�n�} PnP �\��)
4.3 BIOS �t�m PnP
�Q�o�˰�, �A�� BIOS ������ PnP. �o����_�A�� BIOS ��h���H��, �ݦ��
�� Web ���I. �@�� BIOS �u���̤֪� PnP �\��, ���|�չϧ�x����t�m�u�@��
�� Windows �u��(�b Linux �U���i��). �b�o�ر��p�U�p�G BIOS ���@�@�Ӱt�m
�ƾڮw����, �A�]�ݭn�� DOS/Windows �U�� ICU �ӳ]�m�o�ƾڮw.
�����]�m�A�� BIOS �� ""Not a PnP Operating System"(�S�� PnP ���ާ@�t
��). �� [19]�t�m PnP BIOS. �o�|�� BIOS ���������t�m�u�@, �Ӥ��O��Ѿl��
�浹�ާ@�t��.
BIOS ���D���o�ƾڮw�s ESCD (Extended System Configuration Data). ������
�s�x PnP �]�ƪ��t�m�åB�s�x�D PnP �]�ƪ��H���Τ_�}�Ĭ�. ��A�w�˷s��
�D PnP �]����b�w�˫e��ICU(Intel Configuration Utility)�i�D ESCD ��_�]
�ƪ��H��. �A�]�ݭn�B�� ICU �i�D ESCD ��_�w�g�s�b���������D PnP �]�ƪ�
�H��(���D���H�w�g���L�F).
ESCD �q�`�O�s�b����, �����ɷ|�O�s�b�w�L�W?? (Ķ�̷Q: COMPAQ ���t�m�H
�����ǬO�_�O�s�b�w�L�W) �ϥ� Linux �ާ@�t�Ϊ������� BIOS �C���ҰʮɬO�o
�˰t�m. �A�]�\�Q���� ICU (�M BIOS)�O�p��t�m��(�Υ��L�X��). �M��, ���p
�A�W�[�@�ӷs���D PnP �]�ƴN�ݭn�A���B�� ICU. ���p���O PnP ��, BIOS �|��
�ʰt�m��, �úɶq�����ܾ������w�g�s�b���]�ƪ��t�m. �����F���s�]�Ƥ��t��
�ݨD���귽, ���ɤ��o�����ܤw���]�ƪ��t�m. ���p�o�o�ͤF, �A�ݭn��줰��
���ܤF(�� /proc/pci �M�ϥ� "pnpdump"�R�O)�åB���X�������.
�`�N: �b Dos/Windows �U�t�m�H���ٷ|��b�w�L�W��Windows���, �o�˾ާ@
�t�Ϊ��D�C�ӳ]�ƪ����p. ��_�۰�˴��]�ƪ� Linux ���|�o�ͳo�بƱ�.
4.4 Isapnp
�ȥΤ_ ISA �`�u�W�� PnP �]��. �b�ҰʮɹB�榹�{�DZN���ӧA�b
/etc/isapnp.conf ���]�w�Ӱt�m�o�dz]��.�A�ݭn isapnptools �], �]�t�b�\�h
�o�檩����. ��J "locate pnp" �Ӭd��A�O�_�֦� isapnp. ���p�A�� Linux
�۰ʦw�ˤF isatools, isapnp �]�\�b�Ұʮɤw�g�B��. ��_�o�ر��p, �A�ݭn
�����N�O�s�� /etc/isapnp.conf (�� man isapnp.conf �o�즳��H��). �]���A
�q�L�s��t�m���ӨM�w�p��]�m�]��, �o�˰����I�H��u�t�m PnP. ���p�o��
�ϥ� "isapnp" �åB���@�� PnP BIOS, �A�N�i�D BIOS �A���@�� PnP ���ާ@�t
�ζ�?? (½Ķ�̻{��: �p�G�A�� Linux ���֤��� PnP, �^���S�� PnP �ާ@�t
��, � BIOS �����Ҧ��� PnP �]�m�u�@, ���A���n�չϥh�ק�]�ƪ��귽, �ק�
�ۤv���t�m���Y�i.)
���p�A���g�B�� isapnp �t�m ISA-PnP �]��,���C���ҰʮɹB��isapnp����, ��
�p�A�b�P�x�����W�� Windows 95/98 ���ܥi��|�o��: ��ϥ� Windows
95/98 ��, Windows �]�\�|�H���P���覡�t�m�A�� PnP�d, ��A��^�ϥ� Linux
��, �d�N���|���`�u�@.
4.5 �ɮ֤�� Linux �� PnP
���@�ӥ��j���ɤB�Ӱ��o��. �s���֤߬Oí�w���åB�]�t���: serial.txt ����
�p��B�z���f. ���b /proc �ؿ�������"���", �ҥH�A�i�H���D�o�ǬO�p��i
�檺�ï�� echo �R�O�ӳ]�m�t�m. �@�Ӱ��D�O�\�h�X�ʵ{�Ǥ����D�o��, �A��
�ݭn�ϥζDzΪ��t�m���, ��. �p��t�m, �Ь�
[20]
http://lucifer.hemmet.s-hem.chalmers.se/~dwh
4.6 PnP �n��M���
* �� [21]
http://www.redhat.com/linux-info/pnp/ ��_ PnP ���n��M��
��.
* �� [22]
http://www.microsoft.com/hwdev/respec/pnpspecs.htm ��_ PnP
���S��.
5. ����
5.1 �a�}
���T��a�}: �D���s�a�}, I/O �a�}�M�t�m�a�}(�ȭ��_ PCI �`�u). "�a�}"�b��
��ɤ����ɪ�ܤ@�ӳs�a�}�S��. �]���a�}�O�H�r�`�覡���X��, �@�ӳ�@
�a�}�u�]�t�@�Ӧr�`, �� I/O(�M�D���s)�a�}�]�t����o�h. ���t���]�ƪ��a
�}���h��, �`�Τ@�Ӧa�}�Ӫ��I/O�]�ƪ������s��a�}�S��. �p: ��_���f(
�@�� I/O �]��)�u���X���e�Ϊ��K�Ӧa�}���_�l�a�}, �]���j�a�����D���]�ƥ�
�K�Ӧr�`���a�}. �_�l�a�}�s"�a�}". (½Ķ��: �W��½Ķ���F��ڦ^�Y�ݬ�
�����Q�����F, ���j�a�|�ӨҤl�a. �ڭ̻��Y�Ӧ�f���a�}�� 3f8, ���O����
���a�}�O�q 3f8 �}�l���K�Ӧa�}, �]���q�{���]�Ʀa�}�d��O�K�Ӧa�}.)
�X��I/O�M(�D���s)�a�}�Ŷ��ϥΪ��O�ۦP�����z�a�}�`�u(�b PC ����, ���̪�
�a�}�`�u�b�w��W�O�@�ɪ�). ����]�Ʀp�D�a�}�`�u�W���ƾڪ�ܪ��O
I/O �a�}�٬O���s�a�}�O? ���, �b�`�u�W���|�ӱM�γs�u�ӰϤ��a�}�ƾڪ��t
�q. ���p�o�|�ӳs�u�����Y�Ӱ_�@��, �N��� CPU �Q�X�� I/O �a�}, ���s
�N�|�����`�u�W���a�}�H��. �䥦�T�ӳs�u����Ϊk.
�q�`, �j�h�� I/O �]�ƶȨϥ� I/O �s�x���P CPU �q�H. �Ҧp, ���f�N�O�o
��. �]���X�ʵ{�DZq I/O �a�}��Ū�g�ƾڨåB�q�`���p�U��ƾک��D���s. ��
�@�I����k�O�]�Ƨ�ƾڪ����e��D���s. �o�˰����@�ؤ�k�O�ϥ� [23]DMA �q
�D. �t�@�ؤ�k�O�b�D���s�����t�@�w�Ŷ����]��. �o�ؤ�k���ݭɧU DMA �K�i
�H����Ū�g�D���s. �o�˪��]�Ƴq�`�� I/O �a�}�M�D���s�a�}.
5.2 ���_ -- �ԭz
���_�ζ������覡�ǰe�H��. ���_�H��(�u��W���@�ӹq��)�i�D���_����@��
�S�w���]�Ʀ��ܭn��. ���_����A�q�� CPU. CPU �|�Ұ�"���_�A�Ȩҵ{"�ӳB
�z. "�ҵ{"�|�չϧ�X�o�ͤ���F�Ʊ��óB�z�H�ݭn�ǿ鵥���D. "�ҵ{"��e��
����X�o�ͤ���F�Ʊ�, �]���X�ʵ{�Ǫ��D�]�ƪ��H�s���a�}. �o�DZH�s���]�t
��_�]�ƪ��H��. �n��Ū�o�DZH�s���������e�ä��R����, ��X�o�ͤF����, ��
�����A�����.
5.3 Isolation
�ȥΤ_ ISA �`�u. Isolation �O�� ISA �`�u�W�� PnP �]�Ƥ��t�y�`(id ��)��
�_�����k. �ɺަ��Ī���k(�]��_�)�Ӱ��o���, �����ǤH�{��²��@
�I�n. �u���@�ӥi�H�g�Ҧ� PnP �]�ƪ��g�a�}, �ҥH�g�o�Ӧa�}�N�i�H�i�D�Ҧ�
���b��ť��PnP�]��. �o�Ӽg�a�}�Τ_�V�U�� PnP �]�ưe�@�Ӱߤ@���y�`. ���t
�y�`�n�D�y�`�e�줽�Φa�}�ɥu���@�ӳ]�Ʀb��ť. isolation ���ǹ��@��"��
��". �Τ@�Ӥ���`�u�s�u�s���Ҧ� PnP �]�ƩM isolation �{��.
"��"�������`��, �Ҧ��� PnP �]�ƺ�ť�`�u���P�ɨæV�`�u�W�o�e�ƾڦ�y.
�ƾڦ줣�O1�N�O0. �C�� PnP �]�Ƶo�e�ۤv���s��, �q����}�l, �@�챵�@��.
���p�@�ӳ]�Ƶo�e�@��1, 1�|�Q�䥦�Ҧ����]��ť��. ���p�Ҧ����]�Ƶo�e 0 ��
��`�u�W�N����]ť����. �b�����`��̫�, ���F�̰��s�����]�ƥ~�䥦�]��
���Q�ư����F.(�Ҧ����s�����׳��@��.)
�����Ҽ{���O�̰���. ���p�@�� PnP �]�Ƶo�e 0, �i��ť�쪺�O 1, �N��ܦ���
���s���� PnP �]�Ʀs�b, ���N�{�ɰh�X�`��A��ť���즹�`���(��̤j�s
���]�ƳQ�ᤩ�@�ӥy�`��). �{�b�O�d�U�Ӫ��]�Ʀ��ۦP���e�ɦ�(�@�� 1), �ڭ�
�b���Ӫ��B�z����e�ɦ�h���u�Ҽ{�Ѿl������. ���s�}�l�`������s��(��
���]��)���Q�B�z(���O 0 �����p�ݤU��).
���p�e�ɦ쳣�O 0 �|�o�ͤ���? �Ҧ����]�Ưd�b����. 0 �|�Q�H 1 �@�˫̽�
��, �}�l�U�@���`��.
�b�`���ɥu���̰��s���� PnP �]�Ʒ|�O�d�U��. ���|�o��@�ӥy�`�ðh�X��
��. �W���`��Q�^�O�X�����]�Ʒ|�A���i�J���}�l�@�ӷs���`��. ����Ҧ�
�]�Ƴ����@�ӥy�`. �o�˰��O��²�檺.
�]�Ʀ��F�y�`, �N���F�V PnP �]�Ƶo�e�MŪ���t�m�H�����a�}. �ݭn�`�N���O�o
�ǥy�`�u�Τ_�t�m PnP �]�Ƥ���Τ_���`���q�H. �����Ұʫ�, �Ҧ����y�`��
�|�ᥢ, �ҥH�C���A�Ұʾ��� BIOS ���|���@���o�˪��u�@.
References
1. mailto:
[email protected]
2. mailto:
[email protected]
3.
http://sunsite.unc.edu/LDP/mirrors.html
4.
http://sunsite.unc.edu/LDP/HOWTO/Plug-and-Play-HOWTO.html
5. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#interrupt_over
6. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#dma_
7. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#mem_
8. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#interrupt_detail
9. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#isolation_
10. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#bios_pnp_os
11. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#bios_resources
12. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#bios_reset
13. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#isolation_
14. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#bios_conf
15. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#disable_pnp
16. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#bios_conf
17. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#isapnp_
18. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#patch_kernel
19. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#conf_pnp_bios
20.
http://lucifer.hemmet.s-hem.chalmers.se/~dwh
21.
http://www.redhat.com/linux-info/pnp/
22.
http://www.microsoft.com/hwdev/respec/pnpspecs.htm
23. file://localhost/tmp/zh-sgmltools.2504/Plug-and-Play-HOWTO.txt.html#dma_