From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) by mx.groups.io with SMTP id smtpd.web08.1041.1610696873262228321 for ; Thu, 14 Jan 2021 23:47:53 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@oracle.com header.s=corp-2020-01-29 header.b=EYVmIGh7; spf=pass (domain: oracle.com, ip: 156.151.31.86, mailfrom: ankur.a.arora@oracle.com) Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10F7jQQs124615; Fri, 15 Jan 2021 07:47:50 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=C+w9XeL0N/YvBFfySdCi8l6MVwcJxA++fbCC9MT8Va4=; b=EYVmIGh7uNIydewvddXlo1f+aGPpM288WzKLjLmJFLV1nlFkLlhI0ARXoEVQ/7CilGKs j+HeDFY4hCfbO8FW/8VWqUkRdXusbNR3lemlIno/bcX5Tas6/gK6EktBW2TS0/Txn/Ws BMakCZ3DVZaADPIa2AWV3FF/ng32xN6ZnukU9jy/LZ1xUtKqf1YjK23FxaMdrNwOLwPu JuMkpnptdDvc8k0c/ScKp4Tbe+u7EC9LU+8cmptYUpWIVRR5j0bAqf+RGvKHui2slSUj T60y2chWizu+6NtC1fgmw/xFz6WNYZoGPdtj+GnlIA45O9M4Gg2jZEew73NUC4Eidzmd JA== Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by userp2130.oracle.com with ESMTP id 360kvkbnnw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Jan 2021 07:47:49 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 10F7efD0005641; Fri, 15 Jan 2021 07:45:49 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userp3020.oracle.com with ESMTP id 360kfapwpg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 15 Jan 2021 07:45:49 +0000 Received: from abhmp0019.oracle.com (abhmp0019.oracle.com [141.146.116.25]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 10F7jmik020894; Fri, 15 Jan 2021 07:45:48 GMT Received: from localhost.localdomain (/70.36.60.91) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 14 Jan 2021 23:45:48 -0800 From: "Ankur Arora" To: devel@edk2.groups.io Cc: imammedo@redhat.com, lersek@redhat.com, Ankur Arora , Michael D Kinney , Liming Gao , Zhiguang Liu , Boris Ostrovsky , Aaron Young Subject: [PATCH v3 10/10] MdePkg: use CpuPause() in CpuDeadLoop() Date: Thu, 14 Jan 2021 23:45:33 -0800 Message-Id: <20210115074533.277448-11-ankur.a.arora@oracle.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: <20210115074533.277448-1-ankur.a.arora@oracle.com> References: <20210115074533.277448-1-ankur.a.arora@oracle.com> MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9864 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 mlxlogscore=999 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101150044 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9864 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=999 phishscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 clxscore=1015 impostorscore=0 spamscore=0 mlxscore=0 suspectscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2101150044 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 Reviewed-by: Michael D Kinney --- 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..8fa5a783e90e 100644 --- a/MdePkg/Library/BaseLib/CpuDeadLoop.c +++ b/MdePkg/Library/BaseLib/CpuDeadLoop.c @@ -28,5 +28,7 @@ CpuDeadLoop ( {=0D volatile UINTN Index;=0D =0D - for (Index =3D 0; Index =3D=3D 0;);=0D + for (Index =3D 0; Index =3D=3D 0;) { + CpuPause(); + } }=0D --=20 2.9.3