• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /** @file
2   Sample to provide FSP wrapper related function.
3 
4   Copyright (c) 2014 - 2016, 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.
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 <PiPei.h>
16 #include <Library/PcdLib.h>
17 
18 /**
19   This function overrides the default configurations in the FSP-M UPD data region.
20 
21   @note At this point, memory is NOT ready, PeiServices are available to use.
22 
23   @param[in,out] FspUpdRgnPtr   A pointer to the UPD data region data strcture.
24 
25 **/
26 VOID
27 EFIAPI
UpdateFspmUpdData(IN OUT VOID * FspUpdRgnPtr)28 UpdateFspmUpdData (
29   IN OUT VOID        *FspUpdRgnPtr
30   )
31 {
32 }
33 
34 /**
35   This function overrides the default configurations in the FSP-S UPD data region.
36 
37   @param[in,out] FspUpdRgnPtr   A pointer to the UPD data region data strcture.
38 
39 **/
40 VOID
41 EFIAPI
UpdateFspsUpdData(IN OUT VOID * FspUpdRgnPtr)42 UpdateFspsUpdData (
43   IN OUT VOID        *FspUpdRgnPtr
44   )
45 {
46 }
47 
48 /**
49   Update TempRamExit parameter.
50 
51   @note At this point, memory is ready, PeiServices are available to use.
52 
53   @return TempRamExit parameter.
54 **/
55 VOID *
56 EFIAPI
UpdateTempRamExitParam(VOID)57 UpdateTempRamExitParam (
58   VOID
59   )
60 {
61   return NULL;
62 }
63 
64 /**
65   Get S3 PEI memory information.
66 
67   @note At this point, memory is ready, and PeiServices are available to use.
68   Platform can get some data from SMRAM directly.
69 
70   @param[out] S3PeiMemSize  PEI memory size to be installed in S3 phase.
71   @param[out] S3PeiMemBase  PEI memory base to be installed in S3 phase.
72 
73   @return If S3 PEI memory information is got successfully.
74 **/
75 EFI_STATUS
76 EFIAPI
GetS3MemoryInfo(OUT UINT64 * S3PeiMemSize,OUT EFI_PHYSICAL_ADDRESS * S3PeiMemBase)77 GetS3MemoryInfo (
78   OUT UINT64               *S3PeiMemSize,
79   OUT EFI_PHYSICAL_ADDRESS *S3PeiMemBase
80   )
81 {
82   return EFI_UNSUPPORTED;
83 }
84 
85 /**
86   Perform platform related reset in FSP wrapper.
87 
88   This function will reset the system with requested ResetType.
89 
90   @param[in] FspStatusResetType  The type of reset the platform has to perform.
91 **/
92 VOID
93 EFIAPI
CallFspWrapperResetSystem(IN UINT32 FspStatusResetType)94 CallFspWrapperResetSystem (
95   IN UINT32    FspStatusResetType
96   )
97 {
98   //
99   // Perform reset according to the type.
100   //
101 
102   CpuDeadLoop();
103 }
104