📄 pmupost.asm
字号:
;Input : DS = PM_RAM
;
;Output : None
;-----------------------------------------------------------
;[]========================================================================[]
;input : DS = PM_RAM
;[]========================================================================[]
include v_alarm.inc
Low_Power_Throttling Proc Near
ret
Low_Power_Throttling Endp
endif ;V_ALARM_IN_E000
ALIGN 4
Public PM_Int8_Hook
PM_Int8_Hook Proc Near
ret
PM_Int8_Hook Endp
;[]===============================================================[]
;
; Cfg_Video_Mode:
; Routine to initial video after vga initial within POST.
;
; Entry: none
;
; Exit: none
;
; Name | Date | Description
; -----------------------------------------------------------------
;[]==================================================================[]
public Cfg_Video_Mode
Cfg_Video_Mode proc near
ret
Cfg_Video_Mode endp
;----------------------------------------------------------------------------
;Output : AL = 0 DPMS not support
; (CRT sleep disable or Controll by H/V sync & Blanking)
; = 1 CRT sleep use DPMS STANDBY
; = 2 CRT sleep use DPMS SUSPEND
;*(Default Value) = 3 CRT sleep use DPMS OFF
; = 4 CRT sleep use DPMS REDUCE ON (not support in v1.0)
;----------------------------------------------------------------------------
Public Get_DPMS_Option
Get_DPMS_Option proc near
ifndef NO_DPMS_SUPPORT
extrn VGA_Type_Item:near
mov si,offset VGA_Type_Item
call GetItem_Value
cmp al,3
jnz short _No_DPMS_Support
mov dx,12D2H ; ST AGP vendor ID
mov cx,0018H ; RIVA 128 device ID
xor si,si ; first device
mov ax,0b102H ; find PCI device func. call
int 1AH
jnc short Have_ST_AGP ; Found => Set No Support DPMS
mov al,3
jmp short @f ; No => Set Support DPMS
Have_ST_AGP:
_No_DPMS_Support:
xor al,al ; Set No Support DPMS
@@:
else ;DPMS_STANDARD
xor al,al
endif ;DPMS_STANDARD
ret
Get_DPMS_Option endp
ifndef CRT_Control_Not_In_F000
ifdef CRT_Control_Not_In_APM
include CRT_Ctrl.inc
endif ;CRT_Control_Not_In_APM
endif ;CRT_Control_Not_In_F000
;R56 - starts
ifdef LCD_CRT_OPTION
;[]==================================================================[]
;
; Procedure Name: LCD_BACKLIGHT_ON
;
; This routine is used to turn on the LCD backlight.
;
; Saves: all
; Input:
; none
;
; Output:
; none
;
; [Note]:
; 1. This routine is hardware dependent.
;
; Author: Daniel Huang
; Date: August, 08, 1995
;
; Name | Date | Description
; -----------------------------------------------------------------
; DNL | 08/08/95 | Initial version for C&T65545
;[]==================================================================[]
PUBLIC LCD_BACKLIGHT_ON
LCD_BACKLIGHT_ON PROC NEAR
clc
ret
LCD_BACKLIGHT_ON ENDP
;[]==================================================================[]
;
; Procedure Name: LCD_BACKLIGHT_OFF
;
; This routine is used to turn off the LCD backlight.
;
; Saves: all
; Input:
; none
;
; Output:
; none
;
; [Note]:
; 1. This routine is hardware dependent.
;
; Author: Daniel Huang
; Date: August, 08, 1995
;
; Name | Date | Description
; -----------------------------------------------------------------
; DNL | 08/08/95 | Initial version for C&T65545
;[]==================================================================[]
PUBLIC LCD_BACKLIGHT_OFF
LCD_BACKLIGHT_OFF PROC NEAR
clc
ret
LCD_BACKLIGHT_OFF ENDP
endif ;LCD_CRT_OPTION
ifdef NEW_SUPERVGA_KERNEL
public VGA_SIGN_ON_BEFORE
VGA_SIGN_ON_BEFORE proc near
ret
VGA_SIGN_ON_BEFORE ENDP
;;============================================================
public CT_MODESET_ADJUST
CT_MODESET_ADJUST proc near
ret
CT_MODESET_ADJUST ENDP
;;============================================================
public CT_GET_PANEL_TYPE
CT_GET_PANEL_TYPE proc near
ret
CT_GET_PANEL_TYPE ENDP
F_Video_Func Proc Far
Call Video_Func
retf
F_Video_Func Endp
;===============================================================
public CT_PWR_OFF_PANEL
CT_PWR_OFF_PANEL proc near
ret
CT_PWR_OFF_PANEL ENDP
;===============================================================
public CT_PWR_ON_PANEL
CT_PWR_ON_PANEL proc near
ret
CT_PWR_ON_PANEL ENDP
;===============================================================
public Ct_Set_TV_Mode
Ct_Set_TV_Mode Proc Near
ret
Ct_Set_TV_Mode ENDP
;===============================================================
endif ;NEW_SUPERVGA_KERNEL
;R56 - ends
;---------------------------------------------------------------------------
;R49 - starts
ifdef Notebook_Power_Management
Public F_Suspend_0V
F_Suspend_0V proc Far
call Suspend_0V
ret
F_Suspend_0V ENDP
F_Resume_0V Proc Far
Call Resume_0V
ret
F_Resume_0V Endp
endif ;Notebook_Power_Management
;R49 - ends
FCODE ENDS
;--------------------------------------------------------------
;--------------------------------------------------------------
;----- The following codes will be located at E000 ! ----------
;----- The following codes will be located at E000 ! ----------
;----- The following codes will be located at E000 ! ----------
;----- The following codes will be located at E000 ! ----------
;--------------------------------------------------------------
;--------------------------------------------------------------
EGROUP GROUP ECODE
ECODE SEGMENT USE16 PARA PUBLIC 'ECODE'
ASSUME CS:EGROUP,DS:G_RAM,ES:EGROUP
align 4
;R78 - starts
ifdef S3_SUPPORT
;[]========================================================================[]
;[]========================================================================[]
Public Save_S3_Chipset
Save_S3_Chipset Proc Near
HI_CMOS EQU 72h
push ds
push ebx
mov ax,seg DGROUP:Five_V_Tbl
mov ds,ax
mov si,offset DGROUP:Five_V_Tbl
lodsb
mov bl,al
mov cx,VT692
@@:
lodsb
or al,al
jz short @F
mov cl,al
lodsb
mov bh,al
Next_Reg:
Call E000_Get_PMU
xchg al,bl
out HI_CMOS,al
NEWIODELAY
xchg al,bl
out HI_CMOS+1,al
inc cl
inc bl
dec bh
jnz short Next_Reg
jmp short @b
@@:
pop ebx
pop ds
ret
Save_S3_Chipset Endp
endif ;S3_Support
;R78 - ends
if STD_Function EQ 1
;[]========================================================================[]
;
;Procedure: CT_0V_Shutdown
;
;Function : Routine to put system into off state.
;
;Input : None
;
;Output : None
;
;[]========================================================================[]
Public CT_0V_Shutdown
CT_0V_Shutdown Proc Near
mov ax,PM_RAM_SEGMENT
mov ds,ax
extrn APM_16_PowerOff:near
F000_call DGROUP:APM_16_PowerOff
ret
CT_0V_Shutdown Endp
;[]========================================================================[]
;
;Procedure: CT_System_Wakeup
;
;Function : Routine for system wake up from Zero-Volt-Suspend.
;
;Input : None
;
;Output : None
;
;[]========================================================================[]
Public CT_System_Wakeup
CT_System_Wakeup Proc Near
ret
CT_System_Wakeup Endp
;[]========================================================================[]
;
; Suspend_Chipset_Table
;
; This table describe chipset registers which save & restore during
; Zero-Volt-Suspend & Resume.
; It is refrenced by routine Save_Chipset & Restore_Chipset.
;
; Formate:
;
; DW <Register Index start>, <Regisetr counts>
; DW : :
; DW : :
; DW : :
; DW <Register Index start>, <Regisetr counts>
; DW FFFFh ; End of table
;
;
;[]========================================================================[]
PUBLIC Suspend_Chipset_Table
Suspend_Chipset_Table:
;R78 - starts
ifdef S3_SUPPORT
dw VT692 + 00h , 100h ;0
dw VT692_PP + 00h , 100h ;1
dw VT686 + 00h , 100h ;7-0
dw VT586_IDE + 00h , 100h ;7-1
dw VT586_USB + 00h , 100h ;7-2
dw VT586_USB_2+ 00h, 100h ;7-3
dw VT586_ACPI + 00h, 100h ;7-4
ifdef VT686
ifndef Always_Disable_AC97 ;R80
dw VT686_AC97 + 00h, 100h ;7-5
endif; Always_Disable_AC97 ;R80
ifndef Always_Disable_MC97 ;R80
dw VT686_AC97 + 100h, 100h ;7-6
endif; Always_Disable_MC97 ;R80
endif; VT686
dw 0FF00h , 50h
dw 0FFFFh
endif; S3_SUPPORT
;R78 - ends
;R49C;R49B dw VT586 + 00h, 100h
;R49C dw VT586 + 00h, 37h ;R49B
;R49C dw VT586 + 47h, 60h ;R49B
;R49C dw VT586_IDE + 00h, 100h
;R49C dw VT586_USB + 00h, 100h
;R49C
;R49C dw VT586_ACPI + 00h, 14h ;R49B
;R49C dw VT586_ACPI + 16h, 40h - 16h ;R49B
;R49C ifdef VT686
;R49C dw VT586_USB_2 + 10h, 31h
;R49C dw VT686_AC97 + 10h, 30h
;R49C dw VT686_AC97 +100h+10h, 30h ;MC97 function 6
;R49C endif; VT686
;R49 dw VT586_ACPI + 00h, 14h
;R49 dw VT586_ACPI + 16h, 40h - 16h
;R49A dw VT586_ACPI + 40h, 1;R49
;R49C - starts
dw VT692 + 10h, 90h
dw VT692_PP + 10h, 30h
dw VT586 + 00h, 37h
dw VT586 + 47h, 60h
dw VT586_IDE + 00h, 100h
dw VT586_USB + 00h, 100h
dw VT586_ACPI + 16h, 40h - 16h
;R49C - ends
dw 0FFFFh
;[]========================================================================[]
;Procedure: Get_SMBASE_Seg
;
;Function : Return SMBASE segment.
;
;Input : None
;
;Output : EAX: should point to the SMBASE address (32bit address).
;
;[]========================================================================[]
Public Get_SMBASE_SEG
Get_SMBASE_SEG Proc Near
mov eax, 0A0000h
ret
Get_SMBASE_SEG Endp
;[]========================================================================[]
;Procedure: CT_AllShadow_RW
;
;Function : To Enable/Disable all shadow Read/Write.
;
;Input : AL = 0 For all shadow readable.
; AL = 1 For all shadow writeable.
;
;Output : None
;
;Preserve :
;
;Note : 1. Stack available.
; 2. called from Suspend_0V or Resume_0V.
; 3. If the chipset support shadow RAM both Readable & Writeable
; then don't care input AL, Just program chipset for shadow
; RAM both R/W-able.
;
;[]========================================================================[]
Public CT_AllShadow_RW
CT_AllShadow_RW Proc Near
pusha
push ebx
mov cx,VT692 + 61h
mov bl,0FFh
call E000_GET_SET_PMU_OR
inc cl
call E000_GET_SET_PMU_OR
inc cl
mov bl,0F0h
call E000_GET_SET_PMU_OR
pop ebx
popa
ret
CT_AllShadow_RW Endp
;[]========================================================================[]
;Procedure: CT_SMBASE_Off
;
;Function : To disable SMBASE map function.
;
;Input : None
;
;Output : None
;
;[]========================================================================[]
Public CT_SMBASE_Off
CT_SMBASE_Off Proc Near
pusha
push ebx
mov cx,VT692+63h
;R44 mov bx,00Fch
mov bx,02Fch ;R44
call E000_GET_SET_PMU
pop ebx
popa
ret
CT_SMBASE_Off endp
;[]========================================================================[]
;Procedure: CT_SMBASE_On
;
;Function : To Enable SMBASE map function.
;
;Input : None
;
;Output : N
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -