1 /** @file
2 
3 Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
4 SPDX-License-Identifier: BSD-2-Clause-Patent
5 
6 **/
7 
8 #ifndef _BOARD_INIT_LIB_H_
9 #define _BOARD_INIT_LIB_H_
10 
11 #include <PiPei.h>
12 #include <Uefi.h>
13 
14 /**
15   This board service detects the board type.
16 
17   @retval EFI_SUCCESS   The board was detected successfully.
18   @retval EFI_NOT_FOUND The board could not be detected.
19 **/
20 EFI_STATUS
21 EFIAPI
22 BoardDetect (
23   VOID
24   );
25 
26 /**
27   This board service initializes board-specific debug devices.
28 
29   @retval EFI_SUCCESS   Board-specific debug initialization was successful.
30   @retval EFI_NOT_READY The board has not been detected yet.
31 **/
32 EFI_STATUS
33 EFIAPI
34 BoardDebugInit (
35   VOID
36   );
37 
38 /**
39   This board service detects the boot mode.
40 
41   @retval EFI_BOOT_MODE The boot mode.
42   @retval EFI_NOT_READY The board has not been detected yet.
43 **/
44 EFI_BOOT_MODE
45 EFIAPI
46 BoardBootModeDetect (
47   VOID
48   );
49 
50 /**
51   A hook for board-specific initialization prior to memory initialization.
52 
53   @retval EFI_SUCCESS   The board initialization was successful.
54   @retval EFI_NOT_READY The board has not been detected yet.
55 **/
56 EFI_STATUS
57 EFIAPI
58 BoardInitBeforeMemoryInit (
59   VOID
60   );
61 
62 /**
63   A hook for board-specific initialization after memory initialization.
64 
65   @retval EFI_SUCCESS   The board initialization was successful.
66   @retval EFI_NOT_READY The board has not been detected yet.
67 **/
68 EFI_STATUS
69 EFIAPI
70 BoardInitAfterMemoryInit (
71   VOID
72   );
73 
74 /**
75   A hook for board-specific initialization prior to disabling temporary RAM.
76 
77   @retval EFI_SUCCESS   The board initialization was successful.
78   @retval EFI_NOT_READY The board has not been detected yet.
79 **/
80 EFI_STATUS
81 EFIAPI
82 BoardInitBeforeTempRamExit (
83   VOID
84   );
85 
86 /**
87   A hook for board-specific initialization after disabling temporary RAM.
88 
89   @retval EFI_SUCCESS   The board initialization was successful.
90   @retval EFI_NOT_READY The board has not been detected yet.
91 **/
92 EFI_STATUS
93 EFIAPI
94 BoardInitAfterTempRamExit (
95   VOID
96   );
97 
98 /**
99   A hook for board-specific initialization prior to silicon initialization.
100 
101   @retval EFI_SUCCESS   The board initialization was successful.
102   @retval EFI_NOT_READY The board has not been detected yet.
103 **/
104 EFI_STATUS
105 EFIAPI
106 BoardInitBeforeSiliconInit (
107   VOID
108   );
109 
110 /**
111   A hook for board-specific initialization after silicon initialization.
112 
113   @retval EFI_SUCCESS   The board initialization was successful.
114   @retval EFI_NOT_READY The board has not been detected yet.
115 **/
116 EFI_STATUS
117 EFIAPI
118 BoardInitAfterSiliconInit (
119   VOID
120   );
121 
122 /**
123   A hook for board-specific initialization after PCI enumeration.
124 
125   @retval EFI_SUCCESS   The board initialization was successful.
126   @retval EFI_NOT_READY The board has not been detected yet.
127 **/
128 EFI_STATUS
129 EFIAPI
130 BoardInitAfterPciEnumeration (
131   VOID
132   );
133 
134 /**
135   A hook for board-specific functionality for the ReadyToBoot event.
136 
137   @retval EFI_SUCCESS   The board initialization was successful.
138   @retval EFI_NOT_READY The board has not been detected yet.
139 **/
140 EFI_STATUS
141 EFIAPI
142 BoardInitReadyToBoot (
143   VOID
144   );
145 
146 /**
147   A hook for board-specific functionality for the ExitBootServices event.
148 
149   @retval EFI_SUCCESS   The board initialization was successful.
150   @retval EFI_NOT_READY The board has not been detected yet.
151 **/
152 EFI_STATUS
153 EFIAPI
154 BoardInitEndOfFirmware (
155   VOID
156   );
157 
158 #endif
159