In the arm9-core, one of the methods to achieve low power consumption can be managed through MMU. Add the following code to the idle task :. section _ cache_asm. global _ mmuwaitforinterrupt;/* The system kernel enters the low power mode. */;/* Wait For FIQ/IRQ to activate */. func _ mmuwaitforinterrupt:;/* arm enters the energy-saving state and waits for interruption */movr0, 0mcrp15, 0, R0, C7, C0, 4 movpc, LR. the endfunc uses the arm926 kernel as an example. Linux Kernel implementation in arch/ARM/MM/proc-arm926.S files: 97/* 98 * cpu_arm926_do_idle () # idle task 99*100 * called with irqs disabled101 */102. align 10103 entry (cpu_arm926_do_idle) 104 mov r0, #0105 MRC P15, 0, R1, C1, C0, 0 @ read control register106 MCR P15, 0, R0, C7, C10, 4 @ drain write buffer107 Bic R2, R1, #1 <12108 Mrs R3, CPSR @ disable fiqs while icache109 Orr IP, R3, # psr_f_bit @ is disabled110 MSR cpsr_c, ip111 MCR P15, 0, R2, C1, C0, 0 @ disable I cache112 MCR P15, 0, R0, C7, C0, 4 @ wait for interrupt113 MCR P15, 0, R1, c1, C0, 0 @ restore icache enable114 MSR cpsr_c, R3 @ restore FIQ state115 mov PC, lr116
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.