;	[]===========================================================[]
;
;	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
;----------------------------------------------------------------------------
;R51	03/12/99 BAR 	Suport Windows NT update BIOS.
;R50	03/10/99 JDN	add H8 SMbus support
;R49	02/24/99 VIN	Support four HDD drive reset and fixed Ultra_DMA_MODE
;			restore error.
;R48	02/23/99 RCH	Added AMD/K7 CPU support.
;R47	02/03/99 BAR 	Support Flash_Part_Erase .
;R46	01/28/99 BAR	Update ESCD DMI use SMM mode.
;R45	11/03/98 KVN	Patch Hdd set large mode can't do S2D
;R44	10/22/98 TNY	Add PMRAM:SuspendMaskIRQ to mask some PCI IRQ to fix 
;			some driver's bug cause suspend failed.
;R43	10/01/98 JDN	Added code for Wake up VGA in ACPI S4
;R42	09/22/98 RIC	Reserve Soft SMI 5?h for chipset used.
;R41	06/17/98 RAY	Support device power management for Function 0Dh & 0Fh
;
;			1. Invalidate variable OPTION_ROM_ID in PM_RAM.INC
;			2. Define DEVICE_PM_STATUS in the same location to
;			   store the device PM status
;
;R40	04/10/98 RAX	Move SMbios support out Notebook define.
;R39	03/19/98 JKY	Added Function for SMBus CMD/DTA Port change to any 
;			port.(default : CMD=66h , DTA=62h) 
;R38	03/10/98 DNL	Reduce ACPI S4/BIOS code size to save more space
;R37	02/26/98 JDN	Fixed OS/2 mouse driver will disable G_RAM COM port
;			status.	  				
;R36	02/25/98 DNL	Added ACPI S4/BIOS support 
;R35	02/24/98 DNL	Added ACPI S2,S3 state support
;R34	02/03/98 RAY	To let Win95 Shutdown-->PowerOff functionality
;			still exist if PM is disabled in CMOS Setup.
;			Add a flag in PM_RAM.INC to indicate PM disabled
;R33	12/19/97 RAX	Add code for move APM to SMBASE.
;R32	08/27/97 DNL	Add FAT32 0V file support
;R31	07/04/97 KVN	Fixed 0V suspend HDD connect to any channel not only
;			for primary master but still only support first HDD
;R30	07/02/97 RAX	Add flag to recode power status for battery system.
;R29	05/26/97 DNL	Add SMBus host controller support
;R28	04/30/97 KVN	Merge APM and APM32 into APM.ASM
;R27	04/25/97 DNL	Add batery function for APM 1.2
;R26	04/22/97 LAW	added "CPU_FAN_POWER_CONTROL_SELECTABLE" for enable/disbale
;			control fan power off at suspend
;R25	04/11/97 RAX	Add code New function support for NoteBIOS 
;R24	04/03/97 LAW	Added SMC93xAPM,SMC37C93xFR "POWER_ITEM_VALUE" for power
;			switch offcontrol status
;R22A	03/24/97 LAW	Added "RTC_ON_DAY_VALUE" for "SUPPORT_RTC_ON" function
;R23	03/12/97 DNL	Added codes to support STR function
;R22	02/20/97 LAW	Added "RTC_ON_HOUR_VALUE","RTC_ON_MIN_VALUE","RTC_ON_SEC_VALUE"
;			"RTC_ON_ITEM_VALUE" for "SUPPORT_RTC_ON" function
;R21	01/28/97 LAW	Added ALi514x "POWER_ITEM_VALUE" for power switch off
;			control status
;R20	11/01/96 DNL	Added MASM 6.1 support
;R19	10/16/96 RAX	Added Smart Battery support
;R18	10/08/96 DNL	Added macros for Cyrix CPU SMI support
;R17	09/20/96 DNL	Added VGA BIOS function call hook support
;R12B	09/20/96 DNL	Fix coding mistake
;R16	09/06/96 DNL	Added codes for Notebook Power Management.
;R15	09/05/96 DNL	Added APM 1.2 support
;R14	09/02/96 DNL	Added 4M Video RAM support
;R12A	07/05/96 RAY	Fix coding mistake
;R13	05/30/96 RIC	Fix APM_MODEM_IRQ define byte to word.
;R12	05/23/96 RAY	Add definitions to support APM 1.2 resume timer(func 11h)
;R11	05/10/96 DNL	Add new definitions prepare for more application
;R10	05/08/96 RAY	Support Function 07/0C for device=display. This is
;			added for the test program ESTAR.EXE running in WIN95
;R09	04/30/96 RAY	Add new definitions prepare for APM 1.2
;R08	04/02/96 DNL	Added C&T,Cirrus LCD controller support
;R07A	01/09/96 DNL	Added suspend to file for Notebook Power Management.
;R07	01/03/96 DNL	Added suspend to file for Notebook Power Management.
;R06	12/18/95 DNL	Added for Notebook Power Management.
;R05	12/01/95 DNL	Added for Notebook Power Management.
;R04	09/18/95 DNL	Added for Notebook Power Management.
;R03	03/16/95 BEN	Added for Notebook Power Management.
;R02	09/29/94 BEN	Added DPMS string checking instead of checking DPMS
;			vector. This avoid checking error in protected mode
;			or V86 mode.
;R01	08/10/94 BEN	Support DPMS.
;----------------------------------------------------------------------------

