-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IntelFsp2WrapperPkg: Add FSP 2.4 MultiPhase interface.
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3916 Provide FSP 2.4 MultiPhase wrapper support library. Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Star Zeng <star.zeng@intel.com> Signed-off-by: Chasel Chiu <chasel.chiu@intel.com> Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
- Loading branch information
1 parent
df25a54
commit 31a94f7
Showing
7 changed files
with
566 additions
and
2 deletions.
There are no files selected for viewing
62 changes: 62 additions & 0 deletions
62
IntelFsp2WrapperPkg/Include/Library/FspWrapperMultiPhaseProcessLib.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/** @file | ||
Provide FSP wrapper MultiPhase handling functions. | ||
Copyright (c) 2022, Intel Corporation. All rights reserved.<BR> | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#ifndef __FSP_WRAPPER_MULTI_PHASE_PROCESS_LIB_H__ | ||
#define __FSP_WRAPPER_MULTI_PHASE_PROCESS_LIB_H__ | ||
|
||
/** | ||
FSP Wrapper Platform MultiPhase Handler | ||
@param[in] FspHobListPtr - Pointer to FSP HobList (valid after FSP-M completed) | ||
@param[in] ComponentIndex - FSP Component which executing MultiPhase initialization. | ||
@param[in] PhaseIndex - Indicates current execution phase of FSP MultiPhase initialization. | ||
@retval EFI_STATUS Always return EFI_SUCCESS | ||
**/ | ||
VOID | ||
EFIAPI | ||
FspWrapperPlatformMultiPhaseHandler ( | ||
IN OUT VOID **FspHobListPtr, | ||
IN UINT8 ComponentIndex, | ||
IN UINT32 PhaseIndex | ||
); | ||
|
||
/** | ||
FSP Wrapper Variable Request Handler | ||
@param[in] FspHobListPtr - Pointer to FSP HobList (valid after FSP-M completed) | ||
@param[in] ComponentIndex - FSP Component which executing MultiPhase initialization. | ||
@retval EFI_UNSUPPORTED FSP Wrapper cannot support the specific variable request | ||
@retval EFI_STATUS Return FSP returned status | ||
**/EFI_STATUS | ||
EFIAPI | ||
FspWrapperVariableRequestHandler ( | ||
IN OUT VOID **FspHobListPtr, | ||
IN UINT8 ComponentIndex | ||
); | ||
|
||
/** | ||
FSP Wrapper MultiPhase Handler | ||
@param[in] FspHobListPtr - Pointer to FSP HobList (valid after FSP-M completed) | ||
@param[in] ComponentIndex - FSP Component which executing MultiPhase initialization. | ||
@retval EFI_STATUS Always return EFI_SUCCESS | ||
**/ | ||
EFI_STATUS | ||
EFIAPI | ||
FspWrapperMultiPhaseHandler ( | ||
IN OUT VOID **FspHobListPtr, | ||
IN UINT8 ComponentIndex | ||
); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...y/BaseFspWrapperPlatformMultiPhaseLibSample/BaseFspWrapperPlatformMultiPhaseLibSample.inf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
## @file | ||
# FSP Wrapper to handle platform specific actions for | ||
# FSP MultiPhase (SeparatePhase) Initialization. | ||
# | ||
# Copyright (c) 2022, Intel Corporation. All rights reserved.<BR> | ||
# | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
# | ||
## | ||
|
||
[Defines] | ||
INF_VERSION = 0x00010005 | ||
BASE_NAME = BaseFspWrapperPlatformMultiPhaseLibSample | ||
FILE_GUID = DB63E5AA-21C6-40BB-879A-CD1762C8427B | ||
MODULE_TYPE = BASE | ||
VERSION_STRING = 1.0 | ||
LIBRARY_CLASS = FspWrapperPlatformMultiPhaseLib | ||
|
||
# | ||
# The following information is for reference only and not required by the build tools. | ||
# | ||
# VALID_ARCHITECTURES = IA32 X64 | ||
# | ||
|
||
[Sources] | ||
FspWrapperPlatformMultiPhaseLibSample.c | ||
|
||
[Packages] | ||
MdePkg/MdePkg.dec | ||
IntelFsp2Pkg/IntelFsp2Pkg.dec | ||
IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec | ||
|
||
[LibraryClasses] | ||
DebugLib | ||
BaseLib | ||
PcdLib | ||
PeiServicesLib |
50 changes: 50 additions & 0 deletions
50
...Library/BaseFspWrapperPlatformMultiPhaseLibSample/FspWrapperPlatformMultiPhaseLibSample.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** @file | ||
FSP Wrapper to handle platform specific actions for | ||
FSP MultiPhase (SeparatePhase) Initialization. | ||
Copyright (c) 2022, Intel Corporation. All rights reserved.<BR> | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#include <Library/BaseLib.h> | ||
#include <Library/DebugLib.h> | ||
#include <Library/PcdLib.h> | ||
|
||
/** | ||
FSP Wrapper Platform MultiPhase Handler | ||
@param[in] FspHobListPtr - Pointer to FSP HobList (valid after FSP-M completed) | ||
@param[in] ComponentIndex - FSP Component which executing MultiPhase initialization. | ||
@param[in] PhaseIndex - Indicates current execution phase of FSP MultiPhase initialization. | ||
@retval EFI_STATUS Always return EFI_SUCCESS | ||
**/ | ||
VOID | ||
EFIAPI | ||
FspWrapperPlatformMultiPhaseHandler ( | ||
IN OUT VOID **FspHobListPtr, | ||
IN UINT8 ComponentIndex, | ||
IN UINT32 PhaseIndex | ||
) | ||
{ | ||
/* Example platform actions as below | ||
switch (ComponentIndex) { | ||
case FspMultiPhaseMemInitApiIndex: | ||
switch (PhaseIndex) { | ||
case 1: | ||
PlatformAction1 (); | ||
break; | ||
} | ||
break; | ||
case FspMultiPhaseSiInitApiIndex: | ||
switch (PhaseIndex) { | ||
case 1: | ||
PlatformAction2 (); | ||
break; | ||
} | ||
break; | ||
} | ||
*/ | ||
} |
48 changes: 48 additions & 0 deletions
48
...lFsp2WrapperPkg/Library/FspWrapperMultiPhaseProcessLib/FspWrapperMultiPhaseProcessLib.inf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
## @file | ||
# FSP wrapper to handle FSP MultiPhase (SeparatePhase) Initialization. | ||
# | ||
# Copyright (c) 2022, Intel Corporation. All rights reserved.<BR> | ||
# | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
# | ||
## | ||
|
||
[Defines] | ||
INF_VERSION = 0x00010005 | ||
BASE_NAME = FspWrapperMultiPhaseProcessLib | ||
FILE_GUID = 11E657B7-C3D8-405B-94C5-516840E67B75 | ||
MODULE_TYPE = PEIM | ||
VERSION_STRING = 1.0 | ||
LIBRARY_CLASS = FspWrapperMultiPhaseProcessLib | ||
|
||
# | ||
# The following information is for reference only and not required by the build tools. | ||
# | ||
# VALID_ARCHITECTURES = IA32 | ||
# | ||
|
||
[Sources] | ||
PeiFspWrapperMultiPhaseProcessLib.c | ||
|
||
[Packages] | ||
MdePkg/MdePkg.dec | ||
IntelFsp2Pkg/IntelFsp2Pkg.dec | ||
IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec | ||
MdeModulePkg/MdeModulePkg.dec | ||
|
||
[LibraryClasses] | ||
BaseMemoryLib | ||
DebugLib | ||
BaseLib | ||
PcdLib | ||
FspWrapperPlatformLib | ||
PeiServicesLib | ||
FspWrapperPlatformMultiPhaseLib | ||
|
||
[Ppis] | ||
gEfiPeiReadOnlyVariable2PpiGuid | ||
gEdkiiPeiVariablePpiGuid | ||
|
||
[Pcd] | ||
gIntelFsp2WrapperTokenSpaceGuid.PcdFspmBaseAddress ## CONSUMES | ||
gIntelFsp2WrapperTokenSpaceGuid.PcdFspsBaseAddress ## CONSUMES |
Oops, something went wrong.