]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.h
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Universal / StatusCodeHandler / RuntimeDxe / StatusCodeHandlerRuntimeDxe.h
CommitLineData
3af9b388 1/** @file\r
2 Internal include file for Status Code Handler Driver.\r
3\r
e5eed7d3
HT
4 Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
3af9b388 6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
13**/\r
14\r
15#ifndef __STATUS_CODE_HANDLER_RUNTIME_DXE_H__\r
16#define __STATUS_CODE_HANDLER_RUNTIME_DXE_H__\r
17\r
18#include <Protocol/ReportStatusCodeHandler.h>\r
19\r
20#include <Guid/MemoryStatusCodeRecord.h>\r
21#include <Guid/StatusCodeDataTypeId.h>\r
22#include <Guid/StatusCodeDataTypeDebug.h>\r
23#include <Guid/EventGroup.h>\r
24\r
25#include <Library/SynchronizationLib.h>\r
26#include <Library/DebugLib.h>\r
27#include <Library/ReportStatusCodeLib.h>\r
28#include <Library/PrintLib.h>\r
29#include <Library/PcdLib.h>\r
30#include <Library/HobLib.h>\r
31#include <Library/UefiDriverEntryPoint.h>\r
32#include <Library/UefiBootServicesTableLib.h>\r
33#include <Library/MemoryAllocationLib.h>\r
34#include <Library/UefiRuntimeLib.h>\r
35#include <Library/SerialPortLib.h>\r
36\r
37//\r
38// Runtime memory status code worker definition\r
39//\r
40typedef struct {\r
41 UINT32 RecordIndex;\r
42 UINT32 NumberOfRecords;\r
43 UINT32 MaxRecordsNumber;\r
44} RUNTIME_MEMORY_STATUSCODE_HEADER;\r
45\r
46extern RUNTIME_MEMORY_STATUSCODE_HEADER *mRtMemoryStatusCodeTable;\r
47\r
48/**\r
49 Locates Serial I/O Protocol as initialization for serial status code worker.\r
50 \r
51 @retval EFI_SUCCESS Serial I/O Protocol is successfully located.\r
52\r
53**/\r
54EFI_STATUS\r
55EfiSerialStatusCodeInitializeWorker (\r
56 VOID\r
57 );\r
58\r
59\r
60/**\r
61 Convert status code value and extended data to readable ASCII string, send string to serial I/O device.\r
62 \r
63 @param CodeType Indicates the type of status code being reported.\r
64 @param Value Describes the current status of a hardware or software entity.\r
65 This included information about the class and subclass that is used to\r
66 classify the entity as well as an operation.\r
67 @param Instance The enumeration of a hardware or software entity within\r
68 the system. Valid instance numbers start with 1.\r
69 @param CallerId This optional parameter may be used to identify the caller.\r
70 This parameter allows the status code driver to apply different rules to\r
71 different callers.\r
72 @param Data This optional parameter may be used to pass additional data.\r
73\r
74 @retval EFI_SUCCESS Status code reported to serial I/O successfully.\r
75 @retval EFI_DEVICE_ERROR EFI serial device cannot work after ExitBootService() is called.\r
76 @retval EFI_DEVICE_ERROR EFI serial device cannot work with TPL higher than TPL_CALLBACK.\r
77\r
78**/\r
79EFI_STATUS\r
e798cd87 80EFIAPI\r
3af9b388 81SerialStatusCodeReportWorker (\r
82 IN EFI_STATUS_CODE_TYPE CodeType,\r
83 IN EFI_STATUS_CODE_VALUE Value,\r
84 IN UINT32 Instance,\r
85 IN EFI_GUID *CallerId,\r
86 IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r
87 );\r
88\r
89/**\r
90 Initialize runtime memory status code table as initialization for runtime memory status code worker\r
91 \r
92 @retval EFI_SUCCESS Runtime memory status code table successfully initialized.\r
93\r
94**/\r
95EFI_STATUS\r
96RtMemoryStatusCodeInitializeWorker (\r
97 VOID\r
98 );\r
99\r
100/**\r
101 Report status code into runtime memory. If the runtime pool is full, roll back to the \r
102 first record and overwrite it.\r
103 \r
104 @param CodeType Indicates the type of status code being reported.\r
105 @param Value Describes the current status of a hardware or software entity.\r
106 This included information about the class and subclass that is used to\r
107 classify the entity as well as an operation.\r
108 @param Instance The enumeration of a hardware or software entity within\r
109 the system. Valid instance numbers start with 1.\r
110 @param CallerId This optional parameter may be used to identify the caller.\r
111 This parameter allows the status code driver to apply different rules to\r
112 different callers.\r
113 @param Data This optional parameter may be used to pass additional data.\r
114 \r
115 @retval EFI_SUCCESS Status code successfully recorded in runtime memory status code table.\r
116\r
117**/\r
118EFI_STATUS\r
e798cd87 119EFIAPI\r
3af9b388 120RtMemoryStatusCodeReportWorker (\r
121 IN EFI_STATUS_CODE_TYPE CodeType,\r
122 IN EFI_STATUS_CODE_VALUE Value,\r
123 IN UINT32 Instance,\r
124 IN EFI_GUID *CallerId,\r
125 IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r
126 );\r
127\r
128#endif\r