;		+-------------------------------+
;		|				|
;		|  386 Extended BIOS DATA AREA	|
;		|				|
;		+-------------------------------+

			include	bios.cfg
			include	COMMON.EQU	;R38

F_SHADOW_RW	EQU	0F0H		;F-segment shadow R/W		;R48
F_SHADOW_WP	EQU	0F1H		;F-segment shadow write protect	;R48

ifdef	Notebook_Power_Management		;R15
ifndef	NO_BATTERY_SYSTEM			;R15
	BATTERY_SYSTEM		EQU	1	;R15
endif	;NO_BATTERY_SYSTEM			;R15
endif	;Notebook_Power_Management		;R15

;--------------------------------------------------------------
;          Macros for Cyrix M6/M7 SMI Handler
;--------------------------------------------------------------

CPU_SEG	MACRO	SEGM
	IFIDN	<SEGM>,<CS>
		db	2eh
	ENDIF
	IFIDN	<SEGM>,<DS>
	ENDIF
	IFIDN	<SEGM>,<ES>
		db	26h
	ENDIF
	IFIDN	<SEGM>,<FS>
		db	64h
	ENDIF
	IFIDN	<SEGM>,<GS>
		db	65h
	ENDIF
	ENDM

CY_SEG	MACRO	SEGM
	IFIDN	<SEGM>,<ES>
		db	(06h or (0 SHL 3))
	ENDIF
	IFIDN	<SEGM>,<CS>
		db	(06h or (1 SHL 3))
	ENDIF
	IFIDN	<SEGM>,<SS>
		db	(06h or (2 SHL 3))
	ENDIF
	IFIDN	<SEGM>,<DS>
		db	(06h or (3 SHL 3))
	ENDIF
	IFIDN	<SEGM>,<FS>
		db	(06h or (4 SHL 3))
	ENDIF
	IFIDN	<SEGM>,<GS>
		db	(06h or (5 SHL 3))
	ENDIF
	ENDM

SVLDT	MACRO	DEST_SEGM,VAL,CY_SEGM
	CPU_SEG	DEST_SEGM
	db	0fh,7ah
	db	06h
	dw	VAL
	ENDM

SVDC	MACRO	DEST_SEGM,DEST_ADDR,CY_SEGM
	CPU_SEG	DEST_SEGM
	db	0fh,78h
	CY_SEG	CY_SEGM
	dw	DEST_ADDR
	ENDM

RSDC	MACRO	DEST_SEGM,DEST_ADDR,CY_SEGM
	CPU_SEG	DEST_SEGM
	db	0fh,79h			;restore register and desciptor
	CY_SEG	CY_SEGM
	dw	DEST_ADDR
	ENDM

RSLDT	MACRO	DEST_SEGM,DEST_ADDR
	CPU_SEG	DEST_SEGM
	db	0fh,7bh			;Save register and desciptor
	db	06h
	dw	DEST_ADDR
	ENDM

;R18 - start
SVTS	MACRO	DEST_SEGM,VAL,CY_SEGM
	CPU_SEG	DEST_SEGM
	db	0fh,7ch
	db	06h
	dw	VAL
	ENDM

RSTS	MACRO	DEST_SEGM,DEST_ADDR
	CPU_SEG	DEST_SEGM
	db	0fh,7dh			;Save register and desciptor
	db	06h
	dw	DEST_ADDR
	ENDM
;R18 - end

;--------------------------------------------------------------
;	SMM Instructions Macro for AMD CPU 
;--------------------------------------------------------------
; Return from SMM
RES4		MACRO
		DB	0FH,07H
		ENDM

; AMD Software SMI
AMDSMI		MACRO
		DB	0F1H
		ENDM

;--------------------------------------------------------------
;	SMM Instructions Macro for INTEL CPU 
;--------------------------------------------------------------
RSM		MACRO
		db     0FH,0AAH 	; Not defined in MASM.
		ENDM

;--------------------------------------------------------------
;	Port 80H definition for power management
;--------------------------------------------------------------
	PMI_ENTRY	EQU	0D0H	;PMI occured
	PMI_IDLE	EQU	0D1H	;PMI idle (doze) mode
	PMI_STANDBY	EQU	0D2H	;PMI standby mode
	PMI_SUS		EQU	0D3H	;PMI suspend mode
	PMI_VIDEO_OFF	EQU	0D4H	;PMI video off
	PMI_FULLON	EQU	0FFH	;PMI full on mode

	APM_IDLE	EQU	0D8H	;APM idle mode
	APM_SUS		EQU	0D9H	;APM suspend

