
10-6
G2 PowerPC Core Reference Manual
For More Information On This Product,
Go to: www.freescale.com
MOTOROLA
Example Code Sequence for Entering Processor Sleep Mode
Reconfigure PLL into desired processor clock mode
System logic waits for PLL startup and relock time (100 μsec)
System logic asserts one of the sleep recovery signals (for example, core_int or
core_smi)
10.3.2 Power Management Software Considerations
Because the G2 core is a dual issue processor core with out-of-order execution capability,
care must be taken in how the power management modes are entered. Furthermore, nap and
sleep modes require all outstanding bus operations to be completed before the power
management mode is entered. Section 10.4, “Example Code Sequence for Entering
Processor Sleep Mode,” provides an example software sequence for putting the G2 core
into sleep mode.
Normally, during system configuration time, one of the power management modes would
be selected by setting the appropriate HID0 mode bit. Later on, the power management
mode is invoked by setting MSR[POW]. To ensure a clean transition into and out of the
power management mode, set MSR[EE] (external interrupt enable) and execute the
following code sequence:
sync
mtmsr[POW = 1]
isync
b loop
loop:
10.4 Example Code Sequence for Entering Processor
Sleep Mode
The following is a sample code sequence for entering G2 core sleep mode.
*********************************************************************
# set up G2 core HID0 power management bits
#*********************************************************************
#******processor HID and external interrupt initialization*******************
#
# set up HID registers for the various processors of this family
# hid setup taken from minix's mpxPowerPC.s
mfspr r31, pvr # pvr reg
srawi r31, r31, 16
resetTest603:
cmpi 0, 0, r31, 3
bne cr0, endHIDSetup
addi r0, r0, 0
oris r0, r0, 0x8000 # enable machine check pin EMCP
oris r0, r0, 0x0010 # enable dynamic power mgmt DPM
oris r0, r0, 0x0020 # enable SLEEP power mode
ori r0, r0, 0x8000 # enable the Icache ICE
F
Freescale Semiconductor, Inc.
n
.