-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make PlatformInitPreMem independent to IntelSiliconPkg and IntelFsp2W…
…rapperPkg This driver is shared across different Silicon vendors. It should not use Intel specific packages To achieve this, added a new lib `FspSupportLib` to isolate silicon related PCDs
- Loading branch information
1 parent
2c90f2b
commit 0f1c877
Showing
7 changed files
with
136 additions
and
5 deletions.
There are no files selected for viewing
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,35 @@ | ||
/** @file FspSupportLib.c | ||
Library to report FSP support state | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
**/ | ||
|
||
#ifndef _FSP_SUPPORT_LIB_H_ | ||
#define _FSP_SUPPORT_LIB_H_ | ||
|
||
/** | ||
Return if platform is boot in FSP wrapper enabled | ||
@retval TRUE FSP binary is used. | ||
FALSE FSP binary is not used. | ||
**/ | ||
BOOLEAN | ||
EFIAPI | ||
FspGetWrapperBootMode ( | ||
VOID | ||
); | ||
|
||
/** | ||
Return FSP mode selection. Only valid on certain platforms | ||
@retval FSP mode. | ||
**/ | ||
UINT8 | ||
EFIAPI | ||
FspGetModeSelection ( | ||
VOID | ||
); | ||
|
||
#endif // _FSP_SUPPORT_LIB_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,41 @@ | ||
/** @file FspSupportLib.c | ||
Library to report FSP support state | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
**/ | ||
|
||
#include <Uefi.h> | ||
|
||
#include <Library/FspSupportLib.h> | ||
#include <Library/PcdLib.h> | ||
|
||
/** | ||
Return if platform is boot in FSP wrapper enabled | ||
@retval TRUE FSP binary is used. | ||
FALSE FSP binary is not used. | ||
**/ | ||
BOOLEAN | ||
EFIAPI | ||
FspGetWrapperBootMode ( | ||
VOID | ||
) | ||
{ | ||
return PcdGetBool (PcdFspWrapperBootMode); | ||
} | ||
|
||
/** | ||
Return FSP mode selection. Only valid on certain platforms | ||
@retval FSP mode. | ||
**/ | ||
UINT8 | ||
EFIAPI | ||
FspGetModeSelection ( | ||
VOID | ||
) | ||
{ | ||
return PcdGet8 (PcdFspModeSelection); | ||
} |
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,31 @@ | ||
# @file FspSupportLib.inf | ||
# | ||
# Default implementation of FspSupportLib. | ||
# Library to report FSP support state | ||
# | ||
# | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# | ||
|
||
[Defines] | ||
INF_VERSION = 0x00010006 | ||
BASE_NAME = FspSupportLib | ||
FILE_GUID = 9D79825F-C6A5-4D94-AF26-23AF2BD6BEC7 | ||
VERSION_STRING = 1.0 | ||
MODULE_TYPE = BASE | ||
LIBRARY_CLASS = FspSupportLib | ||
|
||
[Sources] | ||
FspSupportLib.c | ||
|
||
[Packages] | ||
MdePkg/MdePkg.dec | ||
MinPlatformPkg/MinPlatformPkg.dec | ||
IntelFsp2WrapperPkg/IntelFsp2WrapperPkg.dec | ||
|
||
[LibraryClasses] | ||
PcdLib | ||
|
||
[Pcd] | ||
gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode | ||
gIntelFsp2WrapperTokenSpaceGuid.PcdFspModeSelection |
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
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