📄 pcinc.asm
字号:
;---------------------------------------;
; check_bad_pci_device ;
;---------------------------------------;--------------------------------------;
; This function checks the bad_pci_device_table for a given Device/Vendor ID. ;
; If found, then the device has already been configured in static device init. ;
; ;
; Input: BL = Device/Function number to initialize ;
; Bits 7-3: PCI device number ;
; Bits 2-0: Function number within the device ;
; BH = Bus number of device to initialize ;
; ECX = Device/Vendor ID of device ;
; ;
; Output: CF = Set if device is a non-compliant PCI device that has already ;
; been configured during static device init ;
; Clear if device should be handled normally ;
; ;
; Destroys: Nothing ;
;------------------------------------------------------------------------------;
check_bad_pci_device proc near
pushad ; pusha..BUG 12/18/96
mov dx, cx ;DX = Vendor ID from PCI Bus
shr ecx, 16 ;CX = Device ID from PCI Bus
mov di, offset cgroup:bad_pci_device_table
check_bad_next_entry:
; DX, CX = Vendor ID, Device ID
; CS:DI = Offset of the entry in bad_pci_device_table
cmp byte ptr cs:[di], 0 ;Look at size of this entry
jz check_bad_done ;Br if no more device entry in table
;Carry flag clear (NC)
; DX,CX = Vendor ID, Device ID
; CS:DI = Offset of the entry in bad_pci_device_table
call check_vendor_device_id ;Vendor ID and Device ID match ?
stc ;Set carry flag (CY) if match
jz check_bad_done ;Br if device found in table
movzx ax, byte ptr cs:[di] ;Get length of this entry
add di, ax ;CS:DI = ptr to next entry
jmp short check_bad_next_entry
check_bad_done:
popad ; popa..BUG 12/18/96
ret
;---------------------------------------; 02/14/96
check_bad_pci_device endp
;---------------------------------------;
; bad_pci_device_table ;
;---------------------------------------;--------------------------------------;
; This table contains Vendor/Device IDs of non-compliant PCI devices and the ;
; corresponding set of fixed resources that should be used for configuring ;
; the device. ;
; ;
; The format of the table is as follows: ;
; ;
; Size Description ;
; ---- ------------------------------------------------------------------ ;
; byte Length of this table entry including this byte ;
; word Vendor ID of PCI device ;
; word Device ID of PCI device ;
; byte Device Attribute ;
; bit-0 = 1 Device is VGA ;
; bit3-1= Reserved for future use (set to 0) ;
; bit-4 = 1 Ignore bit3-0 of Device ID ;
; bit-5 = 1 Ignore bit7-4 of Device ID ;
; bit7-6= Reserved for future use (set to 0) ;
; byte IRQ information: ;
; 00 = device does not need an IRQ ;
; 01 - 0F = device must use this IRQ (1 - 15) ;
; FF = device may use any IRQ ;
; ;
; byte Number of I/O ports entries that follow ;
; byte PCI config space register address ;
; word Length of I/O port block (in bytes) ;
; byte Number of base address options that follow ;
; word Base address of I/O port block ;
; 0 - FFFE = device must use this I/O port ;
; FFFF = device may use any I/O port (PCI compliant) ;
; ;
; byte Number of memory entries that follow ;
; byte PCI config space register address ;
; dword Length of memory block (in bytes) ;
; byte Number of base address options that follow ;
; dword Base address of memory block ;
; 0 - FFFFFFFE = device must use this memory address ;
; FFFFFFFF = device may use any memory address (PCI compliant) ;
; ;
;------------------------------------------------------------------------------;
bad_pci_device_table label byte
;;----------------------------- Tseng ET4000 VGA --------------------------------
;
et4000_vga_start:
db offset et4000_vga_end - offset et4000_vga_start
dw 100Ch, 3207h ;ET4000 Vendor ID / Device ID
db BAD_VGA_ATTRIBUTE ;Device is VGA, ignore bit3-0 of Device ID
db 0FFh ;Device may use any IRQ
db 0 ;Device uses no I/O port blocks
db 2 ;Device uses 2 memory blocks
db 10h ;Base address register 0
dd 1000000h ;Size of memory block needed is 16M
db 4 ;4 options for the base address
dd 7F000000h, 7E000000h, 7D000000h, 7C000000h
db 30h ;Expansion ROM Base address register
dd 8000h ;Size of memory block needed is 32k
db 1 ;1 option for the base address
dd 80000000h
et4000_vga_end:
;;----------------------------- Tseng ET4000 VGA --------------------------------
;
et4000x_vga_start:
db offset et4000x_vga_end - offset et4000x_vga_start
dw 100Ch, 3206h ;ET4000 Vendor ID / Device ID
db BAD_VGA_ATTRIBUTE ;Device is VGA, ignore bit3-0 of Device ID
db 0FFh ;Device may use any IRQ
db 0 ;Device uses no I/O port blocks
db 2 ;Device uses 2 memory blocks
db 10h ;Base address register 0
dd 1000000h ;Size of memory block needed is 16M
db 4 ;4 options for the base address
dd 7F000000h, 7E000000h, 7D000000h, 7C000000h
db 30h ;Expansion ROM Base address register
dd 8000h ;Size of memory block needed is 32k
db 2 ;1 option for the base address
dd 80000000h,10000000h
et4000x_vga_end:
;----------------------------- Buslogic SCSI --------------------------------
buslogic_scsi_start:
db offset buslogic_scsi_end - offset buslogic_scsi_start
dw 104bh, 0140h ;Buslogic SCSI Vendor ID / Device ID
db 00h ;Device is not VGA
db 0FFh ;Device may use any IRQ
db 1 ;Device uses 1 I/O port block
db 10h ;Base address register 0
dw 4 ;Size of I/O port block needed is 4 bytes
db 6 ;6 options for the base address
dw 330h, 230h, 130h, 334h, 234h, 134h
db 1 ;Device uses 1 memory block
db 30h ;Expansion ROM Base address register
dd 4000h ;Size of memory block needed is 16k
db 4 ;4 options for the base address
dd 0DC000h, 0D8000h, 0D4000h, 0D0000h
buslogic_scsi_end:
; ---------------------------- CMD IDE and Forex IDE ----------------------------------
; These two IDE cards has same Vendor ID and same Device ID (How !!!!!!!!!!!!!!!!!!!!!)
forex_ide_start:
db offset forex_ide_end - offset forex_ide_start
dw 1c1ch, 0001h ;Forex IDE Vendor ID / Device ID
db 00h ;Device is not VGA
db 0Eh ;Device must use IRQ 14
db 2 ;Device uses 2 I/O port blocks
db 10h ;Base address register 0
dw 8 ;Size of I/O port block needed is 8 bytes
db 1 ;1 option for the base address
dw 1F0h
db 14h ;Base address register 1
dw 1 ;Size of I/O port block needed is 1 byte
db 1 ;1 option for the base address
dw 3F6h
db 0 ;Device no memory blocks
forex_ide_end:
; ---------------------------- PCtech RZ1000 IDE ----------------------------------
; These two IDE cards has same Vendor ID and same Device ID (How !!!!!!!!!!!!!!!!!!!!!)
pctech_ide_start:
db offset pctech_ide_end - offset pctech_ide_start
dw 1042h, 1000h ;PCTech RZ1000 IDE Vendor ID / Device ID
db 00h ;Device is not VGA
db 0Eh ;Device must use IRQ 14
db 2 ;Device uses 2 I/O port blocks
db 10h ;Base address register 0
dw 8 ;Size of I/O port block needed is 8 bytes
db 1 ;1 option for the base address
dw 1F0h
db 14h ;Base address register 1
dw 1 ;Size of I/O port block needed is 1 byte
db 1 ;1 option for the base address
dw 3F6h
db 0 ;Device no memory blocks
pctech_ide_end:
;------ For S3 Vision 866/868/968, S3 Diamond Vision 968 -----------------
; S3 Vision 866/868 Vendor ID, Device ID = 5333h, 8880h
; S3 Vision 968 Vendor ID, Device ID = 5333h, 88F0h
; S3 Diamond Vision 968 Vendor ID, Device ID = 5333h, 88B0h
s3_868_vga_start:
db offset s3_868_vga_end - offset s3_868_vga_start
dw 5333h, 8880h ;Vision 868 Vendor ID / Device ID
db IGNORE_BIT7_4_DEV_ID+BAD_VGA_ATTRIBUTE
;Device is VGA, ignore bit7-0 of Device ID
db 0FFh ;Device may use any IRQ
db 0 ;Device uses no I/O port blocks
db 2 ;Device uses 2 memory blocks
db 10h ;Base address register 0
dd 4000000h ;Size of memory block needed is 64M
db 4 ;4 options for the base address
dd 80000000h, 90000000h, 0A0000000h, 0B0000000h
db 30h ;Expansion ROM Base address register
dd 8000h ;Size of memory block needed is 32k
db 4 ;4 options for the base address
dd 7F000000h, 7E000000h, 7D000000h, 7C000000h
s3_868_vga_end:
;--------------------------- C&T 65548 -----------------------------
; Added entry for C&T Flat Panel 65548 VGA Controller
ct_65548_vga_start:
db offset ct_65548_vga_end - offset ct_65548_vga_start
dw 102ch, 00dch ;C&T 65548 Vendor ID / Device ID
db BAD_VGA_ATTRIBUTE ;Device is VGA
db 0FFh ;Device may use any IRQ
db 0 ;Device uses no I/O port blocks
db 1 ;Device uses 1 memory blocks
db 30h ;Expansion ROM Base address register
dd 8000h ;Size of memory block needed is 32k
db 2 ;2 options for the base address
dd 21800000h, 26000000h
ct_65548_vga_end:
;--------------------------- XTEC AGX016A VGA -----------------------------
xtec_vga_start:
db offset xtec_vga_end - offset xtec_vga_start
dw 1061h, 0001h ;Xtec AGX016A Vendor ID / Device ID
db BAD_VGA_ATTRIBUTE ;Device is VGA
db 0FFh ;Device may use any IRQ
db 1 ;Device uses 1 I/O port blocks
db 10h ;Base address register 0
dw 100h ;Size of port block needed is 256 bytes
db 2 ;4 options for the base address
dw 8000h, 8100h
db 1 ;Device uses 1 memory blocks
db 30h ;Expansion ROM Base address register
dd 8000h ;Size of memory block needed is 32k
db 1 ;2 options for the base address
dd 0c0000h
xtec_vga_end:
;------------------------------ End of Table ---------------------------------
db 00h ;End of table marker
;------------------------------------------------------------------------------;
;*****************************************************************;
;*****************************************************************;
;** **;
;** (C)Copyright 1985-1996, American Megatrends, Inc. **;
;** **;
;** All Rights Reserved. **;
;** **;
;** 6145-F Northbelt Pkwy, Norcross, GA 30071 **;
;** **;
;** Phone (770)-246-8600 **;
;** **;
;*****************************************************************;
;*****************************************************************;
_text ends
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -