]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/Pei/Ipf/Stack.c
Add PeiCore module for enabling NT32Pkg, please attention this PeiCore does follows...
[mirror_edk2.git] / MdeModulePkg / Core / Pei / Ipf / Stack.c
1 /** @file
2 PeiSwitchStacks() function for PEI dispatcher.
3
4 Copyright (c) 2006 - 2007, 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 #include <PeiMain.h>
23
24 /**
25 Transfers control to a function starting with a new stack.
26
27 Transfers control to the function specified by EntryPoint using the new stack
28 specified by NewStack and passing in the parameters specified by Context1 and
29 Context2. Context1 and Context2 are optional and may be NULL. The function
30 EntryPoint must never return.
31
32 If EntryPoint is NULL, then ASSERT().
33 If NewStack is NULL, then ASSERT().
34
35 @param EntryPoint A pointer to function to call with the new stack.
36 @param Context1 A pointer to the context to pass into the EntryPoint
37 function.
38 @param Context2 A pointer to the context to pass into the EntryPoint
39 function.
40 @param NewStack A pointer to the new stack to use for the EntryPoint
41 function.
42 @param NewBsp A pointer to the new BSP for the EntryPoint on IPF. It's
43 Reserved on other architectures.
44
45 **/
46 VOID
47 EFIAPI
48 PeiSwitchStacks (
49 IN SWITCH_STACK_ENTRY_POINT EntryPoint,
50 IN VOID *Context1, OPTIONAL
51 IN VOID *Context2, OPTIONAL
52 IN VOID *NewStack,
53 IN VOID *NewBsp
54 )
55 {
56 SwitchStack (
57 EntryPoint,
58 Context1,
59 Context2,
60 NewStack,
61 NewBsp
62 );
63 }