]> git.proxmox.com Git - mirror_edk2.git/blob - UefiCpuPkg/CpuDxe/CpuMp.h
UefiCpuPkg/CpuDxe: Switch Ap Stack to NewStack
[mirror_edk2.git] / UefiCpuPkg / CpuDxe / CpuMp.h
1 /** @file
2 CPU DXE MP support
3
4 Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
5 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 **/
14
15 #ifndef _CPU_MP_H_
16 #define _CPU_MP_H_
17
18 /**
19 Initialize Multi-processor support.
20
21 **/
22 VOID
23 InitializeMpSupport (
24 VOID
25 );
26
27 typedef
28 VOID
29 (EFIAPI *STACKLESS_AP_ENTRY_POINT)(
30 VOID
31 );
32
33 /**
34 Starts the Application Processors and directs them to jump to the
35 specified routine.
36
37 The processor jumps to this code in flat mode, but the processor's
38 stack is not initialized.
39
40 @param ApEntryPoint Pointer to the Entry Point routine
41
42 @retval EFI_SUCCESS The APs were started
43 @retval EFI_OUT_OF_RESOURCES Cannot allocate memory to start APs
44
45 **/
46 EFI_STATUS
47 StartApsStackless (
48 IN STACKLESS_AP_ENTRY_POINT ApEntryPoint
49 );
50
51 /**
52 The AP entry point that the Startup-IPI target code will jump to.
53
54 The processor jumps to this code in flat mode, but the processor's
55 stack is not initialized.
56
57 **/
58 VOID
59 EFIAPI
60 AsmApEntryPoint (
61 VOID
62 );
63
64 /**
65 Releases the lock preventing other APs from using the shared AP
66 stack.
67
68 Once the AP has transitioned to using a new stack, it can call this
69 function to allow another AP to proceed with using the shared stack.
70
71 **/
72 VOID
73 EFIAPI
74 AsmApDoneWithCommonStack (
75 VOID
76 );
77
78 #endif // _CPU_MP_H_
79