;--------------------------------------------------------------
; APM Error codes follow...
;--------------------------------------------------------------

ERROR_APM_NOT_PRESENT		EQU	86H
ERROR_PM_DISABLED		EQU	01h
ERROR_PM_NOT_ENGAGED		EQU	0BH
ERROR_NOT_CONNECTED		EQU	03h
ERROR_REAL_ALREADY_CONN		EQU	02h
ERROR_16BIT_ALREADY_CONN	EQU	05H
ERROR_32BIT_ALREADY_CONN	EQU	07H
ERROR_INVALID_APM_CALL		EQU	1fh
ERROR_BAD_PARAM			EQU	0AH
ERROR_UNKNOWN_DEVICE_ID		EQU	09h
ERROR_NO_STATE_REQUEST		EQU	60h
ERROR_EVENT_FLAG		EQU	1
ERROR_APM_STS_PORT		EQU	124d
ERROR_NO_SUPPORT_16BIT		EQU	06H
ERROR_NO_SUPPORT_32BIT		EQU	08H
ERROR_NO_EVENT_PENDING		EQU	80H
ERROR_FUNCTION_NOT_SUPPORT	EQU	0Ch		;R09
ERROR_RESUME_TIMER_OFF		EQU	0Dh		;R12

;--------------------------------------------------------------
;Device ID for APM follows..
;--------------------------------------------------------------

BIOS_DEVICE_ID		equ	0000h
ALL_DEVICES		EQU	0001h
ifdef	BATTERY_SYSTEM				;R15
BATTERY_DEVICES 	EQU	8000h		;R15
endif	;BATTERY_SYSTEM				;R15

APM10_ALL_DEVICES	EQU	0FFFFH

;--------------------------------------------------------------
;OS APM requests to our PM BIOS are as follows...
;--------------------------------------------------------------
APM_READY_REQ		EQU	0000H
APM_STANDBY_REQ		EQU	0001H
APM_SUSPEND_REQ		EQU	0002H
APM_OFF_REQ		EQU	0003H


;--------------------------------------------------------------
;APM function list follows..
;--------------------------------------------------------------
APM_FUNC		EQU	53H
INSTALLATION_CHECK	EQU	00H
INTERFACE_CONNECT	EQU	01H
INTERFACE_16BIT_CONNECT EQU	02H
INTERFACE_32BIT_CONNECT EQU	03H
INTERFACE_DISCONNECT	EQU	04H
BATT_LOW_REQUEST	EQU	05H
CPU_IDLE_FN		EQU	05H
CPU_BUSY		EQU	06H
SET_POWER_STATE		EQU	07H
APM_CNTRL		EQU	08H
DEFAULT_LOAD		EQU	09H
GET_APM_STS		EQU	0AH
GET_APM_EVNT		EQU	0BH
CONNECT_CALL_MADE	EQU	80H


;--------------------------------------------------------------
;APM Power Status 
;--------------------------------------------------------------
AC_ON_LINE		EQU	01H
AC_OFF_LINE		EQU	00H
UNKNOWN			EQU	0FFH

;--------------------------------------------------------------
;APM battery status
;--------------------------------------------------------------
BAT_HIGH		EQU	0
BAT_LOW			EQU	1
BAT_CRITICAL		EQU	2
BAT_CHARGE		EQU	3

;R27 - start
;--------------------------------------------------------------
;APM battery flag 	return by CH
;--------------------------------------------------------------
BAT_HIGH_FLAG		EQU	01h
BAT_LOW_FLAG		EQU	02h
BAT_CRITICAL_FLAG	EQU	04h
BAT_CHARGING_FLAG	EQU	08h
BAT_NOT_PRESENT		EQU	10h
NO_BAT_FLAG		EQU	80h
;R27 - end

APM_32BIT_MARK		equ	6789h	;R28

;************************************************************
;************************************************************
;************************************************************
;************************************************************
;************************************************************
;			PM_RAM starts
;************************************************************
;************************************************************
;************************************************************
;************************************************************
;************************************************************

