Article View: cn.bbs.comp.program
Article #2279Re: �����c code �л��PNP���ϵ��ڴ���ր
From: ��ʿ��
Date: Wed, 31 Dec 1997 00:00
Date: Wed, 31 Dec 1997 00:00
40 lines
1423 bytes
1423 bytes
�� �� cxl.bbs@bbs.njtu.edu.cn (gege) �Ĵ������ᵽ: ��
: �����������
: �����������
: �����������
: PNP how to know its start addr. maping
:
�����PCI����һЩԴ����
��������PCI���ģ��ҵ�֮��
configuration space ���
base address M/IO
��� 1. PCI specification
2. NTDDK document
#define PCI_ADDRESS 0x0cf8
#define PCI_DATA 0x0cfc
int PCI_BUS_PRESENT(void)
{
static done=FALSE;
ULONG i;
USHORT j;
if (done) return TRUE;
// try Mechanism first
for (i=0x80000000;i<0x80010000;i+=0x00000800)
{
outpd(PCI_ADDRESS,i);
if (inpw(PCI_DATA)==0xffff) continue;
outpd(PCI_ADDRESS,i+0x08);
if (inpw(PCI_DATA+2)!=0x0600) continue; // not Host Bridge
done=TRUE;
return TRUE;
}
--
[1;36m�� ��Դ:����ˮ˼Դվ bbs.sjtu.edu.cn��[FROM: www]
Technical Details
Message-ID:
<3MLQHc$Une@bbs.sjtu.edu.cn>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB X-Google-Thread: fc86e,e14179241882341d,start X-Google-Attributes: gidfc86e,public From: jazzman.bbs@bbs.sjtu.edu.cn (��ʿ��) Subject: Re: �����c code �л��PNP���ϵ��ڴ���ր Date: 1997/12/31 Message-ID: <3MLQHc$Une@bbs.sjtu.edu.cn> X-Deja-AN: 311646378 X-Filename: program/M.883580246.A Organization: ��ˮ˼Դվ Newsgroups: cn.bbs.comp.program