]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BaseCpuLib/Arm/CpuSleep.S
MdePkg: Clean up source files
[mirror_edk2.git] / MdePkg / Library / BaseCpuLib / Arm / CpuSleep.S
index ec2061a4b32aec9d742be23ef9739ec5d2d22740..06caf1a3b86acbc84505b0c815106796e502269d 100644 (file)
@@ -1,8 +1,14 @@
-#------------------------------------------------------------------------------ \r
+#------------------------------------------------------------------------------\r
+#\r
+# CpuSleep() for ARMv7\r
+#\r
+# ARMv6 versions was:\r
+#    MOV r0,#0\r
+#    MCR p15,0,r0,c7,c0,4   ;Wait for Interrupt instruction\r
 #\r
-# CpuSleep() for ARM\r
+# But this is a no-op on ARMv7\r
 #\r
-# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
 # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
 # This program and the accompanying materials\r
 # are licensed and made available under the terms and conditions of the BSD License\r
@@ -16,8 +22,7 @@
 \r
 .text\r
 .p2align 2\r
-.globl ASM_PFX(CpuSleep)\r
-INTERWORK_FUNC(CpuSleep)
+GCC_ASM_EXPORT(CpuSleep)\r
 \r
 #/**\r
 #  Places the CPU in a sleep state until an interrupt is received.\r
@@ -34,6 +39,5 @@ INTERWORK_FUNC(CpuSleep)
 #  );\r
 #\r
 ASM_PFX(CpuSleep):\r
-    mov r0,#0\r
-    mcr p15,0,r0,c7,c0,4   // Wait for Interrupt instruction\r
+    wfi\r
     bx  lr\r