The current interdepencies between the PrePeiCore SEC module, the platform PEIM and ArmPlatformLib is a bit awkward: due to the fact that ArmPlatformLib is also used by SEC modules, we cannot use PEI specific facilities in the implementation of ArmPlatformGetBootMode. However, given that we call that library function /after/ invoking PlatformPeiLib, there is no way for that library to set the boot mode other than resorting to tricks like notification callbacks on arbitrary unrelated events. ArmPlatformLib should probably be phased out anyway, given its quirky nature, but for now, let's fix this particular issue by deferring the call to PlatformPeim() to after the point where we set the boot mode by calling ArmPlatformGetBootMode (). While we're at it, clean up the code slightly by using PeiServicesLib instead of doing double pointer dereferencing. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
65 lines
1.7 KiB
INI
65 lines
1.7 KiB
INI
#/** @file
|
|
#
|
|
# Copyright (c) 2011-2012, ARM Limited. All rights reserved.
|
|
#
|
|
# This program and the accompanying materials
|
|
# are licensed and made available under the terms and conditions of the BSD License
|
|
# which accompanies this distribution. The full text of the license may be found at
|
|
# http://opensource.org/licenses/bsd-license.php
|
|
#
|
|
# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
#
|
|
#**/
|
|
|
|
[Defines]
|
|
INF_VERSION = 0x00010005
|
|
BASE_NAME = PlatformPei
|
|
FILE_GUID = 2ad0fc59-2314-4bf3-8633-13fa22a624a0
|
|
MODULE_TYPE = PEIM
|
|
VERSION_STRING = 1.0
|
|
|
|
ENTRY_POINT = InitializePlatformPeim
|
|
|
|
#
|
|
# The following information is for reference only and not required by the build tools.
|
|
#
|
|
# VALID_ARCHITECTURES = IA32 X64 IPF EBC ARM
|
|
#
|
|
|
|
[Sources]
|
|
PlatformPeim.c
|
|
|
|
[Packages]
|
|
MdePkg/MdePkg.dec
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
EmbeddedPkg/EmbeddedPkg.dec
|
|
ArmPkg/ArmPkg.dec
|
|
ArmPlatformPkg/ArmPlatformPkg.dec
|
|
|
|
[LibraryClasses]
|
|
PeimEntryPoint
|
|
DebugLib
|
|
HobLib
|
|
ArmPlatformLib
|
|
PlatformPeiLib
|
|
PeiServicesLib
|
|
|
|
[Ppis]
|
|
gEfiPeiMasterBootModePpiGuid # PPI ALWAYS_PRODUCED
|
|
gEfiPeiBootInRecoveryModePpiGuid # PPI SOMETIMES_PRODUCED
|
|
|
|
[FixedPcd]
|
|
gArmTokenSpaceGuid.PcdFdBaseAddress
|
|
gArmTokenSpaceGuid.PcdFdSize
|
|
|
|
gArmTokenSpaceGuid.PcdFvBaseAddress
|
|
gArmTokenSpaceGuid.PcdFvSize
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdPrePiCpuMemorySize
|
|
gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize
|
|
|
|
[Depex]
|
|
TRUE
|
|
|