From: Craig C. <cra...@gm...> - 2005-12-16 16:14:26
|
Hi, According to the PXA255 Assembler Manual, MCR, MCR2, MCRR are defined as: "move to coprocessor from ARM registers. Depending on the coprocessor you might be ablet o specify various operations in addition. Syntax MCR{cond} coproc, opcode1, Rd, CRn, CRm{, opcode2} ... where: cond is an optional condition code coproc is the name of the coprocessor the insturction is for. The standar= d name is pn where n is an integer from 0-15 opcode1 is a coprocessor specific opcode Rd, Rn are ARM source registers They must not be r15 CRn, CRm are coprocessor registers opcode2 is an optional coprocessor specific opcode. Usage The use of these instructions depends on the coprocessor. See the coprocessor documentation for details. MCR is available in ARM architecture versions 2 and above." I don't have any documentation on the coprocessor handy, but I think it's safe to assume that coprocessor 0 is some sort of idle-mode coprocessor or virtual-coprocessor responsible for putting the pxa255 to sleep... or at least that's what the developers thought when they wrote that function. Hope this helps, CCasey On 12/16/05, Dave Hylands <dhy...@gm...> wrote: > > HI Doug, > > > I see no mention of automatic switching to Idle Mode. Are you saying > > that the linux is already set up to do the above? There are Sleep, > > Idle, Run, and Turbo modes. Switching between modes requires software > > writing to registers according to the docs. Where is the "automatic" > > functionality? > > Yeah - so the linux idle process can be found in > arch/arm/kernel/process.c and is called cpu_idle(). It in turns call > arch_idle (through the default_idle function) which is mapped to > cpu_do_idle in include/asm/arch/system.h > > cpu_do_idle gets mapped to cpu_xscale_do_idle by > include/asm/cpu-single.h and include/asm/proc-fns.h > > cpu_xscale_do_idle (in arch/arm/mm/proc-xscale.S has this: > > /* > * cpu_xscale_do_idle() > * > * Cause the processor to idle > * > * For now we do nothing but go to idle mode for every case > * > * XScale supports clock switching, but using idle mode support > * allows external hardware to react to system state changes. > */ > .align 5 > > ENTRY(cpu_xscale_do_idle) > mov r0, #1 > mcr p14, 0, r0, c7, c0, 0 @ Go to IDLE > mov pc, lr > > I'd need to lookup the mcr p14 instruction to see exactly what it does. > > -- > Dave Hylands > Vancouver, BC, Canada > http://www.DaveHylands.com/ > > > ------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. Do you grep through log > files > for problems? Stop! Download the new AJAX search engine that makes > searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! > http://ads.osdn.com/?ad_idv37&alloc_id=16865&opclick > _______________________________________________ > gumstix-users mailing list > gum...@li... > https://lists.sourceforge.net/lists/listinfo/gumstix-users > |