]> git.proxmox.com Git - mirror_edk2.git/blame - MdeModulePkg/Core/Pei/StatusCode/StatusCode.c
Enable Nt32 platform boot to DXE phase.
[mirror_edk2.git] / MdeModulePkg / Core / Pei / StatusCode / StatusCode.c
CommitLineData
192f6d4c 1/*++\r
2\r
3Copyright (c) 2006, Intel Corporation \r
4All rights reserved. This program and the accompanying materials \r
5are licensed and made available under the terms and conditions of the BSD License \r
6which accompanies this distribution. The full text of the license may be found at \r
7http://opensource.org/licenses/bsd-license.php \r
8 \r
9THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, \r
10WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. \r
11\r
12Module Name:\r
13\r
14 StatusCode.c\r
15\r
16Abstract:\r
17\r
18 Pei Core Status Code Support\r
19\r
20Revision History\r
21\r
22--*/\r
23\r
24//\r
25// Include common header file for this module.\r
26//\r
27#include "CommonHeader.h"\r
28\r
29#include <PeiMain.h>\r
30\r
31EFI_STATUS\r
32EFIAPI\r
33PeiReportStatusCode (\r
34 IN EFI_PEI_SERVICES **PeiServices,\r
35 IN EFI_STATUS_CODE_TYPE CodeType,\r
36 IN EFI_STATUS_CODE_VALUE Value, \r
37 IN UINT32 Instance,\r
38 IN EFI_GUID *CallerId,\r
39 IN EFI_STATUS_CODE_DATA *Data OPTIONAL\r
40 )\r
41/*++\r
42\r
43Routine Description:\r
44\r
45 Core version of the Status Code reporter\r
46\r
47Arguments:\r
48\r
49 PeiServices - The PEI core services table.\r
50 \r
51 CodeType - Type of Status Code.\r
52 \r
53 Value - Value to output for Status Code.\r
54 \r
55 Instance - Instance Number of this status code.\r
56 \r
57 CallerId - ID of the caller of this status code.\r
58 \r
59 Data - Optional data associated with this status code.\r
60\r
61Returns:\r
62\r
63 Status - EFI_SUCCESS if status code is successfully reported\r
64 - EFI_NOT_AVAILABLE_YET if StatusCodePpi has not been installed\r
65\r
66--*/\r
67{\r
68 EFI_STATUS Status;\r
69 EFI_PEI_PROGRESS_CODE_PPI *StatusCodePpi;\r
70 \r
71\r
72 //\r
73 //Locate StatusCode Ppi.\r
74 //\r
75 Status = PeiServicesLocatePpi (\r
76 &gEfiPeiStatusCodePpiGuid, \r
77 0, \r
78 NULL, \r
79 (VOID **)&StatusCodePpi \r
80 );\r
81\r
82 if (!EFI_ERROR (Status)) {\r
83 Status = StatusCodePpi->ReportStatusCode (\r
84 PeiServices,\r
85 CodeType,\r
86 Value,\r
87 Instance,\r
88 CallerId,\r
89 Data\r
90 );\r
91 \r
92 return Status; \r
93 } \r
94 \r
95 \r
96 return EFI_NOT_AVAILABLE_YET; \r
97}\r
98\r
99\r
100\r