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