]> git.proxmox.com Git - mirror_edk2.git/blame - EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseLib/X64/SwitchStack.asm
Add in the 1st version of ECP.
[mirror_edk2.git] / EdkCompatibilityPkg / Foundation / Library / EdkIIGlueLib / Library / BaseLib / X64 / SwitchStack.asm
CommitLineData
3eb9473e 1; Copyright (c) 2004, Intel Corporation \r
2; All rights reserved. This program and the accompanying materials \r
3; are licensed and made available under the terms and conditions of the BSD License \r
4; which accompanies this distribution. The full text of the license may be found at \r
5; http://opensource.org/licenses/bsd-license.php \r
6; \r
7; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
8; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
9;\r
10; Module Name:\r
11;\r
12; SwitchStack.Asm\r
13;\r
14; Abstract:\r
15;\r
16;------------------------------------------------------------------------------\r
17\r
18 .code\r
19\r
20;------------------------------------------------------------------------------\r
21; Routine Description:\r
22;\r
23; Routine for switching stacks with 1 parameter\r
24;\r
25; Arguments:\r
26;\r
27; (rcx) EntryPoint - Entry point with new stack.\r
28; (rdx) Context - Parameter for entry point.\r
29; (r8) Context2 - Parameter2 for entry point.\r
30; (r9) NewStack - Pointer to new stack.\r
31;\r
32; Returns:\r
33;\r
34; None\r
35;\r
36;------------------------------------------------------------------------------\r
37InternalSwitchStack PROC\r
38 mov rax, rcx\r
39 mov rcx, rdx\r
40 mov rdx, r8\r
41 lea rsp, [r9 - 20h]\r
42 call rax\r
43InternalSwitchStack ENDP\r
44\r
45 END\r