]>
Commit | Line | Data |
---|---|---|
3cbfba02 DW |
1 | /*++\r |
2 | \r | |
3 | Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.<BR>\r | |
4 | \r\r | |
5 | This program and the accompanying materials are licensed and made available under\r\r | |
6 | the terms and conditions of the BSD License that accompanies this distribution. \r\r | |
7 | The full text of the license may be found at \r\r | |
8 | http://opensource.org/licenses/bsd-license.php. \r\r | |
9 | \r\r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r\r | |
12 | \r\r | |
13 | \r | |
14 | Module Name:\r | |
15 | \r | |
16 | MonoStatusCode.h\r | |
17 | \r | |
18 | Abstract:\r | |
19 | \r | |
20 | Monolithic single PEIM to provide the status code functionality.\r | |
21 | The PEIM is a blend of libraries that correspond to the different status code\r | |
22 | listeners that a platform installs.\r | |
23 | \r | |
24 | --*/\r | |
25 | \r | |
26 | #ifndef _MONO_STATUS_CODE_H_\r | |
27 | #define _MONO_STATUS_CODE_H_\r | |
28 | \r | |
29 | //\r | |
30 | // Statements that include other files.\r | |
31 | //\r | |
32 | #include "PiPei.h"\r | |
33 | \r | |
34 | #include "Pi/PiBootMode.h"\r | |
35 | \r | |
36 | #include "Ppi/StatusCode.h"\r | |
37 | #include "Ppi/MemoryDiscovered.h"\r | |
38 | #include "Ppi/FvLoadFile.h"\r | |
39 | \r | |
40 | #include "Library/HobLib.h"\r | |
41 | #include "Library/DebugLib.h"\r | |
42 | #include "Library/IoLib.h"\r | |
43 | #include "Library/SerialPortLib.h"\r | |
44 | #include "Protocol/StatusCode.h"\r | |
45 | \r | |
46 | \r | |
47 | #ifndef _STATUS_CODE_ENABLER_H_\r | |
48 | #define _STATUS_CODE_ENABLER_H_\r | |
49 | \r | |
50 | #ifdef EFI_DEBUG\r | |
51 | \r | |
52 | #define EFI_STATUS_CODE_ENABLER_HOB_GUID \\r | |
53 | { \\r | |
54 | 0x5ffc6cf3, 0x71ad, 0x46f5, 0xbd, 0x8b, 0x7e, 0x8f, 0xfe, 0x19, 0x7, 0xd7 \\r | |
55 | }\r | |
56 | \r | |
57 | extern EFI_GUID gEfiSerialStatusCodeEnablerHobGuid;\r | |
58 | \r | |
59 | typedef struct _EFI_STATUS_CODE_INFO {\r | |
60 | BOOLEAN StatusCodeDisable;\r | |
61 | } EFI_STATUS_CODE_INFO;\r | |
62 | \r | |
63 | #endif\r | |
64 | #endif\r | |
65 | \r | |
66 | \r | |
67 | \r | |
68 | //\r | |
69 | // Platform specific function Declarations. These must be implemented in a\r | |
70 | // subdirectory named PlatformName in a file named PlatformStatusCode.c.\r | |
71 | //\r | |
72 | \r | |
73 | //\r | |
74 | // This is the platform function to initialize the listeners desired by the\r | |
75 | // platform.\r | |
76 | //\r | |
77 | VOID\r | |
78 | PlatformInitializeStatusCode (\r | |
79 | IN EFI_FFS_FILE_HEADER *FfsHeader,\r | |
80 | IN CONST EFI_PEI_SERVICES **PeiServices\r | |
81 | );\r | |
82 | \r | |
83 | //\r | |
84 | // This is the platform function that calls all of the listeners desired by the\r | |
85 | // platform.\r | |
86 | //\r | |
87 | EFI_STATUS\r | |
88 | EFIAPI\r | |
89 | PlatformReportStatusCode (\r | |
90 | IN CONST EFI_PEI_SERVICES **PeiServices,\r | |
91 | IN EFI_STATUS_CODE_TYPE CodeType,\r | |
92 | IN EFI_STATUS_CODE_VALUE Value,\r | |
93 | IN UINT32 Instance,\r | |
94 | IN CONST EFI_GUID * CallerId,\r | |
95 | IN CONST EFI_STATUS_CODE_DATA * Data OPTIONAL\r | |
96 | );\r | |
97 | \r | |
98 | //\r | |
99 | // Platform independent function Declarations\r | |
100 | //\r | |
101 | //\r | |
102 | // Initialize the status code listeners and publish the status code PPI.\r | |
103 | //\r | |
104 | VOID\r | |
105 | EFIAPI\r | |
106 | InitializeMonoStatusCode (\r | |
107 | IN EFI_FFS_FILE_HEADER *FfsHeader,\r | |
108 | IN const EFI_PEI_SERVICES **PeiServices\r | |
109 | );\r | |
110 | \r | |
111 | //\r | |
112 | // Convert a DXE status code call into a PEI status code call.\r | |
113 | //\r | |
114 | EFI_STATUS\r | |
115 | EFIAPI\r | |
116 | TranslateDxeStatusCodeToPeiStatusCode (\r | |
117 | IN EFI_STATUS_CODE_TYPE CodeType,\r | |
118 | IN EFI_STATUS_CODE_VALUE Value,\r | |
119 | IN UINT32 Instance,\r | |
120 | IN EFI_GUID * CallerId,\r | |
121 | IN EFI_STATUS_CODE_DATA * Data OPTIONAL\r | |
122 | );\r | |
123 | \r | |
124 | //\r | |
125 | // Publish a HOB that contains the listener to be used by DXE.\r | |
126 | //\r | |
127 | EFI_STATUS\r | |
128 | EFIAPI\r | |
129 | InitializeDxeReportStatusCode (\r | |
130 | IN const EFI_PEI_SERVICES **PeiServices\r | |
131 | );\r | |
132 | \r | |
133 | #endif\r |