Enable Nt32 platform boot to DXE phase.
[mirror_edk2.git] / MdeModulePkg / Core / Pei / Dispatcher / Stack.c
1 /** @file
2 PeiSwitchStacks() function for PEI dispatcher.
3
4 Copyright (c) 2006, Intel Corporation<BR>
5 All rights reserved. This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
9
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
12
13 Module Name: String.c
14
15 **/
16
17 //
18 // Include common header file for this module.
19 //
20 #include "CommonHeader.h"
21
22 /**
23 Transfers control to a function starting with a new stack.
24
25 Transfers control to the function specified by EntryPoint using the new stack
26 specified by NewStack and passing in the parameters specified by Context1 and
27 Context2. Context1 and Context2 are optional and may be NULL. The function
28 EntryPoint must never return.
29
30 If EntryPoint is NULL, then ASSERT().
31 If NewStack is NULL, then ASSERT().
32
33 @param EntryPoint A pointer to function to call with the new stack.
34 @param Context1 A pointer to the context to pass into the EntryPoint
35 function.
36 @param Context2 A pointer to the context to pass into the EntryPoint
37 function.
38 @param NewStack A pointer to the new stack to use for the EntryPoint
39 function.
40 @param NewBsp A pointer to the new BSP for the EntryPoint on IPF. It's
41 Reserved on other architectures.
42
43 **/
44 VOID
45 EFIAPI
46 PeiSwitchStacks (
47 IN SWITCH_STACK_ENTRY_POINT EntryPoint,
48 IN VOID *Context1, OPTIONAL
49 IN VOID *Context2, OPTIONAL
50 IN VOID *NewStack,
51 IN VOID *NewBsp
52 )
53 {
54 SwitchStack (EntryPoint, Context1, Context2, NewStack);
55 }