]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Core/Pei/Reset/Reset.c
correct comments
[mirror_edk2.git] / MdeModulePkg / Core / Pei / Reset / Reset.c
1 /** @file
2 Pei Core Reset System 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 Reset System
20
21
22 @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation.
23
24 @retval EFI_NOT_AVAILABLE_YET PPI not available yet.
25 @retval EFI_DEVICE_ERROR Did not reset system.
26 Otherwise, resets the system.
27
28 **/
29 EFI_STATUS
30 EFIAPI
31 PeiResetSystem (
32 IN CONST EFI_PEI_SERVICES **PeiServices
33 )
34 {
35 EFI_STATUS Status;
36 EFI_PEI_RESET_PPI *ResetPpi;
37
38 Status = PeiServicesLocatePpi (
39 &gEfiPeiResetPpiGuid,
40 0,
41 NULL,
42 (VOID **)&ResetPpi
43 );
44
45 //
46 // LocatePpi returns EFI_NOT_FOUND on error
47 //
48 if (!EFI_ERROR (Status)) {
49 return ResetPpi->ResetSystem (PeiServices);
50 }
51 return EFI_NOT_AVAILABLE_YET;
52 }
53