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