• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#------------------------------------------------------------------------------
2#
3# CpuSleep() for ARMv7
4#
5# ARMv6 versions was:
6#    MOV r0,#0
7#    MCR p15,0,r0,c7,c0,4   ;Wait for Interrupt instruction
8#
9# But this is a no-op on ARMv7
10#
11# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
12# Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
13# This program and the accompanying materials
14# are licensed and made available under the terms and conditions of the BSD License
15# which accompanies this distribution.  The full text of the license may be found at
16# http://opensource.org/licenses/bsd-license.php.
17#
18# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
19# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20#
21#------------------------------------------------------------------------------
22
23.text
24.p2align 2
25GCC_ASM_EXPORT(CpuSleep)
26
27#/**
28#  Places the CPU in a sleep state until an interrupt is received.
29#
30#  Places the CPU in a sleep state until an interrupt is received. If interrupts
31#  are disabled prior to calling this function, then the CPU will be placed in a
32#  sleep state indefinitely.
33#
34#**/
35#VOID
36#EFIAPI
37#CpuSleep (
38#  VOID
39#  );
40#
41ASM_PFX(CpuSleep):
42    wfi
43    bx  lr
44