2 Pei Core Status Code Support
4 Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
19 Core version of the Status Code reporter
22 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
23 @param CodeType Type of Status Code.
24 @param Value Value to output for Status Code.
25 @param Instance Instance Number of this status code.
26 @param CallerId ID of the caller of this status code.
27 @param Data Optional data associated with this status code.
29 @retval EFI_SUCCESS if status code is successfully reported
30 @retval EFI_NOT_AVAILABLE_YET if StatusCodePpi has not been installed
36 IN CONST EFI_PEI_SERVICES
**PeiServices
,
37 IN EFI_STATUS_CODE_TYPE CodeType
,
38 IN EFI_STATUS_CODE_VALUE Value
,
40 IN CONST EFI_GUID
*CallerId
,
41 IN CONST EFI_STATUS_CODE_DATA
*Data OPTIONAL
45 EFI_PEI_PROGRESS_CODE_PPI
*StatusCodePpi
;
48 // Locate StatusCode Ppi.
50 Status
= PeiServicesLocatePpi (
51 &gEfiPeiStatusCodePpiGuid
,
54 (VOID
**)&StatusCodePpi
57 if (!EFI_ERROR (Status
)) {
58 Status
= StatusCodePpi
->ReportStatusCode (
70 return EFI_NOT_AVAILABLE_YET
;