📄 pci.txt
字号:
There are two configuration methods, depending on the PCI chipsets used:
Configuration Type 1:
CF8h D(R/W):
bit 0-7 Index into the configuration space to read/write at CFCh
11-15 Card ID (0 - 31)
16-19 PCI Bus ID (0 - 15)
31 Set to enable the PCI bus configuration space
CFCh D(R/W):
bit 0-31 The index register identified by the PCI bus/card ID/Index in CF8h
can be accessed here.
Configuration Type 2:
CF8h (R/W):
bit 7 Set to select the PCI configuration space
CFAh (R/W):
bit 0-? Bus select ?
Finding the PCI devices:
PCItype:=0;
outp($CF8,0);
outp($CFA,0);
if (inp($CF8)=0) and (inp($CFA)=0) then PCItype:=2
else begin
tmp=inpl($CF8);
outpl($CF8,$80000000);
if inpl($CF8)=$80000000 then PCItype:=1;
outpl($CF8,tmp);
end;
case PCItype of
1:begin {PCI type 1}
for i:=0 to 511 do
begin
outpl($CF8,$80000000+i*longint(2048));
tmp:=inpl($CFC);
if ((tmp and $FFFF)<>$FFFF) and ((tmp shr 16)<>$FFFF) then
_PCI Device: Vendor: (l and $FFFF) Device: (l shr 16)_
end;
end;
2:begin {PCI type 2}
outp($CF8,$80);
outp($CFA,0); {Bus select?}
for i:=0 to 15 do
begin
tmp:=inpl(i*256 +$C000);
if ((tmp and $FFFF)<>$FFFF) and ((tmp shr 16)<>$FFFF) then
_PCI Device: Vendor: (l and $FFFF) Device: (l shr 16)_
end;
outp($CF8,0);
end;
end;
The PCI BIOS interface requires a 386 or better CPU.
--------X-1AB001-----------------------------
INT 1A - ? PCI ? - INSTALLATION CHECK
AX = B001h
Return: CF clear if installed
DX = 4350h ('CP')
CX = 2049h (' I')
--------X-1AB002-----------------------------
INT 1A - ? PCI ? - FIND PCI DEVICE
AX = B002h
CX = device ID
DX = vendor ID
SI = device index (0-n)
Return: CF clear if successful
BH = bus number
BL = device/function number (bits 7-3 device, bits 2-0 func)
--------X-1AB00A-----------------------------
INT 1A - ? PCI ? - READ CONFIGURATION DWORD
AX = B00Ah
BH = bus number
BL = device/function number (bits 7-3 device, bits 2-0 function)
DI = register number (0000h-00FFh)
Return: CF clear if successful
CX = Low 16 bit of the DWORD
DX = High 16 bit of the DWORD
--------X-1AB101-----------------------------
INT 1A - Intel PCI BIOS v2.0c - INSTALLATION CHECK
AX = B101h
Return: AH = 00h if installed
CF clear
EDX = 20494350h (' ICP')
EDI = physical address of protected-mode entry point (see #0528)
AL = PCI hardware characteristics (see #0527)
BH = PCI interface level major version (BCD)
BL = PCI interface level minor version (BCD)
CL = number of last PCI bus in system
EAX, EBX, ECX, and EDX may be modified
all other flags (except IF) may be modified
Note: this function may require up to 1024 byte of stack; it will not enable
interrupts if they were disabled before making the call
Bitfields for PCI hardware characteristics:
Bit(s) Description (Table 0527)
0 configuration space access mechanism 1 supported
1 configuration space access mechanism 2 supported
2-3 reserved
4 Special Cycle generation mechanism 1 supported
5 Special Cycle generation mechanism 2 supported
6-7 reserved
(Table 0528)
Call protected-mode entry point with:
registers as for real/V86-mode INT call
CS = ring 0 descriptor with access to full address space
Return: as for real/V86-mode call
--------X-1AB102-----------------------------
INT 1A - Intel PCI BIOS v2.0c - FIND PCI DEVICE
AX = B102h
CX = device ID
DX = vendor ID
SI = device index (0-n)
Return: CF clear if successful
CF set on error
AH = status
00h successful
BH = bus number
BL = device/function number (bits 7-3 device, bits 2-0 func)
83h bad vendor ID
86h device not found
EAX, EBX, ECX, and EDX may be modified
all other flags (except IF) may be modified
Notes: this function may require up to 1024 byte of stack; it will not enable
interrupts if they were disabled before making the call device ID FFFFh
may be reserved as a wildcard in future implementations the meanings of
BL and BH on return were exchanged between the initial drafts of the
specification and final implementation all devices sharing a single
vendor ID and device ID may be enumerated by incrementing SI from 0
until error 86h is returned
--------X-1AB103-----------------------------
INT 1A - Intel PCI BIOS v2.0c - FIND PCI CLASS CODE
AX = B103h
ECX = class code (bits 23-0)
SI = device index (0-n)
Return: CF clear if successful
CF set on error
AH = status
00h successful
BH = bus number
BL = device/function number (bits 7-3 device, bits 2-0 func)
86h device not found
EAX, EBX, ECX, and EDX may be modified
all other flags (except IF) may be modified
Notes: this function may require up to 1024 byte of stack; it will not enable
interrupts if they were disabled before making the call the meanings
of BL and BH on return were exchanged between the initial drafts of
the specification and final implementation all devices sharing the
same Class Code may be enumerated by incrementing SI from 0 until
error 86h is returned
--------X-1AB106-----------------------------
INT 1A - Intel PCI BIOS v2.0c - PCI BUS-SPECIFIC OPERATIONS
AX = B106h
BL = bus number
EDX = Special Cycle data
Return: CF clear if successful
CF set on error
AH = status
00h successful
81h unsupported function
EAX, EBX, ECX, and EDX may be modified
all other flags (except IF) may be modified
Note: this function may require up to 1024 byte of stack; it will not enable
interrupts if they were disabled before making the call
--------X-1AB108-----------------------------
INT 1A - Intel PCI BIOS v2.0c - READ CONFIGURATION BYTE
AX = B108h
BL = device/function number (bits 7-3 device, bits 2-0 function)
BH = bus number
DI = register number (0000h-00FFh)
Return: CF clear if successful
CL = byte read
CF set on error
AH = status
00h successful
87h bad register number
EAX, EBX, ECX, and EDX may be modified
all other flags (except IF) may be modified
Notes: this function may require up to 1024 byte of stack; it will not enable
interrupts if they were disabled before making the call the meanings
of BL and BH on return were exchanged between the initial drafts of
the specification and final implementation
--------X-1AB109-----------------------------
INT 1A - Intel PCI BIOS v2.0c - READ CONFIGURATION WORD
AX = B109h
BL = device/function number (bits 7-3 device, bits 2-0 function)
BH = bus number
DI = register number (0000h-00FFh)
Return: CF clear if successful
CX = word read
CF set on error
AH = status
00h successful
87h bad register number
EAX, EBX, ECX, and EDX may be modified
all other flags (except IF) may be modified
Notes: this function may require up to 1024 byte of stack; it will not enable
interrupts if they were disabled before making the call the meanings
of BL and BH on return were exchanged between the initial drafts of
the specification and final implementation
--------X-1AB10A-----------------------------
INT 1A - Intel PCI BIOS v2.0c - READ CONFIGURATION DWORD
AX = B10Ah
BH = bus number
BL = device/function number (bits 7-3 device, bits 2-0 function)
DI = register number (0000h-00FFh)
Return: CF clear if successful
ECX = dword read
CF set on error
AH = status
00h successful
87h bad register number
EAX, EBX, ECX, and EDX may be modified
all other flags (except IF) may be modified
Notes: this function may require up to 1024 byte of stack; it will not enable
interrupts if they were disabled before making the call the meanings of
BL and BH on return were exchanged between the initial drafts of the
specification and final implementation
--------X-1AB10B-----------------------------
INT 1A - Intel PCI BIOS v2.0c - WRITE CONFIGURATION BYTE
AX = B10Bh
BH = bus number
BL = device/function number (bits 7-3 device, bits 2-0 function)
DI = register number (0000h-00FFh)
CL = byte to write
Return: CF clear if successful
CF set on error
AH = status
00h successful
87h bad register number
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -