]> git.proxmox.com Git - mirror_edk2.git/blob - StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/X64/StandaloneMmCoreEntryPoint.c
StandaloneMmPkg: Apply uncrustify changes
[mirror_edk2.git] / StandaloneMmPkg / Library / StandaloneMmCoreEntryPoint / X64 / StandaloneMmCoreEntryPoint.c
1 /** @file
2 Entry point to the Standalone Mm Core.
3
4 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
5 Copyright (c) Microsoft Corporation.
6 SPDX-License-Identifier: BSD-2-Clause-Patent
7
8 **/
9
10 #include <PiMm.h>
11
12 #include <Library/StandaloneMmCoreEntryPoint.h>
13 #include <Library/DebugLib.h>
14 #include <Library/BaseLib.h>
15
16 //
17 // Cache copy of HobList pointer.
18 //
19 VOID *gHobList = NULL;
20
21 /**
22 The entry point of PE/COFF Image for the STANDALONE MM Core.
23
24 This function is the entry point for the STANDALONE MM Core. This function is required to call
25 ProcessModuleEntryPointList() and ProcessModuleEntryPointList() is never expected to return.
26 The STANDALONE MM Core is responsible for calling ProcessLibraryConstructorList() as soon as the EFI
27 System Table and the image handle for the STANDALONE MM Core itself have been established.
28 If ProcessModuleEntryPointList() returns, then ASSERT() and halt the system.
29
30 @param HobStart Pointer to the beginning of the HOB List passed in from the PEI Phase.
31
32 **/
33 VOID
34 EFIAPI
35 _ModuleEntryPoint (
36 IN VOID *HobStart
37 )
38 {
39 //
40 // Cache a pointer to the HobList
41 //
42 gHobList = HobStart;
43
44 //
45 // Call the Standalone MM Core entry point
46 //
47 ProcessModuleEntryPointList (HobStart);
48
49 //
50 // TODO: Set page table here?? AARCH64 has this step for some reason
51 //
52 }
53
54 /**
55 Required by the EBC compiler and identical in functionality to _ModuleEntryPoint().
56
57 This function is required to call _ModuleEntryPoint() passing in HobStart.
58
59 @param HobStart Pointer to the beginning of the HOB List passed in from the PEI Phase.
60
61 **/
62 VOID
63 EFIAPI
64 EfiMain (
65 IN VOID *HobStart
66 )
67 {
68 _ModuleEntryPoint (HobStart);
69 }