]> git.proxmox.com Git - mirror_edk2.git/blob - MdePkg/Library/BaseLib/AArch64/SwitchStack.S
MdePkg/Library/BaseLib/AArch64: Comment style harmonization
[mirror_edk2.git] / MdePkg / Library / BaseLib / AArch64 / SwitchStack.S
1 #------------------------------------------------------------------------------
2 #
3 # Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>
4 # Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
5 # Portions copyright (c) 2011 - 2013, ARM Limited. All rights reserved.<BR>
6 # This program and the accompanying materials
7 # are licensed and made available under the terms and conditions of the BSD License
8 # which accompanies this distribution. The full text of the license may be found at
9 # http://opensource.org/licenses/bsd-license.php.
10 #
11 # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 #
14 #------------------------------------------------------------------------------
15
16 .text
17 .align 5
18
19 GCC_ASM_EXPORT(InternalSwitchStackAsm)
20 GCC_ASM_EXPORT(CpuPause)
21
22 #/**
23 #
24 # This allows the caller to switch the stack and goes to the new entry point
25 #
26 # @param EntryPoint The pointer to the location to enter
27 # @param Context Parameter to pass in
28 # @param Context2 Parameter2 to pass in
29 # @param NewStack New Location of the stack
30 #
31 # @return Nothing. Goes to the Entry Point passing in the new parameters
32 #
33 #**/
34 #VOID
35 #EFIAPI
36 #InternalSwitchStackAsm (
37 # SWITCH_STACK_ENTRY_POINT EntryPoint,
38 # VOID *Context,
39 # VOID *Context2,
40 # VOID *NewStack
41 # );
42 #
43 ASM_PFX(InternalSwitchStackAsm):
44 mov x29, #0
45 mov x30, x0
46 mov sp, x3
47 mov x0, x1
48 mov x1, x2
49 ret
50
51 #/**
52 #
53 # Requests CPU to pause for a short period of time.
54 #
55 # Requests CPU to pause for a short period of time. Typically used in MP
56 # systems to prevent memory starvation while waiting for a spin lock.
57 #
58 #**/
59 #VOID
60 #EFIAPI
61 #CpuPause (
62 # VOID
63 # )
64 #
65 ASM_PFX(CpuPause):
66 nop
67 nop
68 nop
69 nop
70 nop
71 ret