]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/Pei/StatusCode/StatusCode.c
Fix function comment to follows doxygen format.
[mirror_edk2.git] / MdeModulePkg / Core / Pei / StatusCode / StatusCode.c
1 /** @file
2 Pei Core Status Code Support
3
4 Copyright (c) 2006, Intel Corporation
5 All rights reserved. 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
9
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.
12
13 **/
14
15 #include <PeiMain.h>
16
17 /**
18
19 Core version of the Status Code reporter
20
21
22 @param PeiServices The PEI core services table.
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.
28
29 @retval EFI_SUCCESS if status code is successfully reported
30 @retval EFI_NOT_AVAILABLE_YET if StatusCodePpi has not been installed
31
32 **/
33 EFI_STATUS
34 EFIAPI
35 PeiReportStatusCode (
36 IN CONST EFI_PEI_SERVICES **PeiServices,
37 IN EFI_STATUS_CODE_TYPE CodeType,
38 IN EFI_STATUS_CODE_VALUE Value,
39 IN UINT32 Instance,
40 IN CONST EFI_GUID *CallerId,
41 IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL
42 )
43 {
44 EFI_STATUS Status;
45 EFI_PEI_PROGRESS_CODE_PPI *StatusCodePpi;
46
47
48 //
49 //Locate StatusCode Ppi.
50 //
51 Status = PeiServicesLocatePpi (
52 &gEfiPeiStatusCodePpiGuid,
53 0,
54 NULL,
55 (VOID **)&StatusCodePpi
56 );
57
58 if (!EFI_ERROR (Status)) {
59 Status = StatusCodePpi->ReportStatusCode (
60 PeiServices,
61 CodeType,
62 Value,
63 Instance,
64 CallerId,
65 Data
66 );
67
68 return Status;
69 }
70
71 return EFI_NOT_AVAILABLE_YET;
72 }
73
74
75