📄 pmupost.asm
字号:
dw offset IRQ4_Event_Item
dw offset IRQ5_Event_Item
dw offset IRQ6_Event_Item
dw offset IRQ7_Event_Item
dw offset IRQ8_Event_Item
dw offset IRQ9_Event_Item
dw offset IRQ10_Event_Item
dw offset IRQ11_Event_Item
dw offset IRQ12_Event_Item
dw offset IRQ13_Event_Item
dw offset IRQ14_Event_Item
dw offset IRQ15_Event_Item
IRQ_Evnt_TBL_Len EQU ($ - offset IRQ_Evnt_TBL) /2
;R62 end
; value ,unit
; ----------------------
Timer_Value:
db 00000000b,0ah ;Disable
db 00000101b,0ah ;5 Sec
db 00001010b,0ah ;10 Sec
db 00010100b,0ah ;20 Sec
db 00011110b,0ah ;30 Sec
db 00101000b,0ah ;40 Sec
db 00111100b,0ah ;1 Min
db 01111000b,0ah ;2 Min
db 00000100b,0bh ;4 Min
db 00000110b,0bh ;6 Min
db 00001000b,0bh ;8 Min
db 00001010b,0bh ;10 Min
db 00010100b,0bh ;20 Min
db 00011110b,0bh ;30 Min
db 00101000b,0bh ;40 Min
db 00111100b,0bh ;1 Hour
endif; Move_F000_PMU_INIT_To_E000
;[]========================================================================[]
;Procedure: Ct_LCD_Init
;
;Function : Set the LCD power down timer which initial method
; varies from chip to chip
;
;Input : DS = DGROUP
; ES = PM_RAM
;
;Output : None
;
;Note : 1. Call from POST 79S (PM initialization)
; 2. Stack available
; 3. Don't destroy any SEGMENT registers!
;[]========================================================================[]
ASSUME ES:PM_RAM
ASSUME DS:DGROUP
Public Ct_LCD_Init
Ct_LCD_Init Proc Near
ret
Ct_LCD_Init Endp
;[]========================================================================[]
;Procedure: HDD_Standby_Offset
;
;Function : Tell BIOS kernal the offset of the setup item
; "HDD Power Down Timer"
;
;Input : DS = DGROUP
; ES = PM_RAM
;
;Output : NC: HDD Power Down Item exist
; SI = Item offset
; CF: HDD Power Down Item absent
; SI Don't care
;
;Note : 1. Call from POST 79S (PM initialization)
; 2. Stack available
; 3. Don't destroy any SEGMENT registers!
; 4. If you don't have such a item in SETUP,
; just set carry flag & return!
;[]========================================================================[]
ASSUME ES:PM_RAM
ASSUME DS:DGROUP
Public HDD_Standby_Offset
HDD_Standby_Offset Proc Near
extrn HDD_Timer_Item:Near
mov si,offset HDD_Timer_Item
clc
ret
HDD_Standby_Offset Endp
;[]========================================================================[]
;Procedure: Get_IRQ15_Offset
;
;Input : DS = G_RAM
;
;Output : NC:
; AX = Segment location of the IRQ15
; PMI service routine
; SI = offset of the IRQ15 PMI service routine
;
; i.e. AX:SI
;
; CF:
; IRQ 15 is not supported!
;
;Registers: Please preserve all registers except AX & SI
;
;[Note] : 1. called from PM_INIT
; NC: AX:SI will be placed interrupt table located
; in segment 0
; CF: IRQ15 vector will be masked off
;[]========================================================================[]
ASSUME DS:G_RAM
Public Get_IRQ15_Offset
Get_IRQ15_Offset Proc Near
stc
ret
Get_IRQ15_Offset Endp
;[]========================================================================[]
;Procedure: Ct_Resume_Handle
;
;Function : Ct_Resume_Handle
;
;Input : None
;
;Output : None
;[]========================================================================[]
Public Ct_Resume_Handle
Ct_Resume_Handle Proc Near
mov ax,G_RAM
mov ds,ax
ASSUME DS:G_RAM
mov ss,G_RAM:[ROM_MODULE_SEG]
mov sp,G_RAM:[ROM_MODULE_OFFSET]
iret
Ct_Resume_Handle Endp
;[]-------------------------------------------------------------------[]
;
; PPPPPPPP AA RRRRRRRR TTTTTTTTTTT 33333
; PPPPPPPPP AAAA RRRRRRRRR TTTTTTTTTTT *** 333 333
; PPP PPP AAAAAA RRR RRR TTT *** 333
; PPPPPPPPP AAA AAA RRRRRRRRR TTT 33333
; PPPPPPPP AAAAAAAAAA RRRRRRRR TTT *** 333
; PPP AAAAAAAAAAAA RRR RRR TTT *** 333 333
; PPP AAA AAA RRR RRR TTT 33333
;
; Hooks to the real mode APM functions
;
;[]-------------------------------------------------------------------[]
;[]-------------------------------------------------------------------[]
;
; PPPPPPPP AA RRRRRRRR TTTTTTTTTTT 44444
; PPPPPPPPP AAAA RRRRRRRRR TTTTTTTTTTT *** 444444
; PPP PPP AAAAAA RRR RRR TTT *** 444 444
; PPPPPPPPP AAA AAA RRRRRRRRR TTT 4444444444
; PPPPPPPP AAAAAAAAAA RRRRRRRR TTT *** 44444444444
; PPP AAAAAAAAAAAA RRR RRR TTT *** 444
; PPP AAA AAA RRR RRR TTT 444
;
;
;
; OEM specific subroutines
;
; Normally, this part will be placed with the PMI handler
; (IRQ15 or SMI or NMI)
;
;[]-------------------------------------------------------------------[]
;[]========================================================================[]
;Function : Routine to handle the power management interrupt (PMI).
;
;Input : None
;
;Output : if PM using IRQ --- no output!
; if PM using NMI --- NC: BIOS has handle this NMI for
; PM chip!
; CF: NMI is not issue by PM chip
;
;Destroy: if PM using IRQ --- destroy None
; if PM using NMI --- destroy FLAG
;[]========================================================================[]
Public APM_R31_Added
APM_R31_Added:
;[]========================================================================[]
;Procedure: Get_PMI_Source
;
;Function : To get the corresponding PMI routine according
; to what kind of PMI it is
;
;Input : DS = PM_RAM
;
;Output : SI = point to appropriate PMI handler
; e.g. if it is a suspend request
; SI = offset Suspend_Handler
;
;Note : 1. Called from PM_Handler
; 2. stack available
; 3. The BIOS PM kernal will issue:
; "call si" after calling this routine!
;[]========================================================================[]
;[]========================================================================[]
;
;Function : Service routine to handle PMI source 0Fh (reg. 35h bit 4-0)
;
;[]========================================================================[]
;[]========================================================================[]
;
;Function : Service routine to handle PMI source
;
;[]========================================================================[]
;[]========================================================================[]
;
;Function : Service routine to handle PMI source
;
;[]========================================================================[]
;[]========================================================================[]
;
;Function : Service routine to handle EXT SMI1 source
;
;[]========================================================================[]
;[]========================================================================[]
;
;Function : Service routine to handle PMI source
;
;[]========================================================================[]
;[]========================================================================[]
;
;Function : Service routine to handle PMI source
;
;[]========================================================================[]
;[]========================================================================[]
;
;Function : Service routine to handle PMI source
;
;[]========================================================================[]
ASSUME DS:PM_RAM
ifndef CRT_Control_Not_In_F000
F000_Enable_CRT Proc Far
call Enable_CRT
retf
F000_Enable_CRT Endp
F000_Disable_CRT Proc Far
call Disable_CRT
retf
F000_Disable_CRT Endp
endif ;CRT_Control_Not_In_F000
ifndef V_ALARM_IN_E000
F000_Virtual_Resume_Timer Proc Far
call Virtual_Resume_Timer
retf
F000_Virtual_Resume_Timer Endp
;-----------------------------------------------------------
;Function : 1. reg.30h bit 1,0 --> 00b (Full-On Mode)
; 2. set PM_RAM:[PM_MODE]=FULL_ON
; 3. Enable CRT display
; 4. set CPU to its full speed
;
;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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -