]> git.proxmox.com Git - mirror_edk2.git/blob - Pei/PeiStatusCode.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / Pei / PeiStatusCode.h
1
2 /** @file
3 Heade file of status code PEIM
4
5 Copyright (c) 2006, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 Module Name: PeiStatusCode.h
15
16 **/
17
18 #ifndef __PEI_STATUS_CODE_H__
19 #define __PEI_STATUS_CODE_H__
20
21
22 //
23 // Include common header file for this module.
24 //
25 #include "CommonHeader.h"
26
27 /**
28 Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
29
30 @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
31
32 @param Value Describes the current status of a hardware or software entity.
33 This included information about the class and subclass that is used to classify the entity
34 as well as an operation. For progress codes, the operation is the current activity.
35 For error codes, it is the exception. For debug codes, it is not defined at this time.
36 Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.
37 Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
38
39 @param Instance The enumeration of a hardware or software entity within the system.
40 A system may contain multiple entities that match a class/subclass pairing.
41 The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
42 not meaningful, or not relevant. Valid instance numbers start with 1.
43
44
45 @param CallerId This optional parameter may be used to identify the caller.
46 This parameter allows the status code driver to apply different rules to different callers.
47 Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification.
48
49
50 @param Data This optional parameter may be used to pass additional data
51
52 @return The function always return EFI_SUCCESS.
53
54 **/
55 EFI_STATUS
56 SerialStatusCodeReportWorker (
57 IN EFI_STATUS_CODE_TYPE CodeType,
58 IN EFI_STATUS_CODE_VALUE Value,
59 IN UINT32 Instance,
60 IN EFI_GUID *CallerId,
61 IN EFI_STATUS_CODE_DATA *Data OPTIONAL
62 );
63
64
65 /**
66 Initialize memory status code.
67 Create one GUID'ed HOB with PCD defined size. If create required size
68 GUID'ed HOB failed, then ASSERT().
69
70 @return The function always return EFI_SUCCESS
71
72 **/
73 EFI_STATUS
74 MemoryStatusCodeInitializeWorker (
75 VOID
76 );
77
78 /**
79 Report status code into GUID'ed HOB.
80
81 @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
82
83 @param Value Describes the current status of a hardware or software entity.
84 This included information about the class and subclass that is used to classify the entity
85 as well as an operation. For progress codes, the operation is the current activity.
86 For error codes, it is the exception. For debug codes, it is not defined at this time.
87 Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.
88 Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
89
90 @param Instance The enumeration of a hardware or software entity within the system.
91 A system may contain multiple entities that match a class/subclass pairing.
92 The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
93 not meaningful, or not relevant. Valid instance numbers start with 1.
94
95 @return The function always return EFI_SUCCESS.
96
97 **/
98 EFI_STATUS
99 MemoryStatusCodeReportWorker (
100 IN EFI_STATUS_CODE_TYPE CodeType,
101 IN EFI_STATUS_CODE_VALUE Value,
102 IN UINT32 Instance
103 );
104
105 /**
106 Report status code to all supported device.
107
108
109 @param PeiServices
110
111 @param Type Indicates the type of status code being reported.
112 The type EFI_STATUS_CODE_TYPE is defined in "Related Definitions" below.
113 @param Value Describes the current status of a hardware or software entity.
114 This includes information about the class and subclass that is used to classify the entity
115 as well as an operation. For progress codes, the operation is the current activity.
116 For error codes, it is the exception. For debug codes, it is not defined at this time.
117 Type EFI_STATUS_CODE_VALUE is defined in "Related Definitions" below.
118 Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
119 @param Instance The enumeration of a hardware or software entity within the system.
120 A system may contain multiple entities that match a class/subclass pairing.
121 The instance differentiates between them. An instance of 0 indicates that instance
122 information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1.
123 @param CallerId This optional parameter may be used to identify the caller.
124 This parameter allows the status code driver to apply different rules to different callers.
125 @param Data This optional parameter may be used to pass additional data.
126 Type EFI_STATUS_CODE_DATA is defined in "Related Definitions" below.
127 The contents of this data type may have additional GUID-specific data. The standard GUIDs and
128 their associated data structures are defined in the Intel? Platform Innovation Framework for EFI Status Codes Specification.
129
130 @return Always return EFI_SUCCESS.
131
132 **/
133 EFI_STATUS
134 EFIAPI
135 ReportDispatcher (
136 IN EFI_PEI_SERVICES **PeiServices,
137 IN EFI_STATUS_CODE_TYPE Type,
138 IN EFI_STATUS_CODE_VALUE Value,
139 IN UINT32 Instance,
140 IN EFI_GUID *CallerId OPTIONAL,
141 IN EFI_STATUS_CODE_DATA *Data OPTIONAL
142 );
143
144 #endif