Thread View: cn.bbs.comp.program
1 messages
1 total messages
Started by ��ʿ��
Wed, 31 Dec 1997 00:00
Re: �����c code �л��PNP���ϵ��ڴ���ր
Author: ��ʿ��
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]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads