summaryrefslogtreecommitdiff
path: root/EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h
diff options
context:
space:
mode:
authoryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-21 14:25:43 +0000
committeryshang1 <yshang1@6f19259b-4bc3-4df7-8a09-765794883524>2006-07-21 14:25:43 +0000
commit56836fe92b0a7284bc2e964065e00ad867145826 (patch)
tree6528bf8403b71144f6c7e33a2b51d305b032b1a8 /EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h
parent3f566587aea64bb986866c7f69a6b82891bf59db (diff)
downloadedk2-platforms-56836fe92b0a7284bc2e964065e00ad867145826.tar.xz
1) Check in Pei/Dxe status code;
2) OemHookStatusCodeLib and SerialPortLib class and null instance; 3) Remove all referenced code from EdkModulePkg,EdkNt32Pkg. 4) Add Nt32OemHookStatusCodeLib. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1067 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h')
-rw-r--r--EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h238
1 files changed, 238 insertions, 0 deletions
diff --git a/EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h b/EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h
new file mode 100644
index 0000000000..eeb6dcb720
--- /dev/null
+++ b/EdkModulePkg/Universal/StatusCode/Dxe/DxeStatusCode.h
@@ -0,0 +1,238 @@
+/*++
+
+Copyright (c) 2006, Intel Corporation. All rights reserved.
+This software and associated documentation (if any) is furnished
+under a license and may only be used or copied in accordance
+with the terms of the license. Except as permitted by such
+license, no part of this software or documentation may be
+reproduced, stored in a retrieval system, or transmitted in any
+form or by any means without the express written consent of
+Intel Corporation.
+
+Module Name:
+
+ DxeStatusCode.h
+
+Abstract:
+
+ Header file of EFI DXE/RT Status Code.
+
+--*/
+
+#ifndef __DXE_STATUS_CODE_H__
+#define __DXE_STATUS_CODE_H__
+
+//
+// Data hub worker definition
+//
+#define MAX_NUMBER_DATAHUB_RECORDS 1000
+#define DATAHUB_BYTES_PER_RECORD EFI_STATUS_CODE_DATA_MAX_SIZE
+#define EMPTY_RECORD_TAG 0xFF
+#define DATAHUB_STATUS_CODE_SIGNATURE EFI_SIGNATURE_32 ('B', 'D', 'H', 'S')
+
+//
+// Address type of pointer.
+// The point type always equal to PHYSICAL_MODE on IA32/X64/EBC architecture
+// Otherwise, VIRTUAL_MODE/PHYSICAL_MODE would be used on Ipf architecture,
+//
+enum {
+ PHYSICAL_MODE,
+ VIRTUAL_MODE
+};
+
+typedef struct {
+ UINTN Signature;
+ LIST_ENTRY Node;
+ EFI_STATUS_CODE_TYPE CodeType;
+ EFI_STATUS_CODE_VALUE Value;
+ UINT32 Instance;
+ EFI_GUID CallerId;
+ EFI_STATUS_CODE_DATA Data;
+ UINT8 ExtendData[EFI_STATUS_CODE_DATA_MAX_SIZE];
+} DATAHUB_STATUSCODE_RECORD;
+
+
+//
+// Runtime memory status code worker definition
+//
+typedef struct {
+ UINT32 RecordIndex;
+ UINT32 NumberOfRecords;
+ UINT32 MaxRecordsNumber;
+} RUNTIME_MEMORY_STATUSCODE_HEADER;
+
+
+typedef struct {
+ //
+ // Report operation nest status.
+ // If it is set, then the report operation has nested.
+ //
+ UINT32 StatusCodeNestStatus;
+ //
+ // Runtime status code management header, the records buffer is following it.
+ //
+ RUNTIME_MEMORY_STATUSCODE_HEADER *RtMemoryStatusCodeTable[2];
+} DXE_STATUS_CODE_CONTROLLER;
+
+
+/**
+
+ Dispatch initialization request to sub status code devices based on
+ customized feature flags.
+
+**/
+VOID
+InitializationDispatcherWorker (
+ VOID
+ );
+
+
+/**
+ Initialize serial status code worker.
+
+ @return The function always return EFI_SUCCESS
+
+**/
+EFI_STATUS
+EfiSerialStatusCodeInitializeWorker (
+ VOID
+ );
+
+
+/**
+ Convert status code value and extended data to readable ASCII string, send string to serial I/O device.
+
+ @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions�� below.
+
+ @param Value Describes the current status of a hardware or software entity.
+ This included information about the class and subclass that is used to classify the entity
+ as well as an operation. For progress codes, the operation is the current activity.
+ For error codes, it is the exception. For debug codes, it is not defined at this time.
+ Type EFI_STATUS_CODE_VALUE is defined in ��Related Definitions�� below.
+ Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
+
+ @param Instance The enumeration of a hardware or software entity within the system.
+ A system may contain multiple entities that match a class/subclass pairing.
+ The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
+ not meaningful, or not relevant. Valid instance numbers start with 1.
+
+
+ @param CallerId This optional parameter may be used to identify the caller.
+ This parameter allows the status code driver to apply different rules to different callers.
+ Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification.
+
+
+ @param Data This optional parameter may be used to pass additional data
+
+ @return The function always return EFI_SUCCESS.
+
+**/
+EFI_STATUS
+SerialStatusCodeReportWorker (
+ IN EFI_STATUS_CODE_TYPE CodeType,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance,
+ IN EFI_GUID *CallerId,
+ IN EFI_STATUS_CODE_DATA *Data OPTIONAL
+ );
+
+/**
+ Initialize runtime memory status code.
+
+ @return The function always return EFI_SUCCESS
+
+**/
+EFI_STATUS
+RtMemoryStatusCodeInitializeWorker (
+ VOID
+ );
+
+/**
+ Report status code into runtime memory. If the runtime pool is full, roll back to the
+ first record and overwrite it.
+
+ @param RtMemoryStatusCodeTable
+ Point to Runtime memory table header.
+
+ @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions�� below.
+
+ @param Value Describes the current status of a hardware or software entity.
+ This included information about the class and subclass that is used to classify the entity
+ as well as an operation. For progress codes, the operation is the current activity.
+ For error codes, it is the exception. For debug codes, it is not defined at this time.
+ Type EFI_STATUS_CODE_VALUE is defined in ��Related Definitions�� below.
+ Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
+
+ @param Instance The enumeration of a hardware or software entity within the system.
+ A system may contain multiple entities that match a class/subclass pairing.
+ The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
+ not meaningful, or not relevant. Valid instance numbers start with 1.
+
+ @return The function always return EFI_SUCCESS.
+
+**/
+EFI_STATUS
+RtMemoryStatusCodeReportWorker (
+ RUNTIME_MEMORY_STATUSCODE_HEADER *RtMemoryStatusCodeTable,
+ IN EFI_STATUS_CODE_TYPE CodeType,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance
+ );
+
+/**
+ Initialize data hubstatus code.
+ Create a data hub listener.
+
+ @return The function always return EFI_SUCCESS
+
+**/
+EFI_STATUS
+DataHubStatusCodeInitializeWorker (
+ VOID
+ );
+
+
+/**
+ Report status code into DataHub.
+
+ @param CodeType Indicates the type of status code being reported. Type EFI_STATUS_CODE_TYPE is defined in "Related Definitions�� below.
+
+ @param Value Describes the current status of a hardware or software entity.
+ This included information about the class and subclass that is used to classify the entity
+ as well as an operation. For progress codes, the operation is the current activity.
+ For error codes, it is the exception. For debug codes, it is not defined at this time.
+ Type EFI_STATUS_CODE_VALUE is defined in ��Related Definitions�� below.
+ Specific values are discussed in the Intel? Platform Innovation Framework for EFI Status Code Specification.
+
+ @param Instance The enumeration of a hardware or software entity within the system.
+ A system may contain multiple entities that match a class/subclass pairing.
+ The instance differentiates between them. An instance of 0 indicates that instance information is unavailable,
+ not meaningful, or not relevant. Valid instance numbers start with 1.
+
+
+ @param CallerId This optional parameter may be used to identify the caller.
+ This parameter allows the status code driver to apply different rules to different callers.
+ Type EFI_GUID is defined in InstallProtocolInterface() in the EFI 1.10 Specification.
+
+
+ @param Data This optional parameter may be used to pass additional data
+
+ @retval EFI_OUT_OF_RESOURCES Can not acquire record buffer.
+ @retval EFI_SUCCESS Success to cache status code and signal log data event.
+
+**/
+EFI_STATUS
+DataHubStatusCodeReportWorker (
+ IN EFI_STATUS_CODE_TYPE CodeType,
+ IN EFI_STATUS_CODE_VALUE Value,
+ IN UINT32 Instance,
+ IN EFI_GUID *CallerId,
+ IN EFI_STATUS_CODE_DATA *Data OPTIONAL
+ );
+
+//
+// declaration of DXE status code controller.
+//
+extern DXE_STATUS_CODE_CONTROLLER gDxeStatusCode;
+
+#endif