Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make PlatformInitPreMem independent to IntelSiliconPkg and IntelFsp2WrapperPkg #293

Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions MinPlatformPkg/MinPlatformPkg.dsc
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,9 @@

MinPlatformPkg/PlatformInit/ReportFv/ReportFvPei.inf
MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMem.inf
# MU_CHANGE [BEGIN] For MU repo pipeline requirement
MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPreMemNonFsp.inf
# MU_CHANGE [END]
PaddyDengKC marked this conversation as resolved.
Show resolved Hide resolved
MinPlatformPkg/PlatformInit/PlatformInitPei/PlatformInitPostMem.inf
MinPlatformPkg/PlatformInit/PlatformInitDxe/PlatformInitDxe.inf
MinPlatformPkg/PlatformInit/PlatformInitSmm/PlatformInitSmm.inf
Expand Down
10 changes: 10 additions & 0 deletions MinPlatformPkg/PlatformInit/PlatformInitPei/FspSupport.c
PaddyDengKC marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <PiPei.h>

UINT8
EFIAPI
FspGetModeSelection (
VOID
)
{
return PcdGet8 (PcdFspModeSelection);
}
PaddyDengKC marked this conversation as resolved.
Show resolved Hide resolved
10 changes: 10 additions & 0 deletions MinPlatformPkg/PlatformInit/PlatformInitPei/FspSupportNull.c
PaddyDengKC marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include <PiPei.h>

UINT8
EFIAPI
FspGetModeSelection (
VOID
)
{
return 0;
}
PaddyDengKC marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ GetPlatformMemorySize (
IN OUT UINT64 *MemorySize
);

UINT8
EFIAPI
FspGetModeSelection (
VOID
);
PaddyDengKC marked this conversation as resolved.
Show resolved Hide resolved

/**

This function checks the memory range in PEI.
Expand Down Expand Up @@ -516,7 +522,7 @@ PlatformInitPreMem (

BuildMemoryTypeInformation ();

if ((!PcdGetBool (PcdFspWrapperBootMode)) || (PcdGet8 (PcdFspModeSelection) == 0)) {
if ((!PcdGetBool (PcdFspWrapperBootMode)) || (FspGetModeSelection() == 0)) {
PaddyDengKC marked this conversation as resolved.
Show resolved Hide resolved
//
// Install memory relating PPIs for EDKII native build and FSP dispatch mode
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@

[Sources]
PlatformInitPreMem.c
FspSupport.c

[Ppis]
gEfiPeiMemoryDiscoveredPpiGuid
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
### @file
# Component information file for the Platform Init Pre-Memory PEI module.
#
# Copyright (c) 2017 - 2021, Intel Corporation. All rights reserved.<BR>
#
# 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
Loading