From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from aserp2120.oracle.com (aserp2120.oracle.com [141.146.126.78]) by mx.groups.io with SMTP id smtpd.web11.2173.1610049470165048084 for ; Thu, 07 Jan 2021 11:57:50 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=Y+vfz2NP; spf=pass (domain: oracle.com, ip: 141.146.126.78, mailfrom: ankur.a.arora@oracle.com) Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 107JtbvA013698; Thu, 7 Jan 2021 19:57:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=corp-2020-01-29; bh=mlTQzGRdEnftDh9FMS3rbIrektL8cHSacj4LlzNh6dE=; b=Y+vfz2NPX2wELJplE/T5caysCnYfx9q2qJDkr6PDYLQmxhXqn+gOeGsdCSoMJFqdAx7L +Wyc9eD7tlhjCE/qoo93vO3bhXOjy9gZCwLX8E7wvv/Zs4kaU3bdTG6A7ShtFNS1Oc0i iHOYj7DEFExDmUUKOxl7PrZudiTTgBK/r5OqY71gUHzEBoMAu+ApVv6BC4GMrjM0WpaF zKp8D1qo9iprrc/c/0YPbY6fdzslIa6uLI1ufEDe/H1tH3LM14UMM2OMBxdq0pBBt0DB aZiO5/Ks2lg+Ljv1/mI9R8Hs4IAdAFJZEH5y3jOMWOXeyxF/heVv4DdUUHhKau7/eq5W yA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by aserp2120.oracle.com with ESMTP id 35wepme2u9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 07 Jan 2021 19:57:33 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 107Jss2t026037; Thu, 7 Jan 2021 19:55:33 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserp3020.oracle.com with ESMTP id 35v1fbn1t4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 07 Jan 2021 19:55:33 +0000 Received: from abhmp0002.oracle.com (abhmp0002.oracle.com [141.146.116.8]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 107JtWOw015280; Thu, 7 Jan 2021 19:55:32 GMT Received: from localhost.localdomain (/70.36.60.91) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 07 Jan 2021 11:55:31 -0800 From: "Ankur Arora" To: devel@edk2.groups.io Cc: lersek@redhat.com, imammedo@redhat.com, boris.ostrovsky@oracle.com, Ankur Arora , Michael D Kinney , Liming Gao , Zhiguang Liu , Aaron Young Subject: [PATCH v2 10/10] MdePkg: use CpuPause() in CpuDeadLoop() Date: Thu, 7 Jan 2021 11:55:15 -0800 Message-Id: <20210107195515.106158-11-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20210107195515.106158-1-ankur.a.arora@oracle.com> References: <20210107195515.106158-1-ankur.a.arora@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9857 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 suspectscore=0 spamscore=0 bulkscore=0 adultscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101070115 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9857 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 bulkscore=0 spamscore=0 impostorscore=0 phishscore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 mlxscore=0 malwarescore=0 clxscore=1015 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101070115 Content-Transfer-Encoding: quoted-printable Use CpuPause() to allow the CPU to go into a lower power state state while we spin wait. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Cc: Laszlo Ersek Cc: Igor Mammedov Cc: Boris Ostrovsky Cc: Aaron Young Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3132 Signed-off-by: Ankur Arora --- MdePkg/Library/BaseLib/CpuDeadLoop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdePkg/Library/BaseLib/CpuDeadLoop.c b/MdePkg/Library/BaseLib/= CpuDeadLoop.c index 9e110cacbc96..e76312de7b4e 100644 --- a/MdePkg/Library/BaseLib/CpuDeadLoop.c +++ b/MdePkg/Library/BaseLib/CpuDeadLoop.c @@ -28,5 +28,6 @@ CpuDeadLoop ( {=0D volatile UINTN Index;=0D =0D - for (Index =3D 0; Index =3D=3D 0;);=0D + for (Index =3D 0; Index =3D=3D 0;)=0D + CpuPause();=0D }=0D --=20 2.9.3