ReportStatusCodeHandler.h revision 4fd606d1f5abe38e1f42c38de1d2e895166bd0f4
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs/** @file
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs This PPI provides registering and unregistering services to status code consumers.
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs Copyright (c) 2007 - 2009, Intel Corporation. All rights reserved.<BR>
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs This program and the accompanying materials
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs are licensed and made available under the terms and conditions of the BSD License
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs which accompanies this distribution. The full text of the license may be found at
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs http://opensource.org/licenses/bsd-license.php
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs**/
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs#ifndef __REPORT_STATUS_CODE_HANDLER_PPI_H__
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs#define __REPORT_STATUS_CODE_HANDLER_PPI_H__
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs#define EFI_PEI_RSC_HANDLER_PPI_GUID \
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs { \
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs 0x65d394, 0x9951, 0x4144, {0x82, 0xa3, 0xa, 0xfc, 0x85, 0x79, 0xc2, 0x51} \
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs }
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbstypedef
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. GibbsEFI_STATUS
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs(EFIAPI *EFI_PEI_RSC_HANDLER_CALLBACK)(
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs IN CONST EFI_PEI_SERVICES **PeiServices,
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs IN EFI_STATUS_CODE_TYPE Type,
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs IN EFI_STATUS_CODE_VALUE Value,
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs IN UINT32 Instance,
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs IN CONST EFI_GUID *CallerId,
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs IN CONST EFI_STATUS_CODE_DATA *Data
c1379625401dfbe1c39b79136dd384a571d47fdeJustin T. Gibbs);
/**
Register the callback function for ReportStatusCode() notification.
When this function is called the function pointer is added to an internal list and any future calls to
ReportStatusCode() will be forwarded to the Callback function.
@param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is called
when a call to ReportStatusCode() occurs.
@retval EFI_SUCCESS Function was successfully registered.
@retval EFI_INVALID_PARAMETER The callback function was NULL.
@retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be
registered.
@retval EFI_ALREADY_STARTED The function was already registered. It can't be registered again.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_RSC_HANDLER_REGISTER)(
IN EFI_PEI_RSC_HANDLER_CALLBACK Callback
);
/**
Remove a previously registered callback function from the notification list.
ReportStatusCode() messages will no longer be forwarded to the Callback function.
@param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is to be
unregistered.
@retval EFI_SUCCESS The function was successfully unregistered.
@retval EFI_INVALID_PARAMETER The callback function was NULL.
@retval EFI_NOT_FOUND The callback function was not found to be unregistered.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_RSC_HANDLER_UNREGISTER)(
IN EFI_PEI_RSC_HANDLER_CALLBACK Callback
);
typedef struct _EFI_PEI_RSC_HANDLER_PPI {
EFI_PEI_RSC_HANDLER_REGISTER Register;
EFI_PEI_RSC_HANDLER_UNREGISTER Unregister;
} EFI_PEI_RSC_HANDLER_PPI;
extern EFI_GUID gEfiPeiRscHandlerPpiGuid;
#endif // __REPORT_STATUS_CODE_HANDLER_PPI_H__