📄 pmupost.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
;----------------------------------------------------------------------------
;OEM23 08/17/00 AVN Fill SB Function 4 Sub Class Code to other bridge.
; Fixed PCI List tool test AGP aperture size is always
; 256M after resume for STR.
;OEM22 08/17/00 AVN Fixed resume from S3 under WIN98 will become a blue
; screen by use source CD from HP.
; The root cause is when resume from S3, the SSID on AGP
; must same as before standby.
;OEM21 08/08/00 AVN Added VT686B version B support.
;OEM20 07/05/00 AVN Fixed Maxtor AGP G400/G200 resume from STR under W2k
; then system hang.
;OEM19 06/14/00 AVN Fixed when PS2 keyboard and USB keyboard are connect
; to the board, if 'wakeup from this device' option of
; USB keyboard was enable, then goto standby mode (S1),
; however the PS2 keyboard can wakeup the system even
; 'wakeup from this device' of PS2 keyboard was dsiable.
; Because VIA686A no keyboard wakeup bit for SCI, so we
; borrow the GPI6 for _PRW and we can know the state on
; the power box of PS2 keyboard.
;OEM18 05/26/00 AVN Change PME#/RI# method, under APM OS and it follow the
; setup item, if undel ACPI OS and it follow OS request.
;OEM17 05/26/00 AVN Fixed when resume from S3 and maybe BIOS not grown to
; perfection cause hang at POST, and must press power
; buttom (over-ride) 4 seconds to power off system, it
; will cause system always hang at post, the only way to
; boot again is unplug the power cable.
;OEM16 05/22/00 AVN Fixed PCI PME function En/Dis should follow setup
; value under APM mode and clear it before wakeup.
;OEM15 05/18/00 AVN Fixed screen have flash noise if usb legacy support
; and usb keyboard was press.
;OEM14 05/18/00 AVN Fixed when WIN95 OSR2 entry suspend mode then wakeup
; by ring and system will hang.
; For safely, we should also clear PME wakeup source
; and status bit.
;OEM13 05/10/00 AVN Fixed system couldn't enter hibernate after the timer
; time-out from Win2000 standby timer that set by user.
; Workaround:
; In Win2000
; Set standby timer to 1 Min
; Set hibernate timer to 2 Min.
;OEM11A 05/10/00 AVN Fixed Win2000 HCT 9.5 WOR/WOL still fail.
;OEM12 05/10/00 AVN Added Subsystem vendor ID and device ID for IDE/ACPI
; device to pass win2000 HCT9.501 Pre-OS test.
;OEM11 04/27/00 AVN Fixed Win98SE HCT 9.5 WOR/WOL fail.
;OEM04C 04/24/00 CEC Fixed system hang if modem ring singal is lasting.
;OEM10 04/21/00 AVN Change SUSST#/GPO3# always set to SUSST#, by define
; 'Always_Set_SUSST' request from FIC.
;OEM09 04/21/00 AVN Fixed QAPLUS version 5.52 com ports DTR/DSR test fail,
; system will hang and show stack overflow.
;OEM06A 04/16/00 CEC Support 'PME' & Modem 'RI' wake-up in S4.
;OEM08 04/14/00 AVN Fixed SCSI access fail if resume from S3. We should
; save all slot's pci configure.
;OEM07 04/13/00 AVN Fixed North/South bridge subsystem vendor ID and device
; ID was fail when resume from S3.
;OEM06 04/13/00 CEC Support 'PME' & Modem 'RI' wake-up in S3.
;OEM03A 04/11/00 CEC Add 'No_PME_PowerOn_of_S5' switch.
;OEM04B 04/11/00 CEC Fix 'ALWAYS_DISABLE_RING_POWER_ON' fail randomly.
;OEM04A 04/10/00 CEC Fix 'Ring wake-up' fail as 'ALWAYS_DISABLE_RING_POWER_ON'
; is defined.
;OEM05 04/07/00 AVN Remove unusefull cyrix code for maybe smbase code size
; too large cause flash fail if flash via smi.
;OEM04 04/06/00 RAX Add "ALWAYS_DISABLE_RING_POWER_ON" define.
;OEM03 03/24/00 CEC Add 'PME Resume' function.
;OEM02 03/21/00 JKY Fixed no S4_SUPPORT complier mistake.
;OEM01 03/16/00 AVN Added PS2 cannot wakeup system under APM mode.
;R74 03/15/00 ADS Add "SMI_Use_Level_Trige" define.
;R73 03/15/00 ADS Fixed win98 shutdown to dos usb keyboard can't be used.
;R72 03/15/00 VIN Fixed STR fail when select AntiVirus Protect Enable.
;R71 03/14/00 JDN Fixed compile error for MP STR.
;R70 03/09/00 ADS Fixed Leagcy USB keyboard enable S1 can't wakeup in S1
; for win2000.
;R69 03/08/00 MIL Added "Suspend_PlaneA_Control" define.
; for send low signal from SUSA# pin.
;R68 03/08/00 VIN Fixed always ring wake up.
;R67 03/07/00 JDN Reassign memory size for MP STR.
;R66 03/03/00 ADS Fixed Evt_HDD_Item & Evt_LPT_COM_Item disable can't
; suspend.
;R65 03/02/00 ADS Fixed NT_FLASH +DMI_ENABLE to cause USB keyboard can't
; work.
;R64 02/28/00 AVN Fixed Subsystem Vendor and Device ID fail when resume
; S3 state. Because it will rewrite at Restore_Ct_device
; in PMUPOST.ASM, so we use define instead ASCII code.
;R37D 02/25/00 ADS Add "Dont_Open_SUSX_Reg" define to patch some cutomer
; S1 hanged in wakeup when SUSx single error.
;R63 02/24/00 RIC Fixed that 8371/8363 chip have garbage SMI in POST.
;R62 02/23/00 ADS Add "Skip_First_KEY" define for customer request.
;R61 02/18/00 RIC Support platform without KBC for legacy free system.
;R60 02/18/00 RIC Fixed that 8371 chip can't use USB legacy Keyboard
; after shutdown to DOS.
;R53A 02/17/00 RIC Report USB legacy support enabled in E000_Ct_Enable_SMI
; Routine when USB1 disabled/USB2 enabled.
;R59 02/17/00 RIC Fixed that GPO1/GPO2 control fail in S3 BIOS.
;R58 02/16/00 AVN fixed when power failure set auto then shotdown system
; and un-plug power core, and then plug again, system
; will auto power on.
;R55A 02/16/00 RIC Fixed that R55 code lose clearing some Record WOL Info.
;R57 02/15/00 ADS Support VT596B for "Blink_Suspend_LED_In_GPO0" function
;R56 02/14/00 RIC Fixed that some LAN card hang after USB_INIT.
;R55 02/10/00 RIC Fixed that No LAN card still Record WOL Info.
;R54 02/02/00 RIC Fixed that RI# SCI resume always be enable because
; this register have 5VSB in new chipset.
;R53 02/01/00 RIC Report USB legacy support enabled in Ct_Usb_Init Routine
; when USB1 disabled/USB2 enabled.
;R44A 01/28/00 RIC Move R44 code to Ct_Restore_S3_Status after
; Restore_S3_Status routine for 8601 chip.
;R52 01/27/00 ADS Added Support USB Floppy when Define "USB_STORAGE_SUPPOT".
;R51A 01/26/00 RIC Fixed that the mistake of R51 code cause some Display
; Card can't resume from S3.
;R51 01/25/00 RIC Don't restore Reg3E in S3 for Specail Display Card.
;R13B 01/25/00 RIC Fixed that R13 code mistake cause some VGA can't resume
; from S3.
;R48A 01/24/00 RIC Fixed that R48 code cause always report RTCW(RTC Wake).
;R50 01/21/00 RIC Report 0B0000h SMBase to let S4(STD) be more stable
; in 8371 chip.
;R49 01/21/00 RIC Clear legacy usb smi status to fix win98se ACPI mode
; shutdown to DOS Legacy USB can not work in 686CG.
;R48 01/21/00 RIC Add flag to identify different wake up events to pass
; Win2000 one minute standby/hibernate test.
;R47 01/19/00 AVN Trun off power led (control GPO0) before power off.
;R46 01/19/00 AVN When onboard haven't USB2, should not have USB2 reg.
;R45 01/19/00 RIC Add Int15_Func5F routine for Trident VGA BIOS of 8601.
;R37C 01/18/00 RIC Don't program SUSST1/GPO3 in POST because it be
; maintain in S3/PowerOff state.
;R44 01/14/00 RIC Fixed that 8601 F version chip AGP_Brg Reg44[5] must
; be 1.
;R43 01/14/00 RIC Fixed that Flash_IN_SMBASE function fail in 8371 chip.
;R42 01/10/00 RIC Fixed that lose 'ret' in Disable_PM_Timer routine.
;R41 01/10/00 ADS Fixed lan can't power on in acpi mode.
;R40 01/07/00 ADS Remove useless function.
;R37B 01/07/00 RIC Re-write the code of SUSST1# patch.
;R37A 01/05/00 RIC Fixed that R37 code cause S3 resume to be unstable.
;R35A 01/04/00 RIC Fixed that R35 code cause 8371 K7 chip S3 resume to be
; unstable
;R39 01/03/00 RIC Fixed that code mistake cause some PM status no clear.
;R04C 01/03/00 RIC Share this file with 6a6ll.
;R38 01/03/00 RIC Fixed that PME_SUPPORT definition cause W200 can't
; wake-up from S1.
;R34A 12/31/99 RIC Fixed that R34 code cause 694X chipset sometimes hang
; in S3 resume.
;R37 12/30/99 RIC Patch that SUSST1# of S1 state change to Low to cause
; some mainboard hang in S1 state.
;R36 12/30/99 RIC Add "USB_Resume_CMOS" definition.
;R35 12/30/99 ADS Added S3 support for Gobi cpu.
;R34 12/30/99 RIC Fixed that Shadow register can't be restore at S3
; Resume in 8371 chip.
;R33 12/28/99 RIC Fixed that Win2000 hang in Ring wake-up from S1.
;R32 12/27/99 RIC Let Issue_sw_smi can input AL value.
;R31 12/24/99 ADS Re-init alarm, powerbutton & modem ring functions in post
;R30 12/23/99 ADS Fixed Wake On GPI Support function (ex:keyboard poweron)
; can't auto shutdown when no io trap.
;R29 12/20/99 RIC Fixed that some customer's mainboard have garbage SMI
; to cause hang in changing SM Base.
;R28 12/20/99 ADS Fixed Cyrix cpu(370)in win98(ACPI)can't auto shutdown.
;R27 12/20/99 RIC Remove no use code.
;R26 12/16/99 RIC Code Ct_Open_SM_RAM/Ct_Close_SM_RAM for 8371 chip
;R25 12/16/99 GAR Fixed hang when shut down from ACPI and plug PS2 mouse
;R24 12/16/99 RIC Restore K7 CPU special Reg in S3 Resume for 8371 chip.
;R23 12/15/99 RIC Fixed that video always turn off in APM D1/D3 according
; to Setup item when use "Have_Fan_Control_Item_In_GPO"
; "Have_LED_Control_Item_In_GPO" definition.
;R22 12/15/99 ADS Let EXTSMI can be used.
;R21 12/14/99 RIC Support K7 S3(STR) State for 8371 chip.
;R05A 12/13/99 RIC Fixed that AC97 have "!" mark in Win98 with new AC97
; audio driver.
;R16A 12/10/99 RIC Fixed that R16 code cause S3 resume fail.
;R20 12/09/99 ADS Fixed S4 can't auto-poweroff.
;R19 12/08/99 ADS Add "Have_LED_Control_Item_In_GPO" function
;R18 12/08/99 RIC Fixed APM testing utility APM_RUN.EXE failure in 8371
; chip when USB legacy support is enabled.
;R17 12/08/99 RIC Remove no use code.
;R12A 12/08/99 RIC Fixed that Pre-OS ACPI test fail in Timer test.
;R16 12/07/99 RIC Fixed that AGP card can't entry D1 state in W2000.
;R15 12/07/99 ADS Disable SMI in ACPI.
;R13A 12/03/99 RIC Fixed that R13 code lose S3_support definition to cause
; compile error.
;R14 12/03/99 RIC Fixed that 8371 chip sometimes hang in IO Trap SMI.
;R13 12/02/99 RIC Modify S3 VGA save/restore algorithm to support more
; VGA card.
;R12 12/02/99 ADS Add "Patch_Pre_OS_ACPI_Test_Prg" define to patch pre-os
; test program that IO trap SMI actived too fast to hanged.
;R11 12/01/99 RCH It is not necessary to manage HALT instruction in
; SMI handler for Pentium II/III class CPUs. Return
; to previous HALT instruction cause some failures
; on several OS such as OS2/Warp, Linux ...
;R10 11/26/99 RIC Let the code of Clear_PME_Before_Off be standard.
;R09 11/23/99 RIC Fixed that losing DGROUP pointer cause getting a error
; value of Setup item.
;R08 11/22/99 RIC Change coding method to avoid register feature conflict.
;R07 11/19/99 RIC Add "AMR_WakeUp_Support_In_APM" definition.
;R04B 11/17/99 RIC Fixed that compile error in S3_Support.
;R06 11/17/99 ADS Added "OEM_Z1_Service_Roution" define.
;R05 11/16/99 RIC Add "AMR_WakeUp_Support" definition.
;R04A 11/16/99 RIC Fixed that compile error in 6a6lk.
;R04 11/15/99 RIC Share this file with 6a6li/6a6lk.
; (old file backup to PMUPOST.OLD)
;R03 11/15/99 RIC Fixed that press keyboard contiguously will hang in
; IO Trap SMI handler.
;R02 11/11/99 RIC Fixed that LAN bootable Card can't Wake-Up by the
; method of Wake ON LAN.
; Reasion:
; Kernel Code change method to "No Enable PME" to
; cover PC99 test.
; Solution:
; Enable PME in the code of chipset.
;R01 11/04/99 RIC Fixed that RTC Alarm fail in setup setting 0:0(mm:ss)
; after cleared CMOS.
;R00 11/03/99 RIC Re-Initialization.
.386p
PAGE 56,132
TITLE CHIPSET -- 686 EISA/ISA ROM/BIOS
include BIOS.CFG
include BSETUP.INC
include COMMON.MAC
include COMMON.EQU
include POST.MAC
include CMOS.EQU
INCLUDE CHIPSET.EQU
include 8042.EQU ;R61
ifdef VT8371
include K7MSR.EQU
ifndef Not_Init_Cyrix ;R35A
Not_Init_Cyrix EQU 1 ;R35A
endif; Not_Init_Cyrix ;R35A
endif; VT8371
_SMI_ENTRY EQU 0d0h
SMI_IDLE EQU 0d1h
SMI_SUS EQU 0d3h
ifdef APM_IN_SMBASE
COMPILE_FOR_APMBIOS = 1
include APM.INC
endif ;APM_IN_SMBASE
ifdef Flash_IN_SMBASE
COMPILE_FOR_APMBIOS = 1
include SMIFlash.INC
endif ;Flash_IN_SMBASE
ifdef VT8371
extrn Jump_Open_PM_RAM:near ;R04
extrn Jump_Close_PM_RAM:near ;R04
extrn Write_F000_shadow_Word:near ;R04
extrn Enable_FixMtrr_Mod:near
extrn Disable_FixMtrr_Mod:near
extrn K7_FixMtrr32K_Wr:near
endif; VT8371
ifdef MP_SUPPORT
extrn If_MP_Plugged:near
endif ;MP_SUPPORT
extrn Get_Cmos:near
extrn Set_Cmos:Near
ifndef CRT_Control_Not_In_F000
ifndef CRT_Control_Not_In_APM
extrn Enable_CRT:near
extrn Disable_CRT:near
endif ;CRT_Control_Not_In_APM
endif ;CRT_Control_Not_In_F000
extrn PM_Option_Item:near
extrn PM_Auto_Table:near
extrn VGA_Type_Item:near
ifdef VT8371 ;R04
ifdef Doze_Timer_Support ;R04
extrn Doze_Timer_Item:near ;R04
endif; Doze_Timer_Support ;R04
else; VT8371 ;R04
extrn Doze_Timer_Item:near
endif; VT8371 ;R04
extrn Susp_Timer_Item:near
extrn Wait_APM_Item:near
extrn Video_Off_Item :near
extrn HDD_Timer_Item:Near
extrn IRQ3_Event_Item:Near
extrn IRQ4_Event_Item:near
extrn IRQ5_Event_Item:near
extrn IRQ6_Event_Item:near
extrn IRQ7_Event_Item:near
extrn IRQ8_Event_Item:near
extrn IRQ9_Event_Item:near
extrn IRQ10_Event_Item:near
extrn IRQ11_Event_Item:near
extrn IRQ12_Event_Item:near
extrn IRQ13_Event_Item:near
extrn IRQ14_Event_Item:near
extrn IRQ15_Event_Item:near
extrn Get_PMU:near
extrn Get_Set_PMU:near
extrn Set_PMU:near
extrn Get_Set_PMU_OR:near
extrn Get_Set_Ct_AND:near
extrn Get_Set_PMU_AND:near
extrn GET_SET_CT:near ;R04B
extrn GetItem_Value:Near
extrn Get_PM_RAM_Seg:near
extrn Open_PM_RAM:near
extrn Close_PM_RAM:near
ifdef VT8371 ;R21
extrn Not_Protect_RW:near ;R21
extrn Not_Protect:near ;R21
endif; VT8371 ;R21
extrn Evt_HDD_Item:near
extrn Evt_DMA_Item:near
extrn Evt_INTR_Item:near
extrn Evt_LPT_COM_Item:near
extrn M_Evt_VGA_Item:near
ifdef Have_Conserve_Item
extrn Conserve_Mode_Item:near
endif; Have_Conserve_Item
extrn Alarm_Item:near
extrn PWRBTN_OVRD_Item:Near
extrn Ring_Item:Near
ifdef ABIT_Have_Suspend_Fan_Item
extrn Fan_Item:Near
endif; ABIT_Have_Suspend_Fan_Item
ifndef New_Superio_Led_Function
ifdef PM_LED_USE_GPIO
extrn Set_PM_LED:near
endif; PM_LED_USE_GPIO
ifdef LED_Blinking_at_PM
extrn Set_PM_LED_Blinking:near
endif; LED_Blinking_at_PM
ifdef Power_Led_Selection
POWER_LED_USE EQU 1
endif ;Power_Led_Selection
ifdef POWER_LED_USE
extrn Set_power_led:near
endif; POWER_LED_USE
else ;New_Superio_Led_Function
ifdef LED_Blinking_at_PM
extrn Set_power_led:near
endif; LED_Blinking_at_PM
endif ;New_Superio_Led_Function
;R40 ifdef HDD_PWRDOWN_IN_SUSPEND
;R40 ifndef HDD_always_PWRDOWN_IN_SUSPEND
;R40 extrn HDD_Power_Item:near
;R40 endif ;HDD_always_PWRDOWN_IN_SUSPEND
;R40 endif; HDD_PWRDOWN_IN_SUSPEND
;R40 ifdef Break_Suspend_In_Mouse_CMOS
;R40 extrn Mouse_Irq_Item:near
;R40 extrn CONFIG_TABLE:near
;R40 extrn system1_byte:near
extrn system1_byte:near ;OEM01
;R40 endif; Break_Suspend_In_Mouse_CMOS
extrn Post_call_proc:near
extrn F000_call_proc:near
extrn F000_GetItem_Value:near
extrn Get_PMIO:near
extrn Set_PMIO:near
extrn Get_Set_PMIO:near
extrn Get_Set_PMIO_OR:near
extrn Get_Set_PMIO_AND:near
extrn Set_PMIO_Clear:near
extrn AGet_CfgSpace_Word:near ;R51
extrn Get_cfgspace_Dword:near ;OEM12
extrn Set_cfgspace_Dword:near ;OEM12
extrn Issue_SW_SMI:near
ifndef VT8371
extrn check_if_cyrix_p6:near
endif; VT8371
extrn F000_Func_End:near
extrn F000_Vect:near
ifdef ACPI_Support
extrn ACPI_Info_Byte:Near ;R48
extrn ACPI_option_Item:near
extrn fPROC_Set_HDD_Standby_Timer:far
IFDEF ACPI_IRQ_Selectable
extrn Assign_ACPI_IRQ_Item:near
ENDIF;ACPI_IRQ_Selectable
ifdef S4_SUPPORT
extrn Do_S4_Suspend:far
extrn E_S4_Resume:far
extrn WakeUP_VGA:far
extrn REAL_IDT_LOC:near
endif; S4_SUPPORT
ifdef S3_support
;R71 - start
IFE BIOS_SUPPORT_AMD_K7
ifdef MP_Support
extrn Get_Set_Ct_OR:near
endif ;MP_Support
endIF ;BIOS_SUPPORT_AMD_K7
;R71 - end
extrn Save_S3_Status:far
extrn Restore_S3_Status:far
Extrn Software_SMI:near
Extrn Five_V_Tbl:near
extrn Set_PCI1:near
extrn Get_PCI1:near
extrn Set_Ct:near
extrn Get_Ct:near
Extrn SIZE_SYS_INITS:ABS
Extrn SYS_INITS:WORD
;R35 - starts
ifndef Not_Init_Cyrix
extrn UNlock_Cyrix:near
extrn lock_Cyrix:near
endif ;Not_Init_Cyrix
;R35 - ends
endif ;S3_support
endif ;ACPI_Support
ifdef PME_SUPPORT
extrn PME_WakeUp_ITEM:near
;OEM03 - Start
ifdef PME_Resume_CMOS
extrn PME_Resume_ITEM:near
endif ;PME_Resume_CMOS
;OEM03 - End
endif ;PME_SUPPORT
;R41 - starts
ifdef Wake_On_GPI_Support
Enable_LAN_Boot_Fun EQU 1
endif; Wake_On_GPI_Support
IFDEF WAKE_LAN_BY_LID
Enable_LAN_Boot_Fun EQU 1
endif; WAKE_LAN_BY_GPI
;R41 - ends
ifdef Notebook_Power_Management
extrn Suspend_0V:near
extrn Resume_0V:near
extrn Suspend_Option_Item:near
extrn OS_TYPE_ITEM:near
endif ;Notebook_Power_Management
Extrn ConfigurePProL2Cache:near
ifdef Software_I2C_In_SMBase
IFDEF SMBus_Port
extrn WaitSMBus:near
ENDIF; SMBus_Port
endif; Software_I2C_In_SMBase
ifdef W83977EF
W83977TF EQU 1
endif ;W83977EF
ifdef W83977TF
ifdef MOUSE_BUTTON_ON_SUPPORT
extrn Get_977:near
extrn Set_977:near
extrn Unlock_977:near
extrn Lock_977:near
endif ;MOUSE_BUTTON_ON_SUPPORT
endif ;W83977TF
IFDEF USB_SUPPORT
ifndef NO_KBC ;R61
ifdef USB_MOUSE_SUPPORT
extrn USB_Mouse_Item:near
endif ;USB_MOUSE_SUPPORT
extrn ONBD_USB_Item:near
extrn Usb_Legacy_Item:near
endif; NO_KBC ;R61
;R63 ifdef VT8371 ;R04
;R63 Redo_UsbSmi EQU 1 ;R04
;R63 endif; VT8371 ;R04
COMPILE_FOR_USBBIOS = 1
include USBBIOS.ASM
ENDIF ;USB_SUPPORT
extrn POST_decompress:near
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -