2008-01-21 09:25:17 +01:00
|
|
|
/** @file
|
|
|
|
Internal Header file of Report Status Code Library for RUNTIME
|
|
|
|
DXE Phase.
|
|
|
|
|
2009-06-19 07:29:50 +02:00
|
|
|
Copyright (c) 2006 - 2009, Intel Corporation<BR>
|
2008-01-21 09:25:17 +01:00
|
|
|
All rights reserved. This program and the accompanying materials
|
|
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
|
|
|
|
**/
|
2009-06-19 07:29:50 +02:00
|
|
|
#ifndef __REPORT_STATUS_CODE_LIB_INTERNAL__H__
|
|
|
|
#define __REPORT_STATUS_CODE_LIB_INTERNAL__H__
|
2008-01-21 09:25:17 +01:00
|
|
|
|
|
|
|
#include <FrameworkDxe.h>
|
|
|
|
|
|
|
|
#include <Library/ReportStatusCodeLib.h>
|
|
|
|
#include <Library/DebugLib.h>
|
|
|
|
#include <Library/BaseLib.h>
|
|
|
|
#include <Library/BaseMemoryLib.h>
|
|
|
|
#include <Library/PcdLib.h>
|
|
|
|
#include <Library/UefiRuntimeServicesTableLib.h>
|
2008-09-22 12:20:41 +02:00
|
|
|
#include <Library/UefiBootServicesTableLib.h>
|
2008-11-11 16:43:50 +01:00
|
|
|
#include <Library/DevicePathLib.h>
|
2009-06-19 07:29:50 +02:00
|
|
|
#include <Library/OemHookStatusCodeLib.h>
|
|
|
|
#include <Library/MemoryAllocationLib.h>
|
2008-01-21 09:25:17 +01:00
|
|
|
|
|
|
|
#include <Guid/StatusCodeDataTypeId.h>
|
2009-06-01 23:17:41 +02:00
|
|
|
#include <Guid/StatusCodeDataTypeDebug.h>
|
2009-02-04 02:29:55 +01:00
|
|
|
#include <Guid/EventGroup.h>
|
2009-06-19 07:29:50 +02:00
|
|
|
|
2008-01-21 09:25:17 +01:00
|
|
|
#include <Protocol/StatusCode.h>
|
2009-06-19 07:29:50 +02:00
|
|
|
#include <Protocol/SmmBase.h>
|
|
|
|
|
2008-01-21 09:25:17 +01:00
|
|
|
|
2009-06-19 07:29:50 +02:00
|
|
|
extern EFI_STATUS_CODE_DATA *mStatusCodeData;
|
2009-04-24 09:30:54 +02:00
|
|
|
|
2008-01-21 09:25:17 +01:00
|
|
|
/**
|
2009-06-19 07:29:50 +02:00
|
|
|
Locate the report status code service.
|
|
|
|
|
|
|
|
In SMM, it retrieves OemHookStatusCodeReport() from customized OEM Hook Status Code Lib.
|
|
|
|
Otherwise, it first tries to retrieve ReportStatusCode() in Runtime Services Table.
|
|
|
|
If not found, it then tries to retrieve ReportStatusCode() API of Report Status Code Protocol.
|
|
|
|
|
|
|
|
@return Function pointer to the report status code service.
|
|
|
|
NULL is returned if no status code service is available.
|
2008-01-21 09:25:17 +01:00
|
|
|
|
|
|
|
**/
|
|
|
|
EFI_REPORT_STATUS_CODE
|
|
|
|
InternalGetReportStatusCode (
|
|
|
|
VOID
|
|
|
|
);
|
|
|
|
|
|
|
|
/**
|
2009-06-19 07:29:50 +02:00
|
|
|
Internal worker function that reports a status code through the status code service.
|
2008-01-21 09:25:17 +01:00
|
|
|
|
2009-06-19 07:29:50 +02:00
|
|
|
If status code service is not cached, then this function checks if status code service is
|
|
|
|
available in system. If status code service is not available, then EFI_UNSUPPORTED is
|
|
|
|
returned. If status code service is present, then it is cached in mReportStatusCode.
|
|
|
|
Finally this function reports status code through the status code service.
|
2008-01-21 09:25:17 +01:00
|
|
|
|
|
|
|
@param Type Status code type.
|
|
|
|
@param Value Status code value.
|
|
|
|
@param Instance Status code instance number.
|
|
|
|
@param CallerId Pointer to a GUID that identifies the caller of this
|
|
|
|
function. This is an optional parameter that may be
|
|
|
|
NULL.
|
|
|
|
@param Data Pointer to the extended data buffer. This is an
|
|
|
|
optional parameter that may be NULL.
|
|
|
|
|
2009-06-19 07:29:50 +02:00
|
|
|
@retval EFI_SUCCESS The status code was reported.
|
|
|
|
@retval EFI_UNSUPPORTED Status code service is not available.
|
|
|
|
@retval EFI_UNSUPPORTED Status code type is not supported.
|
2008-01-21 09:25:17 +01:00
|
|
|
|
|
|
|
**/
|
|
|
|
EFI_STATUS
|
|
|
|
InternalReportStatusCode (
|
|
|
|
IN EFI_STATUS_CODE_TYPE Type,
|
|
|
|
IN EFI_STATUS_CODE_VALUE Value,
|
|
|
|
IN UINT32 Instance,
|
|
|
|
IN CONST EFI_GUID *CallerId OPTIONAL,
|
|
|
|
IN EFI_STATUS_CODE_DATA *Data OPTIONAL
|
|
|
|
);
|
|
|
|
|
2009-06-19 07:29:50 +02:00
|
|
|
#endif
|
2008-01-21 09:25:17 +01:00
|
|
|
|