Specifications

©
2008 Advanced Micro Devices Inc.
Sample Programs
AMD SB600 BIOS Developer’s Guide (Public Version) Proprietary
Page 88
PI1S,1, //
PI0S,1, //
Offset(0x55),
SPRE,1, //
Offset(0x68),
,3,
TPDE,1, //
,1
} //end of indexed field
14.9.2 Sleep Trap SMI Routine
The following example implements the Sleep Trap SMI# routine.
SLPSMI_HANDLER_FAR PROC FAR PUBLIC
; Read PM1_CNT to get sleep type
mov dx, PM_BASE_ADDRESS + SB_PM_IO_PM1_CTRL; (PM1_CNT 04h)
in ax, dx
and ax, PM1_CNT_SLP_TYPE
shr ah, 2
dec ah ; For Table from 0
movzx bx, ah
shl bx, 1
add bx, offset cs:ACPISleepTrapTable
mov bx, cs:[bx]
SleepTrapPatch:
cmp word ptr cs:[bx], 0ffffh
je short SleepTrapPatchDone
push bx
call word ptr cs:[bx]
pop bx
inc bx
inc bx
jmp short SleepTrapPatch
SleepTrapPatchDone:
; Disable SLP2SMI
mov ah, SB_PMU_REG_04 ; PMIO_REG.04h[7] = SLP2SMI Enable
call read_io_pmu
and al, NOT BIT7 ; Disable SLP2SMI
call write_io_pmu
; Clear SLP2SMI Status bit
mov ah, SB_PMU_REG_07 ; PMIO_REG.07h[7] = SLP2SMI Status
call read_io_pmu
call write_io_pmu ; Write 1 to clear SLP2SMI status
; Write SLP_EN to put SB into sleep
mov dx, PM_BASE_ADDRESS + SB_PM_IO_PM1_CTRL ; PM1_CNT 04h
in ax, dx
or ax, Bit13 ; PM1_CNT_SLP_EN
out dx, ax ; This puts SB to sleep state
ret