Ankur: Can you give the detail usage for the lower power state when enter into CpuDeadLoop()?
Thanks Liming > -----邮件原件----- > 发件人: Ankur Arora <ankur.a.ar...@oracle.com> > 发送时间: 2021年3月17日 6:59 > 收件人: devel@edk2.groups.io > 抄送: Ankur Arora <ankur.a.ar...@oracle.com>; Liming Gao > <gaolim...@byosoft.com.cn>; Michael D Kinney > <michael.d.kin...@intel.com> > 主题: [PATCH] MdePkg: use CpuPause() in CpuDeadLoop() > > Use CpuPause() to allow the CPU to go into a lower power state > state while we spin wait. > > Cc: Liming Gao <gaolim...@byosoft.com.cn> > Signed-off-by: Ankur Arora <ankur.a.ar...@oracle.com> > Reviewed-by: Michael D Kinney <michael.d.kin...@intel.com> > --- > MdePkg/Library/BaseLib/CpuDeadLoop.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/MdePkg/Library/BaseLib/CpuDeadLoop.c > b/MdePkg/Library/BaseLib/CpuDeadLoop.c > index 9e110cacbc96..3cd304351a65 100644 > --- a/MdePkg/Library/BaseLib/CpuDeadLoop.c > +++ b/MdePkg/Library/BaseLib/CpuDeadLoop.c > @@ -28,5 +28,7 @@ CpuDeadLoop ( > { > volatile UINTN Index; > > - for (Index = 0; Index == 0;); > + for (Index = 0; Index == 0;) { > + CpuPause(); > + } > } > -- > 2.9.3 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#72940): https://edk2.groups.io/g/devel/message/72940 Mute This Topic: https://groups.io/mt/81393215/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-