forked from microsoft/mu_common_intel_min_platform
-
Notifications
You must be signed in to change notification settings - Fork 0
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 (microsoft#293) ## Description This driver is shared across different Silicon vendors. So it should not use any Intel specific packages. In order to achieve this, added a new lib `FspSupportLib` to isolate silicon related PCDs - [ ] Impacts functionality? - [ ] Impacts security? - [ ] Breaking change? - [ ] Includes tests? - [ ] Includes documentation? ## How This Was Tested CI build passed. ## Integration Instructions No additional change is required for the consuming platforms. --------- Co-authored-by: Michael Kubacki <[email protected]>
- Loading branch information
1 parent
35527d3
commit 1bf8daf
Showing
6 changed files
with
111 additions
and
1 deletion.
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
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,17 @@ | ||
/** @file FspSupport.c | ||
Provides FSP mode selection value based on PcdFspModeSelection | ||
Copyright (c) Microsoft Corporation. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#include <PiPei.h> | ||
|
||
UINT8 | ||
EFIAPI | ||
FspGetModeSelection ( | ||
VOID | ||
) | ||
{ | ||
return PcdGet8 (PcdFspModeSelection); | ||
} |
17 changes: 17 additions & 0 deletions
17
MinPlatformPkg/PlatformInit/PlatformInitPei/FspSupportNull.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,17 @@ | ||
/** @file FspSupport.c | ||
Provides FSP mode selection value based on PcdFspModeSelection | ||
Copyright (c) Microsoft Corporation. | ||
SPDX-License-Identifier: BSD-2-Clause-Patent | ||
**/ | ||
|
||
#include <PiPei.h> | ||
|
||
UINT8 | ||
EFIAPI | ||
FspGetModeSelection ( | ||
VOID | ||
) | ||
{ | ||
return 0; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,6 +51,7 @@ | |
|
||
[Sources] | ||
PlatformInitPreMem.c | ||
FspSupport.c | ||
|
||
[Ppis] | ||
gEfiPeiMemoryDiscoveredPpiGuid | ||
|
68 changes: 68 additions & 0 deletions
68
MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMemNonFsp.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,68 @@ | ||
### @file | ||
# Component information file for the Platform Init Pre-Memory PEI module. | ||
# | ||
# Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.<BR> | ||
# Copyright (c) Microsoft Corporation. | ||
# | ||
# SPDX-License-Identifier: BSD-2-Clause-Patent | ||
# | ||
### | ||
|
||
[Defines] | ||
INF_VERSION = 0x00010017 | ||
BASE_NAME = PlatformInitPreMemNonFsp | ||
FILE_GUID = BEB6F1A6-F6BC-4C34-AB32-F0390A428479 | ||
VERSION_STRING = 1.0 | ||
MODULE_TYPE = PEIM | ||
ENTRY_POINT = PlatformInitPreMemEntryPoint | ||
|
||
[LibraryClasses] | ||
BaseMemoryLib | ||
BoardInitLib | ||
DebugLib | ||
HobLib | ||
IoLib | ||
MemoryAllocationLib | ||
PeimEntryPoint | ||
PeiServicesLib | ||
TestPointCheckLib | ||
TimerLib | ||
SetCacheMtrrLib | ||
ReportCpuHobLib | ||
|
||
[Packages] | ||
MinPlatformPkg/MinPlatformPkg.dec | ||
MdeModulePkg/MdeModulePkg.dec | ||
MdePkg/MdePkg.dec | ||
|
||
[Pcd] | ||
gMinPlatformPkgTokenSpaceGuid.PcdFspWrapperBootMode ## CONSUMES | ||
gMinPlatformPkgTokenSpaceGuid.PcdStopAfterDebugInit ## CONSUMES | ||
gMinPlatformPkgTokenSpaceGuid.PcdStopAfterMemInit ## CONSUMES | ||
|
||
[FixedPcd] | ||
gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiAcpiReclaimMemorySize ## CONSUMES | ||
gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiAcpiNvsMemorySize ## CONSUMES | ||
gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiReservedMemorySize ## CONSUMES | ||
gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiRtDataMemorySize ## CONSUMES | ||
gMinPlatformPkgTokenSpaceGuid.PcdPlatformEfiRtCodeMemorySize ## CONSUMES | ||
|
||
[Sources] | ||
PlatformInitPreMem.c | ||
FspSupportNull.c | ||
|
||
[Ppis] | ||
gEfiPeiMemoryDiscoveredPpiGuid | ||
gEfiPeiMasterBootModePpiGuid ## PRODUCES | ||
gEfiPeiBootInRecoveryModePpiGuid ## PRODUCES | ||
gPlatformInitTempRamExitPpiGuid ## PRODUCES | ||
gEfiPeiReadOnlyVariable2PpiGuid | ||
gPeiBaseMemoryTestPpiGuid | ||
gPeiPlatformMemorySizePpiGuid | ||
|
||
[Guids] | ||
gEfiMemoryTypeInformationGuid | ||
gEfiMemoryTypeMinimumAllocationGuid #MU_CHANGE - Add minimum memory type allocations | ||
|
||
[Depex] | ||
gEfiPeiReadOnlyVariable2PpiGuid |