;R41 OPTION_ROM_ID		DW	?			;0AA55H		
;R41 - starts
DEVICE_PM_STATUS	dw	?
		ALL_DEVICES_PM_ENABLED	EQU	0001010101010101b
		ALL_DEVICES_PM_ENGAGED	EQU	0010101010101010b
		DISP_PM_ENABLED		EQU	0000000000000001b
		DISP_PM_ENGAGED		EQU	0000000000000010b
		STORAGE_PM_ENABLED	EQU	0000000000000100b
		STORAGE_PM_ENGAGED	EQU	0000000000001000b
		LPT_PM_ENABLED		EQU	0000000000010000b
		LPT_PM_ENGAGED		EQU	0000000000100000b
		COM1_PM_ENABLED		EQU	0000000001000000b
		COM1_PM_ENGAGED		EQU	0000000010000000b
		COM2_PM_ENABLED		EQU	0000000100000000b
		COM2_PM_ENGAGED		EQU	0000001000000000b
		LAN_PM_ENABLED		EQU	0000010000000000b
		LAN_PM_ENGAGED		EQU	0000100000000000b
		PCMCIA_PM_ENABLED	EQU	0001000000000000b
		PCMCIA_PM_ENGAGED	EQU	0010000000000000b
;R41 - ends
;R44			DB	?			;Checksum size		
;R44			DB	?			;ret			

SuspendMaskIRQ		dw	?			;R44

OPTION_ROM_EXIST	db	?

PM_SET_BYTE		DB	?			;PM Config byte
	PM_ENABLE	EQU	00000001b
	SUSPEND_ENABLE	EQU	00000010b
	BAT_LOW_SUSP	EQU	00001000b
	SUSPEND_WARNING	EQU	00010000b
	BAT_LOW_BEEP	EQU	00100000b
	CRT_SLEEP_FLAG	EQU	01000000b

PM_MODE			DB	?
	FULL_ON		EQU	0
	DOZE_MODE	EQU	1
	SLEEP_MODE	EQU	2
	STANDBY_MODE	EQU	SLEEP_MODE
	SUSPEND_MODE	EQU	3

;R20 DISP_PM_MODE		db	0			;R10
DISP_PM_MODE		db	?			;R20

APM_STATUS		DB	?		    ; APM run-time status
	IS_CONNECT_CALL_MADE	EQU	10000000b   ;=1 if a connect call has been made
	IS_16BIT_ESTABLISHED	EQU	01000000b   ;=1 if 16 bit connection has been established
	IS_32BIT_ESTABLISHED	EQU	00100000b   ;=1 if 32 bit connection has been established
;R34	IS_SL_SMM_CONNECTED	EQU	00010000b   ;=1 if SL_SMM direct connection has been done
	SETUP_PM_DISABLED	EQU	00010000b   ;1 PM disabled in Setup ;R34
	IS_32BIT_SUPPORTED	EQU	00001000b   ;=1 if 32 bit call is supported in BIOS
	IS_16BIT_SUPPORTED	EQU	00000100b   ;=1 if 16 bit call is supported in BIOS
	IS_PM_ENABLED		EQU	00000010b   ;=1 if PM is enabled
	IS_APM_SUPPORTED	EQU	00000001b   ;=1 if APM is supported in BIOS

EXTEND_APM_STATUS		db	?
	PM_ALLOWED_BY_APM	EQU	00000001b	;if = 0
							; ==> no H/W auto PM
	IS_PM_ENGAGED		EQU	00000010b	;=1 if PM engaged
	APM_16BIT_FUNC_MODE	EQU	00000100b	;0 : serving Real
							;1 : serving 16 bit
	APM11_INSTALLED		EQU	00001000b	;R09
	APM12_INSTALLED		EQU	00010000b	;R09
	PMU_TIMER_ENABLED	EQU	00100000b	;R09
	RING_WAKEUP_ENABLED	EQU	01000000b	;R09
	RESUME_TIMER_ENABLED	EQU	10000000b	;R12

;R09 - starts
APM12_CAPABILTY			db	?
	STANDBY_CAP			EQU	00000001b
	SUSPEND_CAP			EQU	00000010b
	STANDBY_RESUME_TIMER_CAP	EQU	00000100b
	SUSPEND_RESUME_TIMER_CAP	EQU	00001000b
	STANDBY_RING_CAP		EQU	00010000b
	SUSPEND_RING_CAP		EQU	00100000b
	STANDBY_PCMCIA_RING_CAP		EQU	01000000b
	SUSPEND_PCMCIA_RING_CAP		EQU	10000000b
;R09 - ends

APMEventSave		DB	?
	SUSPENDREQUEST		EQU	02H
	USER_SUSPENDREQUEST	EQU	0Ah
	SUSPEND_CRITICAL_NOTIFY	EQU	08h

	STANDBYREQUEST		EQU	01H
	USER_STANDBYREQUEST	EQU	09h

	RESUME_NORMAL_NOTIFY	EQU	03H
	RESUME_CRITICAL_NOTIFY	EQU	04H
	STANBY_RESUME_NOTIFY	EQU	0BH

	BATT_LOW_NOTIFY		EQU	05H
	PM_STATUS_CHANGE_NOTIFY	EQU	06H
	UPDATE_TIME_NOTIFY	EQU	07h

	NO_EVENTS		EQU	80h

APM_EVENT_POST		DB	?
	STANDBY_POST		EQU	00000001b
	SUSPEND_POST		EQU	00000010b
	BATT_LOW_POST		EQU	00000100b
