📄 sus2disk.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
;----------------------------------------------------------------------------
;OEM03 08/26/00 AVN Fixed HP CD writer when resume from STR under WIN98,
; and read fail, the patch way is set a identify command
; before boot to WIN98.
;OEM02 07/05/00 AVN Fixed there are two CD_ROM at same channel, and enable
; DMA function, when resume from STR mode under W98 then
; system will hang.
;OEM01 07/03/00 AVN Added define 'No_PM_Beep_at_Resume' for no beep after
; resume from S3/S4.
;R97A 03/21/00 JKY Fixed compiler error.
;R97 03/21/00 JKY Fixed no S4_SUPPORT compiler mistake.
;R96 03/20/00 ARV Fixed From S3 Resume Test "WinBench 99" Performance
; Will Fall off.
;R95 03/16/00 GAR Make Get_SMBASE_ADD always exist
;R94 03/09/00 PAL Added VIA686HM sensor support for S3
;R93 03/06/00 PAL Added MTP008 sensor support for S3
;R92 03/03/00 TNY Fix comlile fail for "TIMNA_CPU_ONLY".
;R91 03/02/00 JDN added codes for MP STR support.
;R90 02/22/00 KVN Fixed POST screen crashed when plug buslogic card and
; BIOS version is 4.96F and ROM firmware version is 5.06I
;R89a 01/24/00 JDN Fixed compile error.
;R89 01/24/00 JDN Save/Restore K7 CPU register for ACPI S4.
;R63b 01/21/00 JDN Skip TNT2 VGA Card for fixed S4 failed.
;R87A 01/20/00 MIL Fixed Compiler fail, If 586 platform don't support
; ACPI S3 Function.
;R88 01/19/00 MIL Save/Restore Cyrix 586 CPU register for ACPI S3 Func.
;R87 01/19/00 MIL Added Code for Cyrix 586 CPU ACPI S3, S4 Function.
;R86 01/11/00 JDN Added Switch "CRT_Control_Not_In_F000" to fixed System
; hand in S4.
;R85 01/03/00 PAL Added "Change_CMOS_IN_S4" for customer
;R83a 01/03/00 JDN fixed compile error for K7 CPU platform & change Save
; Cyrix CPU method.
;R84 01/03/00 RAY Change the year of copyright from 1999 to 2000
;
;R83 12/30/99 JDN Supported Cyrix Gobi S3/S4.
;R62C 12/24/99 MIL Re-assign SMBASE buffer address to 0A000h area
; (For SIS 540, 630 Chipset).
;R82D 12/24/99 RIC Fixed that VIA 8371 chip still can't resume from S4.
;R82C 12/21/99 RIC Fixed that K7 CPU can't resume from S3/S4.
;R82B 12/16/99 RIC Fixed that K7 CPU hang in S3 Resume.
;R82A 12/14/99 RIC Control MtrrFixDramModEn/MtrrFixDramModEn of K7 CPU
; SYS_CFG Reg for K7 CPU Register Save/Restore.
;R82 12/11/99 RIC Support K7 CPU Register Save/Restore in S3/S4.
;R81A 11/19/99 JKY Fixed resume fails (when no NO_STR_PASSWORD_CHECK define).
;
;R81 11/19/99 JKY if "Desktop_Power_Management EQ 1" then no STR Password
; support.
;R80 10/21/99 TNY Add a flag for "Restore_Ct_Device" hook to identify
; it is resume from S3 or S4 state.
;R70D 10/20/99 RCH Don't disable CPU local APIC for MP platform
;R79 10/19/99 RCH Support platform without KBC implementation
;R78 10/18/99 RCH Fixed assembler error if there is no super I/O chip
; supported.
;R61B 10/11/99 MIL Fixed SIS 300 VGA WakeUp fail in progress S4 Stage.
; (For SIS 540, 630 Chipset).
;R60c 10/08/99 JDN Added codes for AHA66 support
;R77 10/07/99 GAR Call the same hook for sensor if define
; Superio_Support_Sensor
;R76 10/06/99 MIL Save CX register to prevent destroy original value.
;R62B 09/06/99 MIL For SIS 540, 630 ACPI S3 Function support.
;R61A 09/04/99 MIL For SIS 540, 630 Internal SIS300 VGA WakeUp function.
;R75 09/01/99 DNL Change revision from "v4.51PGM" to "v6.00PG"
;R74 08/24/99 DNL Re-assign buffer address to support SMRAM size above
; 32K
;R73A 08/11/99 GAR Fixed keyboard hang if wakeup from STR and not plug
; PS2 mouse
;R73 07/23/99 JDN Speed up S3 resume
;R72 07/20/99 PAL Added "Restore_Device_Chip" for S3 Support
;R71 07/15/99 JDN Fixed resource conflict resume from S4
;R70 07/05/99 JDN Disable APIC for STR(No Support Multi CPU)
;R69c 06/29/99 JDN Save P6 Mtrr Data & Fix coding error
;R69b 06/02/99 JDN Fix s3 resume fail when install UDMA CDROM & WIN98 SE
;R69a 05/28/99 JDN Fix keyboard fail when resume from S3
;R69 05/21/99 JDN Speed up S3 resume
;R62A 05/19/99 AVN For SIS960 ACPI S3 Function Support.
;R68 05/06/99 GAR Add for ITE8712
;R67 04/28/99 PAL Location sensor restore after chipset and device restore
;R65A 04/20/99 PAL Fixed coding error
;R66 04/19/99 TNY Add some code for "STR" support.
;R65 04/15/99 PAL Added "Save_Sensor" and redo "Init_Onboard_Generator"
;R60b 04/01/99 VIN Added codes for setting HDD-PIO-MODE that it reduse times.
;R64a 03/29/98 JKY added define for no ide 32bit decode access chipset
;R64 03/29/98 JKY 0V_Suspend & S4_Suspend speed up.
;R63a 03/25/99 JDN Fix coding error
;R63 03/23/99 JDN Support other VGA Wake up in S4
;R60A 03/22/99 KGN Add code for defing No_Support_4_IDE reduse resume time
;R62 03/12/99 MIL For SIS 620 ACPI S3 Function Support.
;R61 03/04/99 MIL Support SIS 530, 620 Onboard 6306 AGP VGA, Wake Up in
; S4 State.
;R60 02/24/99 VIN Support four HDD drive reset and fixed Ultra_DMA_MODE
; restore error.
;R59 02/22/99 KGN Add define UseHWVGASuspend for hardware suspend vga when STR
;R44B 01/26/99 GAR Support W83627F/HF
;R58 12/31/98 KVN Change the year of copyright from 1998 to 1999
;R57 12/10/98 JDN Patch if choose IR restore will hang and define No_Save_Sound
;R44A 12/02/98 DNL Add define for those keyboard controller that can't read A20M#
; pin status.
;R56 11/03/98 KVN Patch Hdd set large mode can't do S2D
;R55 10/09/98 JDN Save 8042&P6 Patch code in ACPI S3,Wake up VGA in S4
;R54 08/20/98 KEN Add declaration of "NO_ISA_PNP" to unsupport ISA/PNP
; cards for the system doesn't contain ISA bus.
;R53 08/11/98 JDN Added "No_resume_KBC_In_STR" Definition
;R52b 07/31/98 JDN Fixed code mistake
;R52a 07/29/98 JDN Move more code and delete unuse codes
;R52 07/28/98 JDN Move Suspend/Resume message from F segment to E segment
;R51 07/03/98 JDN Added codes for S3_Support
;R50 06/11/98 RCH Change BIOS name from "EliteBIOS" to "AwardBIOS"
;R49 06/09/98 DNL Move "Five_Volt_Resume_Byte" definition to common.equ
;R48 05/26/98 JKY Fixed code destory DS if no define 'NO_STR_PASSWORD_CHECK'
; Added define for move restore PS2 mouse before restore
; BASE DRAM & EXT DRAM (define:Restore_mouse_befor_DRAM)
;R47 05/14/98 JDN Fixed coding bug
;R46 04/29/98 JDN Added codes for P6 STR suspend/resume procedure
;R45 03/26/98 JKY Added KBC STR suspend/resume procedure.
;R43B 03/19/98 DNL Fixed coding mistake
;R43A 03/13/98 DNL Fixed coding mistake
;R44 03/11/98 JDN Add define for those keyboard controller that can't read A20M#
; pin status.
;R43 03/10/98 DNL Reduce ACPI S4/BIOS code size to save more space
;R42 02/26/98 JDN Fixed OS/2 mouse driver will disable G_RAM COM port
; status.
;R41 02/25/98 DNL Added ACPI S4/BIOS support
;R32C 02/24/98 JKY Fixed bug for P6 A20 early turn on.
;R40 02/24/98 DNL Added ACPI S2,S3 state support
;R39 02/16/98 JKY Change Version message.
;R38 01/05/98 DNL Added ACPI BIOS support
;R37 12/29/97 JKY Modify PM Beep tone length . define Beep_Len
;R36 12/26/97 JKY Change suspend to disk title copyright year.
;R35 12/24/97 JKY Don't save superio state if system dual I/O
;R32B 12/09/97 DNL Some motherboard can not automatic recognized the A20M#
; pin, so we always turn on A20M# pin before save/restore
; extend memory
;R34 11/13/97 JKY Add routing in before into suspend zv . because some
; VGA chip need turn-on on suspend-0v before .
;R32A 10/03/97 KGN Some MB ( 2a59id1g ) if resume from 0V will hang at 5%
; so add defin Resume_Turn_on_A20 to Fix Bug.
;R33 09/18/97 DNL Fixed bug of system reset while resume from 0v suspend
;R32 09/18/97 DNL Because the A20M# pin is recognized while CPU is in
; SMM. so we do not need enable A20 gate again
;R31 08/21/97 RAX Fixed some COM port mouse and driver combine, 0V resume
; mouse can't work.
;R30 08/16/97 DNL When KBC control using W83977 internal control, syst-
; em will hang , because kbc read command D0 (read 8255
; port2) read error , cause A20 abnormal OFF , therefore
; change way
;R29 08/12/97 KVN Fixed QUANTUM HDD (model-NO : QUANTUM FIREBALL ST2.1A)
; hang up on 0V resume.(M/B NO. is 2A5IIG3A)
;R07A 08/01/97 RAX 1.Remove define
; 2.Fixed ZV suspend restore PS/2 mouse will hang in
; OS/2 and Windows NT.
;R28 07/29/97 JKY Fixed ZV suspend resume will hang when restore 8259
;R27A 07/21/97 KVN Fixed R27 coding mistake that cause DL be destroyed
;R27 07/04/97 KVN Fixed 0V suspend HDD connect to any channel not only
; for primary master but still only support first HDD
;R26 07/02/97 RAX Add define to skip PNP device save and restore
;R25 07/02/97 DNL Add defin for W977TF IO sus2disk save 8042 will ERROR
;R24 06/20/97 JKY Patch VGA chip S3 86cm65 resume grabage
;R23 06/13/97 AVN Fixed when ring in turn on power, resume from disk and
; if OS in telix HOST mode, and keyboard no respond.
;R22 06/04/97 DNL Fixed bug of monitor no display when system resume from
; STD (Suspend-To-Disk)
;R14B 05/31/97 DNL Fixed coding mistake
;R14A 05/30/97 DNL Fixed coding mistake
;R21 05/26/97 DNL Add "No_ZV_Suspend_Beep" definition for customer special
; request
;R20 05/22/97 RAX Fix system hang at POST 52 when ZV-suspend function
; BIOS use JTS C3000-3AF Hdd
;R19 04/17/97 RAX Patch CHIP VGA ZV-resume screen garbage
;R18 04/15/97 JKY change save sound & restore sound become zv-suspend
; always support
;R17A 04/14/97 KVN Fix system hang at POST during HDD_transfer subroutine
; when use dual Seagate-ST32132A connect to same channel
;R17 04/10/97 KVN Fix different mode Hdd connect Master & Slave will hang
; at HDD_Transfer Routing
;R08B 04/09/97 DNL Change routine name to solve complier fail
;R16 04/07/97 DNL Added STD resume password check support
;R15 03/31/97 DNL Added STD progress percent display
;R14 03/20/97 DNL Fix when DRAM size above 64M , get Extend DRAM size
; ERROR, Extended DRAM save to disk will not all clear
; and when no MODEM , Don't save modem status
;R13 03/12/97 DNL Let routine "save_chipset","restore_chipset" be public
;R12 03/12/97 DNL Added codes to support STR function
;R11 03/05/97 DNL Fixed bug of system halt when resume from STD and
; C&T65550 VGA installed
;R08A 02/19/97 DNL Do not save/restore modem state while no modem exist
;R10 02/13/97 DNL Added VESA BIOS 1.X support
;R09 02/03/97 DNL FIxed buf of somd VGA chip (like S3) save video state
; in failure
;R08 02/03/97 DNL Added codes for save/restore PnP cards,Sound cards,
; Modem cards
;R07 02/03/97 DNL Fix When NT restore from save to disk will hang at
; restore PS/2 mouse
;R06 01/27/97 DNL Added switch Special_Save_VGA_status to support special
; customer
;R05 01/13/97 DNL Added codes for super I/O chip support
;R04 01/06/97 KVN Added codes for large mode HDD support
;R03 01/06/97 DNL Added codes for STD & STR function
;R02 12/05/96 DNL Added revision 4.51PGM for notebook BIOS
;R01 11/01/96 DNL Added "NEW_SUPERVGA_KERNEL" definition to support
; notebook VGA chips
;R00 10/01/96 DNL Move codes of Zero-Volte suspend to E8000-EFFFF to reduce
; F0000-FFFFF code size. old file save as sus2disk.A01
;----------------------------------------------------------------------------
.386p
PAGE 56,132
TITLE SUS2DISK.ASM -- Suspend to/resume from DISK Interface
.XLIST
INCLUDE BIOS.CFG
INCLUDE COMMON.EQU
INCLUDE COMMON.MAC
INCLUDE POST.MAC
INCLUDE BSETUP.INC
include CMOS.EQU
include akbrd.equ ;R16
if BIOS_SUPPORT_AMD_K7 ;R82A
include K7MSR.EQU ;R82A
endif; BIOS_SUPPORT_AMD_K7 ;R82A
DATAAREASIZE EQU 0400H ;R90 size reserved for stack variables
if BIOS_SUPPORT_686 ;R83
;R83a extrn Unlock_Cyrix:near ;R83
;R83a extrn Lock_Cyrix:near ;R83
IF BIOS_SUPPORT_CYRIX_P6 ;R92
extrn Check_If_Cyrix_P6:near ;R83
endIF; BIOS_SUPPORT_CYRIX_P6 ;R92
endif ;BIOS_SUPPORT_686 ;R83
;R43 - start
ifdef ACPI_Support
extrn ACPINVSAddress:near ;R38
extrn ACPITableAddress:near ;R38
ifdef S3_SUPPORT ;R40
extrn Save_S3_Chipset:near ;R40
;R91 - start
IFE BIOS_SUPPORT_AMD_K7
ifdef MP_Support
extrn E000_Enter_Prot_Mode:near
extrn E000_Back_Real_Mode:near
extrn Init_IO_Apic:near
extrn Cpu_Apic_Init:near
extrn CPU_HALT:near
extrn Ct_Set_APIC_Mode:near
endif ;MP_Support
ENDIF ;BIOS_SUPPORT_AMD_K7
;R91 - end
endif ;S3_SUPPORT ;R40
ifdef S4_SUPPORT ;R41
;R60 extrn Wait_For_Port:near ;R55
extrn Wakeup_Device:near ;R41
endif ;S4_SUPPORT ;R41
endif ;ACPI_Support
;R97 - start
if STD_Function EQ 0
if STR_Function EQ 1
INCLUDE 8042.EQU
extrn Wait_For_Port:near ;R60
EXTRN SET_CT:NEAR
EXTRN GET_CT:NEAR
extrn E000_64K_shadow_R:near
extrn Disable_E000_ROM_Shadow:near
extrn Save_Ct_device:near
extrn Restore_Ct_device:near
EXTRN BUFFER_8042_FULL:NEAR
EXTRN OUT_8042_FULL:NEAR
EXTRN SUSPEND_CHIPSET_TABLE:NEAR
EXTRN CT_SMBASE_OFF:NEAR
EXTRN CT_SMBASE_ON:NEAR
ifdef NEW_SUPERIO_KERNEL
ifndef NO_SUPER_IO
extrn Suspend_Super_IO:near
extrn Restore_Super_IO:near
endif; NO_SUPER_IO
endif ;NEW_SUPERIO_KERNEL
EXTRN GET_SMBASE_SEG:NEAR
EXTRN A20_ON:NEAR
EXTRN SND_SPKR_TONE:NEAR
extrn ExtMem128Mb:near ;R97A
endif ;STR_Function EQ 1
endif ;STD_Function EQ 0
;R97 - end
if STD_Function EQ 1
INCLUDE 8042.EQU
extrn Wait_For_Port:near ;R60
extrn ExtMem128Mb:near ;R14
EXTRN SET_CT:NEAR
EXTRN GET_CT:NEAR
extrn E000_64K_shadow_R:near
extrn Disable_E000_ROM_Shadow:near
extrn Get_PM_RAM_Seg:near
EXTRN BUFFER_8042_FULL:NEAR
EXTRN OUT_8042_FULL:NEAR
extrn VIDEO_FUNC:near
extrn Save_Ct_device:near
extrn Restore_Ct_device:near
EXTRN SUSPEND_CHIPSET_TABLE:NEAR
EXTRN CT_SMBASE_OFF:NEAR
EXTRN CT_SMBASE_ON:NEAR
EXTRN Display_String:NEAR
ifndef CRT_Control_Not_In_F000 ;R86
EXTRN Enable_CRT:NEAR
else ;CRT_Control_Not_In_F000 ;R86
extrn F_Video_Func:near ;R86 chipset hooked
extrn F_Enable_CRT:near ;R86 chipset hooked
endif ;CRT_Control_Not_In_F000 ;R86
extrn VGA_Buffer:near
EXTRN CT_ALLSHADOW_RW:NEAR
EXTRN CT_SKIP_ZV_SHADOW:NEAR
EXTRN CT_0V_SHUTDOWN:NEAR
EXTRN CT_SYSTEM_WAKEUP:NEAR
extrn Display_Char:near
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -