]> git.proxmox.com Git - mirror_edk2.git/blob - ArmPlatformPkg/PrePeiCore/PrePeiCore.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / ArmPlatformPkg / PrePeiCore / PrePeiCore.h
1 /** @file
2 Main file supporting the transition to PEI Core in Normal World for Versatile Express
3
4 Copyright (c) 2011 - 2022, ARM Limited. All rights reserved.
5
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #ifndef __PREPEICORE_H_
11 #define __PREPEICORE_H_
12
13 #include <Library/ArmLib.h>
14 #include <Library/ArmPlatformLib.h>
15 #include <Library/BaseMemoryLib.h>
16 #include <Library/DebugLib.h>
17 #include <Library/IoLib.h>
18 #include <Library/PcdLib.h>
19
20 #include <PiPei.h>
21 #include <Ppi/TemporaryRamSupport.h>
22
23 VOID
24 CreatePpiList (
25 OUT UINTN *PpiListSize,
26 OUT EFI_PEI_PPI_DESCRIPTOR **PpiList
27 );
28
29 EFI_STATUS
30 EFIAPI
31 PrePeiCoreTemporaryRamSupport (
32 IN CONST EFI_PEI_SERVICES **PeiServices,
33 IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase,
34 IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase,
35 IN UINTN CopySize
36 );
37
38 VOID
39 SecSwitchStack (
40 INTN StackDelta
41 );
42
43 // Vector Table for Pei Phase
44 VOID
45 PeiVectorTable (
46 VOID
47 );
48
49 VOID
50 EFIAPI
51 PrimaryMain (
52 IN EFI_PEI_CORE_ENTRY_POINT PeiCoreEntryPoint
53 );
54
55 /*
56 * This is the main function for secondary cores. They loop around until a non Null value is written to
57 * SYS_FLAGS register.The SYS_FLAGS register is platform specific.
58 * Note:The secondary cores, while executing secondary_main, assumes that:
59 * : SGI 0 is configured as Non-secure interrupt
60 * : Priority Mask is configured to allow SGI 0
61 * : Interrupt Distributor and CPU interfaces are enabled
62 *
63 */
64 VOID
65 EFIAPI
66 SecondaryMain (
67 IN UINTN MpId
68 );
69
70 VOID
71 PeiCommonExceptionEntry (
72 IN UINT32 Entry,
73 IN UINTN LR
74 );
75
76 /*
77 * Autogenerated function that calls the library constructors for all of the
78 * module's dependent libraries.
79 */
80 VOID
81 EFIAPI
82 ProcessLibraryConstructorList (
83 VOID
84 );
85
86 #endif