ARM中的WFE指令处理 [英] WFE instruction handling in ARM

查看:403
本文介绍了ARM中的WFE指令处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WFE指令如何工作? 我读到的是它使处理器等待IRQ/FIQ/event/....

How does a WFE instruction work ? What I have read is that it makes processor wait for an IRQ /FIQ/event/....

但是当您收到IRQ时会发生什么,irq_fault_handler向量是否在获得中断或WFE之后的指令执行时执行?

But what happens when you get an IRQ, does the irq_fault_handler vector executes on getting an interrupt or instruction subsequent to the WFE is executed ?

推荐答案

WFE在概念上等同于

WFE is conceptually equivalent to

while (!event_has_occurred) /*do nothing*/;

除了它会关闭CPU而不是运行紧密的循环.

except that it turns the CPU off instead of running a tight loop.

可能会中断的几件事WFE ,不仅包括中断,还包括来自另一个CPU(在多核处理器中)的显式唤醒事件.

Several things that can interrupt a WFE, including not only an interrupt but also an explicit wake up event from another CPU (in a multicore processor).

如果在WFE期间发生中断,则通常会发生.处理器切换到IRQ或FIQ模式,跳转到IRQ或FIQ处理程序,并将WFE指令的地址(加上通常的偏移量8)放在lr中.

If an interrupt happens during WFE, the usual things happens. The processor switches to IRQ or FIQ mode, jumps to the IRQ or FIQ handler, and the address of the WFE instruction (plus the usual offset of 8) is placed in lr.

如果CPU被显式的唤醒事件唤醒,则执行将继续执行WFE之后的下一条指令.

If the CPU was waken up by an explicit wake up event, the execution proceeds with the next instruction after the WFE.

将WFE视为很长的NOP,只有在发生某些外部事件时才能完成.

Think of WFE as a very long NOP which only completes when some external event happens.

这篇关于ARM中的WFE指令处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