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