;R30 start
ifndef	NO_BATTERY_SYSTEM
	ACOffMark		EQU	10000000b
	BattLowMark		EQU	01000000b
endif	;NO_BATTERY_SYSTEM
;R30 end

;R20 PM_CTRL_FLAG		DB	0
PM_CTRL_FLAG		DB	?			;R20
	IS_TSENG		EQU	00000100b   ;=1 is Tseng VGA card
	CPU_IDLE_FLAG		EQU	00000010b   ;=1 CPU idle flag
	V_H_SYNC_ENABLE		EQU	00000001b   ;=1 if VGA adaptor not 'TSENG' VGA card.

;R20 TSENG_HORI_START	DB	0
TSENG_HORI_START	DB	?		;R20

ifdef	BATTERY_SYSTEM				;R16
;R20 BATTERY_UNIT	 	DB	0		;R16
BATTERY_UNIT	 	DB	?		;R20
endif	;BATTERY_SYSTEM				;R16

;R01 - Begin
DPMS_Label		DD	?				;R02
DPMS_Capability		DB	?
	DPMS_ON			EQU	00000000b
	DPMS_STANDBY		EQU	00000001b
	DPMS_SUSPEND		EQU	00000010b
	DPMS_OFF		EQU	00000100b
	DPMS_REDUCE_ON		EQU	00001000b
;R11 DPMS_Entry_Vector	DD	?
INT10_Save		DD	?			;R11 
VGA_HOOK_Save		DD	?			;R17 
DPMS_Request_State	DB	?
;R01 - End

;R09 - starts
Software_SMI_Type	DB	?
SMI_0V_Resume			EQU	5		;Resume From 0V
SMI_BIOS_RSM			EQU	6		;Made real mode RSM
SMI_5V_Resume			EQu	7		;R23
SMI_S4_Resume			EQU	8		;R36


DISABLE_RESUME_RING		EQU	10h
ENABLE_RESUME_RING		EQU	11h
DISABLE_TIMER_REQ		EQU	12h
ENABLE_TIMER_REQ		EQU	13h
RESTORE_POWERON_D4_REQ		EQU	14h
DISABLE_PM_REQ			EQU	15h
ENABLE_PM_REQ			EQU	16h
CRT_OFF_REQ			EQU	17h	;R10
CRT_ON_REQ			EQU	18h	;R10
DISABLE_RESUME_TIMER_REQ	EQU	19h	;R12
;R12A ENABLE_RESUME_TIMER_REQ		EQU	19h	;R12
;R12B ENABLE_RESUME_TIMER_REQ		EQU	20h	;R12A
ENABLE_RESUME_TIMER_REQ		EQU	1Ah	;R12B
;R09 - ends
;R19 - start
ifdef	SMBIOS_INTERFACE
SMI_SMB				EQU	20h		;handle smart bus command
endif	;SMBIOS_INTERFACE
;R19 - end
;R46 - start
ifdef	Flash_IN_SMBASE
	SMI_FlashRead		EQU	28h
	SMI_FlashErase		EQU	29h
	SMI_FlashWrite		EQU	2Ah
	SMI_FlashProgram	EQU	2Bh
	SMI_FlashPartErase	EQU	2Ch 	;R47
	SMI_BIOS_Inf		EQU	2Eh	;R51
	SMI_Auto_Flash		EQU	2Fh	;R51
endif;	Flash_IN_SMBASE
;R46 - start

;R33 start
ifdef	APM_IN_SMBASE
APM_SMI				EQU	30h
endif	;APM_IN_SMBASE
;R33 end
S2_RESTORE_REQ			EQU	40h		;R35
S3_RESTORE_REQ			EQU	41h		;R35

;Note : 5?h are used by chipset !!!			;R42


;R20 RESUME_SECOND		db	0		;R12
;R20 RESUME_MINUTE		db	0		;R12
;R20 RESUME_HOUR		db	0		;R12
;R20 RESUME_DAY		db	0		;R12
;R20 RESUME_MONTH		db	0		;R12
;R20 RESUME_YEAR		db	0		;R12
;R20 RESUME_CENTURY		db	0		;R12
;R20 DEASSERT_STPCLK_IRQS	dw	0		;R12
;R20 - start
RESUME_SECOND		db	?
RESUME_MINUTE		db	?		
RESUME_HOUR		db	?		
RESUME_DAY		db	?		
RESUME_MONTH		db	?		
RESUME_YEAR		db	?		
RESUME_CENTURY		db	?		
DEASSERT_STPCLK_IRQS	dw	?		
;R20 -end

;R08 - start
ifdef	Notebook_Power_Management	
	ifndef	NO_LCD_DISPLAY
		LCD_CRT_OPTION		EQU	1
	endif	;NO_LCD_DISPLAY
