]> git.proxmox.com Git - mirror_edk2.git/blob - IntelFsp2WrapperPkg/Library/BaseFspWrapperPlatformLibSample/FspWrapperPlatformLibSample.c
IntelFsp2WrapperPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / IntelFsp2WrapperPkg / Library / BaseFspWrapperPlatformLibSample / FspWrapperPlatformLibSample.c
1 /** @file
2 Sample to provide FSP wrapper related function.
3
4 Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #include <PiPei.h>
10 #include <Library/PcdLib.h>
11
12 /**
13 This function overrides the default configurations in the FSP-M UPD data region.
14
15 @note At this point, memory is NOT ready, PeiServices are available to use.
16
17 @param[in,out] FspUpdRgnPtr A pointer to the UPD data region data strcture.
18
19 **/
20 VOID
21 EFIAPI
22 UpdateFspmUpdData (
23 IN OUT VOID *FspUpdRgnPtr
24 )
25 {
26 }
27
28 /**
29 This function overrides the default configurations in the FSP-S UPD data region.
30
31 @param[in,out] FspUpdRgnPtr A pointer to the UPD data region data strcture.
32
33 **/
34 VOID
35 EFIAPI
36 UpdateFspsUpdData (
37 IN OUT VOID *FspUpdRgnPtr
38 )
39 {
40 }
41
42 /**
43 Update TempRamExit parameter.
44
45 @note At this point, memory is ready, PeiServices are available to use.
46
47 @return TempRamExit parameter.
48 **/
49 VOID *
50 EFIAPI
51 UpdateTempRamExitParam (
52 VOID
53 )
54 {
55 return NULL;
56 }
57
58 /**
59 Get S3 PEI memory information.
60
61 @note At this point, memory is ready, and PeiServices are available to use.
62 Platform can get some data from SMRAM directly.
63
64 @param[out] S3PeiMemSize PEI memory size to be installed in S3 phase.
65 @param[out] S3PeiMemBase PEI memory base to be installed in S3 phase.
66
67 @return If S3 PEI memory information is got successfully.
68 **/
69 EFI_STATUS
70 EFIAPI
71 GetS3MemoryInfo (
72 OUT UINT64 *S3PeiMemSize,
73 OUT EFI_PHYSICAL_ADDRESS *S3PeiMemBase
74 )
75 {
76 return EFI_UNSUPPORTED;
77 }
78
79 /**
80 Perform platform related reset in FSP wrapper.
81
82 This function will reset the system with requested ResetType.
83
84 @param[in] FspStatusResetType The type of reset the platform has to perform.
85 **/
86 VOID
87 EFIAPI
88 CallFspWrapperResetSystem (
89 IN UINT32 FspStatusResetType
90 )
91 {
92 //
93 // Perform reset according to the type.
94 //
95
96 CpuDeadLoop();
97 }