NAR-7070 User’s Manual
56
5.2 Reset To Default Sample Code
Reset To Default can provide user the flexibility of utilizing power button interface to be programmed into
alternative function as user program requires, greatly enhanced user convenience.
Below is the sample code for Reset To Default, for reference only
; For PPAP-3723,ROBO-8820 RESET to Default testing
; By Frank Hsu , 07/25/2003
;
; Reset to default status can be read from ICH3_GPI6.
; After Power On reset, GPI6 = low ( 0 )
; If Reset to Default (RST2DF) Button pressed ( Triggered )
; ,then GPI6 will be latch to high ( 1 ).
;
; RST2DF register can be cleared by ICH3_GPO19.
; Write a pulse timing ( High1_low_high2 ) to clear RST2DF to 0.
; High1 : output GPO19 high , and keep 10 us.
; Low : output GPO19 low , and keep 10 us.
; High2 : output GPo19 high again , and keep high always.
;
;
; Programming Guide :
; PG_Step1 : Enable ACPI IO port assignment and get PMBASE, then save to
; EBX_Bit[31..16]
;
; First : GPI_ROUT bit[13,12] P [0,0] : Let GPI6 not evoke SCI.
; Write GPI_Rout bit[13,12] to [0,0] for no effect on GPI6
; ( B0:D31:F0:Offset_B8h-Bit[13,12]P[0,0] , no SCI event evoked)
;
; Second: Enabe ACPI IO port by setting ACPI_CNTL bit4
; B0:D31:F0:Offset_44h_bit4P1
; Third : Get PMBASE ( ACPI I/O port BAR ) and
; save to EBX_bit[31..16].
; PMBASE=:B0:D31:F0:Offset[40..43h]
; Let Bit0 = 0.( PCI_BAR bit0 returns 1 for a IO_BAR )
;
;
;
; PG_Step2 : Enable GPIO IO function and get GPIOBASE, then save to
; ECX_Bit[31..16]
;
; How to program GPIO19 ( Output only , i.e. GPO19 )
; -------------------------------------------------------
; Get GPIOBASE =: B0:D31:F0:Offset[58..5Bh] ;(and let bit0 = 0 )
; GPIO_CNTL =: B0:D31:F0:Offset_5Ch_bit4P1 ;Enable ICH3 GPIO
;
; GPIO19
; GP_LVL (=:(GP 0Ch))_bit19P[0/1]; Write value 0/1
; ------------------------------------------------------
;
; How to read GPI6
; ======================================================
; GPI6 status MUST NOT be inverted First.
; GPI_INV (=G2Ch)-bit6P0. ( GPI6 not inverted )
;
; Get GPI6 status from GPE1_STS (=2Ch)-bit6
; 0 = low , 1= high level
; ======================================================
.MODEL tiny
.386
.STACK 200h
.data