endif	;Notebook_Power_Management	
ifdef	LCD_CRT_OPTION	
Display_Mode		DB	?	
endif	;LCD_CRT_OPTION	
;R08 - end

;R20 APM_MODEM_IRQ		dw	0	;R13 for apm12
APM_MODEM_IRQ		dw	?	;R20 for apm12
;R13 APM_MODEM_IRQ		db	0		;apm12

;R21 - start
ifdef	ALi514x
USE_POWER_ITEM		EQU	1		;R24
endif;	ALi514X					;R24
ifdef	nSMI_USE				;R24
USE_POWER_ITEM		EQU	1		;R24
endif;	nSMI_USE				;R24
ifdef	APC_POWER_SWITCH_SUPPORT
ifdef	USE_POWER_ITEM				;R24
POWER_ITEM_VALUE		db	0
endif;	USE_POWER_ITEM				;R24
endif;	APC_POWER_SWITCH_SUPPORT
;R24endif;	ALi514x
;R21 - end
;R22 -start
ifdef	APC_POWER_SWITCH_SUPPORT
ifdef	SUPPORT_RTC_ON
RTC_ON_ITEM_VALUE		db	0
RTC_ON_DAY_VALUE		db	0	;R22A
RTC_ON_HOUR_VALUE		db	0
RTC_ON_MINUTE_VALUE		db	0
RTC_ON_SECOND_VALUE		db	0
endif;	SUPPORT_RTC_ON
endif;	APC_POWER_SWITCH_SUPPORT
;R22 - end
;R26 - start
ifdef	CPU_FAN_POWER_CONTROL_AT_PM
ifdef	CPU_FAN_POWER_CONTROL_SELECTABLE
CPU_FAN_POWER_VALUE		db	1
endif;	CPU_FAN_POWER_CONTROL_SELECTABLE
endif;	CPU_FAN_POWER_CONTROL_AT_PM
;R26 - end

	DESKTOP_POWER_MANAGEMENT		=	1	;R25
IFDEF	NoteBook_Power_Management
	ifndef	DESKTOP_SYSTEM					;R25
		DESKTOP_POWER_MANAGEMENT	=	2	;R25
	endif	;DESKTOP_SYSTEM					;R25

;R38 ; Suspend/Resume message location Y
;R38 ZV_Msg_Start_Y		EQU	8

; Suspend Option setting
Suspend_Option		DB	?
	Static_Suspend	EQU	0
	Zero_V_Suspend	EQU	1
	Five_V_Suspend	EQU	2

;R04 - start
;R09 Software_SMI_Type	DB	?
;R09 SMI_0V_Resume		EQU	5		;Resume From 0V
;R09 SMI_BIOS_RSM		EQU	6		;Made real mode RSM
;R04 - end

;R38 ; Harddisk sector start for Zero-Volt-Ssuspend
;R38 ZV_HDD_Sector		DD	?
;R38 
;R38 ; Harddisk sectors per cylinder
;R38 Cylinder_Sector		DW	?
;R38 
;R38 ; Harddisk sectors per head
;R38 Head_Sector		DB	?
;R38 
;R38 ;R31 start
;R38 ZV_HDD_Scheme	db	?	;bit 0,1 = 00 : HDD on Primary master
;R38 				;	   01 : HDD on Primary slave
;R38 				;	   10 : HDD on Secondary master
;R38 				;	   11 : HDD on Secondary slave
;R38 				;bit 2,3 is HDD mode
;R38 				;00 : CHS mode
;R38 				;01 : LBA mode
;R38 				;10 : LARGE mode
;R38 ;R31 end
;R38 
;R38 ;R07 - start
;R38 ; FAT type 
;R38 FAT_TYPE		DB	?
;R38 	FAT_12bit	EQU	01h
;R38 	FAT_16bit	EQU	02h
;R38 	FAT_32bit	EQU	03h		;R32

;R07A FAT12_SECTOR		EQU	3
;R07A FAT12_TBL_SIZE		EQU	((512 * 2) / 3 ) * FAT12_SECTOR
;R07A FAT16_SECTOR		EQU	1
;R07A FAT16_TBL_SIZE		EQU	(512 / 2) * FAT16_SECTOR

;R38 ; Harddisk sectors per cluster for FAT system			
;R38 Cluster_Sector		DB	?				

;R07A ; FAT File Starting cluster
;R07A Start_Cluster		DW	?				
;R07A 
;R07A ; 1st FAT starting sector
;R07A First_FAT_Sector	DD	?				
;R07A 
;R07A Cluster_Point		DW	?				
;R07A 
;R07A Sector_Point		DB	?				
;R07 - end

;R38 ;R06	ZV_HDD_SMBASE_Sector	EQU	1
;R38 ;R06	ZV_HDD_BASEMEM_Sector	EQU	ZV_HDD_SMBASE_Sector	+32*2
;R38 	ZV_HDD_BASEMEM_Sector	EQU	1				;R06
;R38 	ZV_HDD_SMBASE_Sector	EQU	ZV_HDD_BASEMEM_Sector 	+640*2	;R06
;R38 	ZV_HDD_VBUFFER_Sector	EQU	ZV_HDD_BASEMEM_Sector	+704*2	;R06
;R38 	ZV_HDD_VRAM_Sector	EQU	ZV_HDD_BASEMEM_Sector	+1024*2
;R38 ;R05	ZV_HDD_EXTMEM_Sector	EQU	ZV_HDD_VRAM_Sector	+512*2
;R38 ;R14	ZV_HDD_EXTMEM_Sector	EQU	ZV_HDD_VRAM_Sector	+2048*2	;R05
;R38 	ZV_HDD_EXTMEM_Sector	EQU	ZV_HDD_VRAM_Sector	+4096*2	;R14

;R11 INT10_Save		DD	?

;R38 ;R37 - start
;R38 COMA_ADDRS		DW	?
;R38 COMB_ADDRS		DW	?
;R38 ;R37 - end

;R40 ;R19 - start
;R40 ifdef	SMBIOS_INTERFACE
;R40 SMB_STATUS			DB	?	    	;SMB run-time status
;R40 	SMB_32BIT_CONNECTED	EQU	00000100b   	;=1 if 32 bit connection has been established
;R40 	SMB_16BIT_CONNECTED	EQU	00000010b   	;=1 if 16 bit connection has been established
;R40 	SMB_REALMODE_CONNECTED	EQU	00000001b   	;=1 if real mode connection has been established
;R40 
;R40 SMB_EXTEND_STATUS		DB	?	    	;SMB run-time extend status
;R40 	SMB_IN_PROGRESS 	EQU	10000000b   	;=0 finished or not start yet, =1 In progress
;R40 	SMB_BLOCKREAD_FLAG	EQU	01000000b	;if = 1 then you need save first byte to SMB_BLOCKREAD_COUNTER
;R40 	SMB_WITH_PROTOCOL	EQU	00000100b   	;=1 if last CMD with PROTOCOL
;R40 	SMB_WITH_ADDRESS	EQU	00000010b   	;=1 if last CMD with ADDRESS
;R40 	SMB_WITH_DEVICE_CMD	EQU	00000001b   	;=1 if last CMD with DEVICE COMMAND
;R40 
;R40 SMB_LAST_PROTOCOL		DB	?		;save last protocol
;R40 SMB_LAST_ADDRESS		DB	?		;save last address
;R40 SMB_LAST_DEVICE_CMD		DB	?		;save last device command
;R40 SMB_BLOCKREAD_COUNTER		DB	?		;block read counter
;R40 SMB_OLD_CMD_BYTE		DB	?	    	;for save old kerboard controller command byte
;R40 
;R40 ifdef	M388XX_SMBus					;R29
;R40 ;----for SMI use----
;R40 SMB_FLAG			DB	?		;temp flag
;R40 SMB_AX				Dw	?		;temp save AX
;R40 SMB_BX				Dw	?		;temp save BX
;R40 SMB_CX				Dw	?		;temp save CX
;R40 SMB_DX				Dw	?		;temp save DX
;R40 
;R40 ifdef	SMB_NOUSE_60H_64H			;R39
;R40 SMB_DATA_ADDRESS		DB	?	;R39
;R40 endif	;SMB_NOUSE_60H_64H			;R39
;R40 endif	;M388XX_SMBus					;R29
;R40 endif; SMBIOS_INTERFACE
;R40 ;R19 - end

;R25 - start
if	DESKTOP_Power_Management	EQ	2
ifndef	No_HotKey_Set_PM
PM_Method		db	?
endif	;No_HotKey_Set_PM
endif	;DESKTOP_Power_Management	EQ	2
;R25 - end

ENDIF	;NoteBook_Power_Management

;R40 - start
ifdef	SMBIOS_INTERFACE
SMB_STATUS			DB	?	    	;SMB run-time status
	SMB_32BIT_CONNECTED	EQU	00000100b   	;=1 if 32 bit connection has been established
	SMB_16BIT_CONNECTED	EQU	00000010b   	;=1 if 16 bit connection has been established
	SMB_REALMODE_CONNECTED	EQU	00000001b   	;=1 if real mode connection has been established

SMB_EXTEND_STATUS		DB	?	    	;SMB run-time extend status
	SMB_IN_PROGRESS 	EQU	10000000b   	;=0 finished or not start yet, =1 In progress
	SMB_BLOCKREAD_FLAG	EQU	01000000b	;if = 1 then you need save first byte to SMB_BLOCKREAD_COUNTER
	SMB_WITH_PROTOCOL	EQU	00000100b   	;=1 if last CMD with PROTOCOL
	SMB_WITH_ADDRESS	EQU	00000010b   	;=1 if last CMD with ADDRESS
	SMB_WITH_DEVICE_CMD	EQU	00000001b   	;=1 if last CMD with DEVICE COMMAND

SMB_LAST_PROTOCOL		DB	?		;save last protocol
SMB_LAST_ADDRESS		DB	?		;save last address
SMB_LAST_DEVICE_CMD		DB	?		;save last device command
SMB_BLOCKREAD_COUNTER		DB	?		;block read counter
SMB_OLD_CMD_BYTE		DB	?	    	;for save old kerboard controller command byte

ifdef	M388XX_SMBus					;R29
;----for SMI use----
SMB_FLAG			DB	?		;temp flag
SMB_AX				Dw	?		;temp save AX
SMB_BX				Dw	?		;temp save BX
SMB_CX				Dw	?		;temp save CX
SMB_DX				Dw	?		;temp save DX

ifdef	SMB_NOUSE_60H_64H			;R39
SMB_DATA_ADDRESS		DB	?	;R39
endif	;SMB_NOUSE_60H_64H			;R39
endif	;M388XX_SMBus				;R29
;R50 - start										
ifdef	H8_SMBus					
;----for SMI use----
SMB_FLAG			DB	?		;temp flag
SMB_AX				Dw	?		;temp save AX
SMB_BX				Dw	?		;temp save BX
SMB_CX				Dw	?		;temp save CX
SMB_DX				Dw	?		;temp save DX
SMB_DATA_ADDRESS		DB	?	
endif	;H8_SMBus					
;R50 - end					
endif; SMBIOS_INTERFACE
;R40  - end											
								

;R33 start
ifdef	APM_IN_SMBASE
;----for APM use----
APM_FLAG			DB	?		;temp save flag reg
APM_EAX				DD	?		;temp save AX
APM_ECX				DD	?		;temp save CX
APM_EDX				DD	?		;temp save DX
APM_EBX				DD	?		;temp save BX
APM_EDI				DD	?		;temp save DI
APM_ESI				DD	?		;temp save SI
APM_EBP				DD	?		;temp save EBP

APM_SMIFlag			DB	?
	APM_SMICall		EQU	1
	Standby_Req		EQU	2
	Suspend_Req		EQU	3
	Func07_call		EQU	7
	Func08_call		EQU	8
	Func09_call		EQU	9
	Func11_call		EQU	11
	Func13_call		EQU	13
endif	;APM_IN_SMBASE
;R33 end

;R38 - start
if	STD_Function		EQ	1
; Suspend/Resume message location Y
ZV_Msg_Start_Y		EQU	8

; Harddisk sector start for Zero-Volt-Ssuspend
ZV_HDD_Sector		DD	?

; Harddisk sectors per cylinder
Cylinder_Sector		DW	?

; Harddisk sectors per head
Head_Sector		DB	?

ZV_HDD_Scheme	db	?	;bit 0,1 = 00 : HDD on Primary master
				;	   01 : HDD on Primary slave
				;	   10 : HDD on Secondary master
				;	   11 : HDD on Secondary slave
				;bit 2,3 is HDD mode
				;00 : CHS mode
				;01 : LBA mode
				;10 : LARGE mode

; FAT type 
FAT_TYPE		DB	?
	FAT_12bit	EQU	01h
	FAT_16bit	EQU	02h
	FAT_32bit	EQU	03h

; Harddisk sectors per cluster for FAT system			
Cluster_Sector		DB	?				

	ZV_HDD_BASEMEM_Sector	EQU	1				
	ZV_HDD_SMBASE_Sector	EQU	ZV_HDD_BASEMEM_Sector 	+640*2	
	ZV_HDD_VBUFFER_Sector	EQU	ZV_HDD_BASEMEM_Sector	+704*2	
	ZV_HDD_VRAM_Sector	EQU	ZV_HDD_BASEMEM_Sector	+1024*2
	ZV_HDD_EXTMEM_Sector	EQU	ZV_HDD_VRAM_Sector	+4096*2	

Hdd_Head		DB	?		;R45
Logical_Heads		DB	?		;R45

COMA_ADDRS		DW	?
COMB_ADDRS		DW	?
;R43 - start
ifdef	ACPI_Support
ifdef	S4_support						
VGA_SLOT_ID 		DB	?
VGA_IO_ADD		DB	?		
VGA_DEV_ID		DB	?		
ifdef	AGP_SLOTID 				
AGP_IO_ADD		DB	?
AGP_IO_LIM		DB	?
endif	;AGP_SLOTID				
endif	;S4_support						
endif	;ACPI_Support	
;R43 - end			
endif	;STD_Function		EQ	1
;R49 - start	
if	STR_Function		EQ	1
HDD_PIO_MODE		DW	?	
Ultra_Dma_Mode		DB	?
endif	;STR_Function		EQ	1
;R49 - end			
;R38 - end
