1 /** @file
2   This PEIM will parse the hoblist from fsp and report them into pei core.
3   This file contains the main entrypoint of the PEIM.
4 
5   Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
6   This program and the accompanying materials
7   are licensed and made available under the terms and conditions of the BSD License
8   which accompanies this distribution.  The full text of the license may be found at
9   http://opensource.org/licenses/bsd-license.php.
10 
11   THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 
14 **/
15 
16 
17 #include <PiPei.h>
18 #include <Ppi/MasterBootMode.h>
19 
20 static EFI_PEI_PPI_DESCRIPTOR       mPpiList[] = {
21   {
22     EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST,
23     &gEfiPeiMasterBootModePpiGuid,
24     NULL
25   },
26 };
27 
28 /**
29   This is the entrypoint of PEIM
30 
31   @param  FileHandle  Handle of the file being invoked.
32   @param  PeiServices Describes the list of possible PEI Services.
33 
34   @retval EFI_SUCCESS if it completed successfully.
35 **/
36 EFI_STATUS
37 EFIAPI
BootModePeiEntryPoint(IN EFI_PEI_FILE_HANDLE FileHandle,IN CONST EFI_PEI_SERVICES ** PeiServices)38 BootModePeiEntryPoint (
39   IN       EFI_PEI_FILE_HANDLE  FileHandle,
40   IN CONST EFI_PEI_SERVICES     **PeiServices
41   )
42 {
43   (*PeiServices)->SetBootMode(PeiServices, BOOT_WITH_FULL_CONFIGURATION);
44 
45   (*PeiServices)->InstallPpi (PeiServices, &mPpiList[0]);
46 
47   return EFI_SUCCESS;
48 }
49