?? pcipost.asm
字號:
; []===========================================================[]
;
; NOTICE: THIS PROGRAM BELONGS TO AWARD SOFTWARE INTERNATIONAL(R)
; INC. IT IS CONSIDERED A TRADE SECRET AND IS NOT TO BE
; DIVULGED OR USED BY PARTIES WHO HAVE NOT RECEIVED
; WRITTEN AUTHORIZATION FROM THE OWNER.
;
; []===========================================================[]
;
;----------------------------------------------------------------------------
;Rev Date Name Description
;----------------------------------------------------------------------------
;R111A 06/01/99 RAY More for R111
;R111 05/31/99 RAY Re-write PCI_IRQ_SELECTABLE option. It will assign
; IRQs to devices according to PIRQx in the router
; instead of according to SLOT number.
;
; To use this new feature:
;
; 1. Add "PCI_IRQ_SELECTABLE EQU 1" in BIOS.CFG
; 2. Prepare a table "FixedIrqItemTable" in anywhere
; of your chipset files which describe the corresponding PIRQx items
;
; Example:
; FixedIrqItemTable LABEL NEAR
; db 1 ;PIRQ-0
; dw offset PIRQ0_IRQ ;item offset
; db 2 ;PIRQ-1
; dw offset PIRQ1_IRQ ;item offset
; db 3 ;PIRQ-2
; dw offset PIRQ2_IRQ ;item offset
; db 4 ;PIRQ-3
; dw offset PIRQ3_IRQ ;item offset
; db 5 ;USB INT Pin
; dw offset PIRQ4_IRQ ;item offset
; db -1 ;end of table
;
;
;R110 05/31/99 RAY Kill the switch NEW_PNP_SETUP because it is a assume
; to be a default in BIOS 6.0
;R109 05/28/99 TNY Fix system boot failure if 2 pieces DC39X SCSI card
; plugged.
;R108 05/24/99 TNY Clear "EDX" before PCI/ROM initial for fixing
; PCI compliance (Ex:3Com BootRom LanCard)
;R80A 05/15/99 TNY Fix USB node report conflict if "SHADOW_UNIT_64K"
; option defined.
;R107 05/14/99 STV Fixed "Init_Isa_Roms_addr" & "Init_Isa_Roms" some bug
;R105C 05/10/99 TNY Fix IT8888 (P2I) bridge is not affected by NOGO,
; so we must set IT8888 to subtractive mode earlier
; for fixing ISA VGA fail.
;R95A 05/07/99 RCH Fixed system hang up if Mylex DAC960 RAID controller
; is plugged and PS2 mouse is not installed.
;
;R105B 05/06/99 TNY We must call the "Patch_IT8888F" hook earlier for
; fixing ISA VGA.
;R106 05/04/99 RCH Fixed system hang up in POST while TI/PC1225 Cardbus
; and ATI/Rage LT Pro AGP work together.
;
;R105A 04/20/99 TNY Add IT8888F DMA channel programming followed by ITE.
;R105 04/16/99 TNY Fix IT8888F (P2I bridge) MISA can not work.
;R82B 04/02/99 RCH Fixed PCI/SCSI option ROM can not be initialized if
; the VGA device number is 0CH and the SCSI device
; number is 08H.
;
;R102A 04/01/99 TNY "PCI_IRQ_SELECTABLE" only set INTA-D to be selectable.
;R104 03/26/99 RCH Fixed system hang up while AHA2940/SCSI and RTL8139
; /LAN are plugged together on ALi chipset.
;
;R103 03/26/99 TNY Fix W83628F (P2I bridge) port 80h decode fail
; problem.
;R102 03/25/99 RAY Add slot5 to slot9 support for PCI_IRQ_SELECTABLE
;R101 03/22/99 RAY Disable the IO resource assigned to P2P bridge if
; no IO request is found behind this bridge.
;
; This is added to solved the problem of Intel's
; 440BX & 440LX AGP bridge, which is not fully decoded,
; will have problem installing NT4.0 with S3 PCI VGA
;
; Note:
; ----
; To disable a P2P bridge address, we simply use a
; method of assigning a base IO address of 0F000h to
; the bridge but with a limit of ZERO.
;
;R100 03/18/99 RCH Don't assign IRQ 9 for built-in audio controller to
; Patch VIA/686 south bridge bug. System will hang up
; while installing Win98 if the audio use IRQ 9.
;R92C 03/18/99 TNY Fixed coding error.
;R99 03/16/99 RAY NO "Check_M1_CPU" if it is not 586 BIOS
;R98 03/15/99 TNY Set PCI Latency time to be 20h (not 40h) for fixing
; some VGA card compability issue.
;R97 03/11/99 RCH Added Intel/ICH0 IDE controller checking.
;R96 03/09/99 RCH 1. Added Boot from LAN devices with Bootstrap Entry
; Vector (BEV) boot ROM support.
; 2. Fixed BIOS can not boot from Intel/559 boot ROM
; if the PnP/BEV Boot is enabled.
;R91A 03/08/99 KVN Fixed lan_command byte restore wrong data.That reason
; is the lann_command byte be temp stored in XGROUP, but
; Xgroup will be clear in POST_82S, so it always restore
; zero.Now we put it to stack of POST
;R95 03/04/98 JSN Fixed Mylex DAC960 RAID controller card cannot work
; successfully while the PS/2 mouse is not plugging and
; used flash 2M support.
;R78A 03/04/99 KVN Dont set IDE DMA capable status for all of IDE drive
; that avoid ZIP read fail in NT with DMA driver (installed
; service pack 4)
;R92B 03/03/99 TNY Fixed R92 coding error.
;R85A 03/01/99 RIC Fixed that VGA ROM added by CBROM can't be search in
; follow case:
; 1. Add VGA ROM by using old CBROM.
; 2. VGA ID don't match with VGA ROM added by CBROM.
; (If VGA ID don't match with VGA ROM added by CBROM,
; BIOS will use first VGA ROM added by CBROM.)
;R92A 03/01/99 RCH Fixed legacy USB not working after PCI ROM scanning
; if the shadow unit is 64KB.
;R94 02/23/99 RCH Fixed Avance Logic ALG2301 PCI VGA card failed with
; ROM scanning. This card decode VGA ROM at address
; 0C0000H when command register is on even though the
; ROM decode enable bit in config. space 30H is off.
;R93A 02/22/99 RCH Also mask IRQ 14 of 8259 for first IDE channel.
;R93 02/11/99 RCH Added a switch to mask 8259 for IRQ 15 if on-chip
; second IDE channel is diabled for PIIX platforms.
;R92 02/10/99 TNY Fix VGA BIOS corrupted if ISA VGA plugged.
; (SHADOW_UNIT_64K)
;R91 02/10/99 RAY Add BIOS.CFG swith: PciLanROM_Control. This switch
; allows the user to decide whether to invoke the onboard
; LAN chip's ROM or not
;
;R90 02/10/99 RAY Support ISA VGA for chipset having shadow unit
; 64K
;R82A 02/10/99 RIC Fixed that some VGA card use C8000-CFFFF address on
; over 32K VGA BIOS.(ex: RIVA TNT AGP card)
; It will cause other PCI ROM to hang in POST 52h.
; So assign 64K(Don't assign 48K) for over 32K VGA BIOS
; using.
;R89 02/08/99 RCH Added AMD-750 IDE controller checking for release IRQ 14
; & IRQ 15 if controller is disabled.
;
;R88 02/05/99 RCH Assign IRQ to PCI-TO-PCI bridge if requested.
;R73A 01/29/99 STV Not define "linear_rom_support",Because BIOS ROM is Linear ROM.
;R87 01/27/99 RCH Added STPC IDE controller checking for release IRQ 14
; & IRQ 15 if controller is disabled.
;R68A 01/27/99 RAY R68 Fix legacy-ISA's ROM shadowed fail which will
; cause all ISA PnP ROM space to be forced to shadowed.
; This is reported by a IBM token ring card cannot work
; properly.
;
;R86 01/21/99 MCH Added "No_Assign_IRQ5_For_PCILAN" define to avoid
; PCI LAN Card work in IRQ5 failure with some chipsets.
;R85 01/20/99 RCH Check option header (0AA55H) first then verify ROM
; checksum to save POST time if the ROM image is
; invalid.
;R84 01/15/99 KVN Fixed ROM size return from decompress to be destroy.
;R83 01/13/99 RAY Use Big real mode instead of protected mode during
; serching for VGA BIOS. Some M/B hangs here!
;
;R82 12/28/98 RAY 1. Add SHADOW_UNIT_64K switch for chipsets supporting
; shadow in terms of 64K Unit.
;
; 2. Kill the switch: CT_SHADOW_RW_HOOK_SUPPORT so that
; from now on if you want to use PCIP_NEW.ASM, you
; have to provide "Ct_Shadow_RW" & "Ct_Shadow_RW"
; in the F000 Segment of PCICHIP.ASM
;
;R81 12/23/98 MCH Fixed for most PCI/VGA have random dots/lines in the
; screen while starting to install Win95/98 if Cyrix
; 6x86 M1/M2 CPU is used with PCI Peer Concurrency and
; OnChip USB is enabled in VIA/VPX chipsets platform.
; It needs to add "Patch_MX_CPU_For_PCI_Peer_Con_USB"
; define in the BIOS.CFG for effectiveness.
;R80 12/22/98 RCH Fixed wrong device node report for option ROM size
; is not match with shadow unit if the shadow unit is
; 64KByte.
;R63B 12/25/98 AVN Fixed SiS 5600/530/620 when IDE channel disable and
; IRQ cannot release, because channel enable bits had
; swap.
;R79 12/14/98 TNY Add "WHITNEY_SPECIAL" option.
; Reason:
; It is exhibited to be truned on command register
; before I/O & memory address assigned, otherwise the
; system will hang-up.
;R78 12/09/98 KVN Force set IDE DMA status register of capable bits for
; windows NT service pack 4 to properly check DMA
;R77 12/09/98 TNY Fix cache line size register of P2P bridge always be
; 2. (it should be 8)
;R76 12/08/98 RCH Added Intel/ICH IDE controller checking.
;R57C 12/02/98 MIL Enable Master bit for Cyrix CX55x0 Onboard P2P bridge.
;R75 12/02/98 MIL Added code for Cyrix CX55x0 Chipset IDE Device.
; Fixed IRQ 14/15 was assigned for PCI card when the
; Two IDE Channel doesn't disable.
;R73 11/26/98 STV Fixed BIOS ROM change to Linear ROM define "linear_rom_support".
;R72 11/16/98 RAY No more Reserve_Irq_For_PciBootDev
;R70 11/16/98 RCH Temporarily patch system hang if the PPGA 370 CPU
; (CPUID=0665H) is configured with clock ratio 6
; (400Mhz) or 6.5(433Mhz)
;R68 11/05/98 RAY Fix legacy-ISA's ROM shadowed fail.
;R63A 10/22/98 AVN Support IRQ 14/15 was assigned for PCI card to all
; SiS chipset.
;R56D 10/08/98 RCH Rewrite routine for clearing PME# status to support
; other devices (like MODEM etc.)
;
;R67 10/06/98 RAY Some M/B wants to reserved E000h IO space for
; their customers.
;
; Solution
; --------
; Add compiler variable "PCI_IO_LIMIT" for BIOS.CFG
; to config the top IO address which is appropriate.
; In this case, add "PCI_IO_LIMIT EQ 0E000h" in
; BIOS.CFG.
;
; Note: this variable only applies to the new PCIPOST.ASM
; i.e. PCIP_NEW.ASM
;
;R66 10/02/98 RAY Some M/B maker share the same "SCSI onboard BIOS"
; for 2 different M/B w/ and w/o SCSI devices.
; However the SCSI_SLOT location for the non-SCSI
; device is a P2P bridge.
;
; Here in the BIOS we do a checking for storage device
; before we disable the device on that SLOT
;
;R64A 10/02/98 RIC Add "No_ACPI_IRQ_Auto_Assign" definition for R64 code.
;R64 09/23/98 RIC Change ACPI IRQ assign algorithm to Auto-assigned.
; (This function is only support in VIA SouthBridge now)
; If you want to use old algorithm, please define:
; 1."No_ACPI_IRQ_Auto_Assign" for disabled new algorithm.
; 2."ACPI_IRQ_Selectable" for enabled old algorithm.
;R63 09/22/98 RCH Fixed IRQ 14/15 was assigned for PCI card when the
; HDD is installed on secondary channel and there is
; no device on primary channel for SiS chipset.
;R56C 09/22/98 RIC Fix that WOL hang in POST 0Dh in some VIA mainboard
; (with 596 SouthBridge).
;R62 09/18/98 RCH Open IRQ 6 as available IRQ for PCI devices. If
; platform need this feature, the value of
; "AVAILABLE_PCI_IRQ" must be modifed also to have IRQ 6
; available for assignment .
;R21C 09/11/98 RAY Fixed ISA occupied address temporary shadowed
; we invoking PCI ROM.
;
; This bug was found when PCI SCSI & the M-System chip
; were both installed. If the M-System(ISA) area was
; shadowed, the system would hang up inside the SCSI
; ROM since the M-System area was not only ROM but
; some direct memory-map storage on the chip.
;
;R61 08/21/98 RCH Added a switch to support onboard PCI VGA located on
; PCI bus above "0" and the chipset support AGP.
;
; Note : "R22C" & "R21B" are used to fix working failure for
; "IBM ISA/PnP Token-Ring LAN card"
;R22C 08/21/98 RAY Do not report device node for ISA ROM which size is
; not matched with the shadow size
;
;R21B 08/21/98 RAY Temporary removed the changes that R21 & R21A had been
; made since they caused the ROM area assigned by ISA PnP
; being shadowed.
;
; Due to R21 & R21A fixed the combination of M-System
; ROM & PCI SCSI ROM conflict & this kind of combination
; is comparatively less that ISA PnP devices with ROM.
; Further investigation on this will be carried out to
; fix this combination.
;
;R56B 08/19/98 TNY Always clear PME status is plugged LAN card support
; PME#.
; Method:
; Rx(34h) is the power-management capabilities
; pointer. And the Cap register bit 31-27 is the
; PME-Support register ( 0 = No PME# supported).
; If PME# supported , we can R/W the Cap register bit 47
; to clear the PME status.
;R60 08/13/98 STV Added ACARD SCSI ID for Force_ROM_For_Some_Devices func.
;R59 08/11/98 RCH Patch system hang up while scanning onboard C&T 6XXXX
; VGA ROM register if Intel MMO module for 430TX is
; used.
;R58 08/06/98 RAY Fixed PCI memory space conflict when VGA in bus 0 and
; a lots of PCI cards behind P2P bridge with much memory
; space requested.
;R56A 08/05/98 TNY 1.Fix some chipset WOL fail.
; 2.Fix WOL fail if two 558 LAN card plugged.
;R57A 07/29/98 RCH Fixed USB legacy keyboard not working caused by R57
;R57 07/29/98 RCH Don't turn on bus master bit before assigning resource
; for PCI devices. It cause system hang up when COGNEX
; MVS 8100 is plugged and system memory is 128Mb for
; SiS5571 chipset.
;R56 07/28/98 TNY Clear PCI LAN card's power-on status register
; for fixing power-on fail next time.
;R55 07/23/98 KVN Change method of decompressing in protect mode
;R53 07/16/98 KEN Added delay between two memory write/read at routine
; "Prepare_LMEM_Resource", otherwise the UMB will be
; recognized as all RAM occupied if some ISA cards
; installed.(e.g. Simple's PC card reader/writer)
;R51 07/02/98 BAR Rewrite int19.
;R50 06/26/98 RCH Disabled VGA ROM space decode immediately after
; VGA BIOS is copied to buffer to fix display failure
; for CirrusLogic CL7555 PCI VGA card.
;R49 06/03/98 TNY Fix both AGP VGA card and P2P VGA card plugged, the
; AGP VGA card always is the highest priolity display.
ifdef MASM611
.MODEL SMALL, BASIC
OPTION PROC: PRIVATE
endif ;MASM611
.386P
PAGE 56, 132
;.XLIST
INCLUDE BIOS.CFG
include COMMON.EQU
INCLUDE COMMON.MAC
include bsetup.inc
include fshadow.equ
ifndef NO_PNP_PCI_AUTO
ifdef PNP_BIOS
PNP_PCI_AUTO EQU 1
endif ;PNP_BIOS
endif; NO_PNP_PCI_AUTO
ifdef PCI_BUS
;R59 - start
PATCH_ONBOARD_CT_6XXXX_VGA = 0
ifdef NO_SCAN_ONBOARD_VGA_ROM
PATCH_ONBOARD_CT_6XXXX_VGA = 1
endif; NO_SCAN_ONBOARD_VGA_ROM
;R59 - end
IRQ12_LAST_FOR_PCI EQU 1
SET_MPIRQ_TBL = 0
ifdef MP_SUPPORT
ifdef NEW_INTEL_IOAPIC
SET_MPIRQ_TBL = 1
endif; NEW_INTEL_IOAPIC
endif; MP_SUPPORT
endif; PCI_BUS
;R51 ifdef LAN_BOOT_SUPPORT
;R51 extrn LanBoot_Item:near
;R51 endif ;LAN_BOOT_SUPPORT
ifdef PNP_BIOS
include PNP.EQU
endif ;PNP_BIOS
Public NCR_810_FOUND
PUSH_ALL MACRO
push ds
push es
pushad
ENDM
POP_ALL MACRO
popad
pop es
pop ds
ENDM
;[]================================================================[]
; EQUATES
;[]================================================================[]
;717;TEMP_AREA EQU 3000H
CLASS_VGA EQU 03h
ALT_CLASS_VGA EQU 0001h
CLASS_IDE EQU 0101h
CLASS_SCSI EQU 0100h
CLASS_PP_BRIDGE EQU 0604H
CLASS_USB EQU 0C03h
PCI_VGA_CLASS EQU 03H
NORMAL_VGA_CLASS EQU 0001H
CIRRUS_VENDOR_ID EQU 1013H
NCR_VENDOR_ID EQU 1000h
DEVICE_NCR810 EQU 0001h
DEVICE_NCR860 EQU 0006h
ADAPTEC_VENDOR_ID EQU 9004h
DEVICE_AHA7850 EQU 5078h
DEVICE_AHA7860 EQU 6078h
DEVICE_AHA7870 EQU 7078h
DEVICE_AHA7880 EQU 8078h
DEVICE_AHA7895 EQU 7895H
BusLogic_VENDOR_ID EQU 104bh
DEVICE_BA81C15 EQU 8130h
ACARD_VENDOR_ID EQU 1191h
DEVICE_ACARD6710 EQU 8002h
AMD_VENDOR_ID EQU 1022h
DEVICE_AMD974_SCSI EQU 2020h
;[]================================================================[]
; BP definitions
;[]================================================================[]
STACK_LOC = ITEMSTAT_BUF
DEFINE_STACK MACRO VAR_NAME, VAR_LEN
Public VAR_NAME
VAR_NAME = STACK_LOC
STACK_LOC = STACK_LOC + VAR_LEN
ENDM
DEFINE_STACK START_PCI_DEV , 1
DEFINE_STACK END_PCI_DEV , 1
DEFINE_STACK AVAILABLE_PREFET_START , 4
DEFINE_STACK AVAILABLE_MEM_START , 4
DEFINE_STACK AVAILABLE_IO_START , 4
DEFINE_STACK PREFET_MEM_BUF_PTR , 2
DEFINE_STACK HMEM_BUF_PTR , 2
DEFINE_STACK IO_BUF_PTR , 2
DEFINE_STACK LMEM_BUF_PTR , 2
DEFINE_STACK BASE_REQ_BUF_PTR , 2
DEFINE_STACK PCI_VGA_DEVICE_BUF_PTR , 2
DEFINE_STACK CURRENT_DEVICE_ID , 2
DEFINE_STACK CURRENT_VENDOR_ID , 2
DEFINE_STACK CURRENT_CLASS_CODE , 2
DEFINE_STACK CURRENT_SLOT , 1
DEFINE_STACK CURRENT_BUS_NO , 1
DEFINE_STACK TOTAL_BUS_NO , 1
DEFINE_STACK DEVICE_CLASS_FLAG , 1
LAN_NOW EQU 080H
LAN_FOUND EQU 040H
RAID_FIRST EQU 020H
;------------------------------------------------------------
;
; LMEM_RESOURCE[bp]
;
;each bit describes 4K ROM(Shadow RAM) area
; starting from C8000h - DF000h
; i.e. bit 0 = 1 means C8000h-C8FFFh is occupied
; 1 = 1 C9000h-C9FFFh is occupied
; .
; .
; .
;
;------------------------------------------------------------
DEFINE_STACK LMEM_RESOURCE , 4
DEFINE_STACK AVAIL_LMEM_ADDR , 4
DEFINE_STACK TARGET_AVAIL_LMEM , 4
DEFINE_STACK LMEM_FOR_ROM_FLG , 1
DEFINE_STACK NEED_ASSIGN_LMEM_FLAG , 1
DEFINE_STACK LMEM_BEFORE_ROM , 4
DEFINE_STACK LMEM_RESERVED , 4
DEFINE_STACK PCI_VGA_INFO , 2 ;bus/dev+Fun No.
DEFINE_STACK PCI_VGA_FOUND , 1
VGA_DEVICE_EXIST EQU 0AAh
DEFINE_STACK VGA_BIOS_LENGTH , 1
;-------------------------------------------------------------
;for Ct_PCI_VGA_IDSEL to report a onboard VGA P2P device no.
;Just fill ONBOARD_VGA_P2P[BP] with the P2P bridge's device(func)
;number to inform the PCI kernel.
;-------------------------------------------------------------
DEFINE_STACK ONBOARD_VGA_P2P , 1
DEFINE_STACK NCR_810_FOUND , 1
NCR_SCSI_FOUND EQU 0BBh
INVOKE_NCR_CBROM EQU 0AAh
DEFINE_STACK COMBINED_PCI_ROM_NEED , 1
DEFINE_STACK CBROM_BP_START , 2
DEFINE_STACK CBROM_BP_END , 2
DEFINE_STACK CBROM_BUF_START , 4
DEFINE_STACK CBROM_BUF_END , 4
;717;DEFINE_STACK PCI_CBROM_TEMP , 1
DEFINE_STACK PCI_CBROM_ADDR , 4
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -