2011-02-01 06:41:42 +01:00
|
|
|
#/** @file
|
|
|
|
# Pre PeiCore - Hand-off to PEI Core in Normal World
|
2014-08-19 15:29:52 +02:00
|
|
|
#
|
2011-02-01 06:41:42 +01:00
|
|
|
# Copyright (c) 2011, ARM Limited. All rights reserved.
|
|
|
|
#
|
2019-04-04 01:03:21 +02:00
|
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
2014-08-19 15:29:52 +02:00
|
|
|
#
|
2011-02-01 06:41:42 +01:00
|
|
|
#**/
|
|
|
|
|
|
|
|
[Defines]
|
|
|
|
INF_VERSION = 0x00010005
|
|
|
|
BASE_NAME = ArmPlatformPrePeiCore
|
|
|
|
FILE_GUID = 469fc080-aec1-11df-927c-0002a5d5c51b
|
|
|
|
MODULE_TYPE = SEC
|
|
|
|
VERSION_STRING = 1.0
|
|
|
|
|
2013-03-12 01:54:02 +01:00
|
|
|
[Sources.common]
|
2019-07-19 17:18:01 +02:00
|
|
|
PrePeiCore.h
|
2011-02-01 06:41:42 +01:00
|
|
|
PrePeiCore.c
|
|
|
|
MainUniCore.c
|
2013-03-12 01:54:02 +01:00
|
|
|
|
|
|
|
[Sources.ARM]
|
|
|
|
Arm/ArchPrePeiCore.c
|
|
|
|
Arm/PrePeiCoreEntryPoint.S | GCC
|
|
|
|
Arm/SwitchStack.S | GCC
|
|
|
|
Arm/Exception.S | GCC
|
2013-07-18 21:06:52 +02:00
|
|
|
|
|
|
|
[Sources.AARCH64]
|
|
|
|
AArch64/ArchPrePeiCore.c
|
2014-05-08 16:54:11 +02:00
|
|
|
AArch64/PrePeiCoreEntryPoint.S
|
|
|
|
AArch64/SwitchStack.S
|
|
|
|
AArch64/Exception.S
|
|
|
|
AArch64/Helper.S
|
2013-07-18 21:06:52 +02:00
|
|
|
|
2011-02-01 06:41:42 +01:00
|
|
|
[Packages]
|
|
|
|
MdePkg/MdePkg.dec
|
|
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
|
|
ArmPkg/ArmPkg.dec
|
|
|
|
ArmPlatformPkg/ArmPlatformPkg.dec
|
|
|
|
|
|
|
|
[LibraryClasses]
|
2011-07-01 21:51:48 +02:00
|
|
|
ArmLib
|
|
|
|
ArmPlatformLib
|
ArmPlatformPkg/PrePeiCore: replace set/way cache ops with by-VA ones
Cache maintenance operations by set/way are only intended to be used
in the context of on/offlining a core, while it has been taken out of
the coherency domain. Any use intended to ensure that the contents of
the cache have made it to main memory is unreliable, since cacheline
migration and non-architected system caches may cause these contents
to linger elsewhere, without being visible in main memory once the
MMU and caches are disabled.
In KVM on Linux, there are horrid hacks in place to ensure that such
set/way operations are trapped, and replaced with a single by-VA
clean/invalidate of the entire guest VA space once the MMU state
changes, which can be costly, and is unnecessary if we manage the
caches a bit more carefully, and perform maintenance by virtual
address only.
So let's get rid of the call to ArmInvalidateDataCache () in the
PrePeiCore startup code, and instead, invalidate the temporary RAM
region by virtual address, which is the only memory region we will
be touching with the caches and MMU both disabled and enabled,
which will lead to data corruption if data written with the MMU off
is shadowed by clean, stale cachelines that stick around when the
MMU is enabled again.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
2020-02-21 11:30:31 +01:00
|
|
|
CacheMaintenanceLib
|
2011-02-01 06:41:42 +01:00
|
|
|
BaseLib
|
|
|
|
DebugLib
|
2011-07-06 18:07:54 +02:00
|
|
|
DebugAgentLib
|
2011-02-01 06:41:42 +01:00
|
|
|
IoLib
|
2011-07-01 21:51:48 +02:00
|
|
|
PrintLib
|
2011-09-23 00:53:54 +02:00
|
|
|
SerialPortLib
|
2011-02-01 06:41:42 +01:00
|
|
|
|
|
|
|
[Ppis]
|
|
|
|
gEfiTemporaryRamSupportPpiGuid
|
|
|
|
|
2022-10-11 22:59:52 +02:00
|
|
|
[Pcd]
|
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString
|
|
|
|
|
2011-07-06 18:07:54 +02:00
|
|
|
[FeaturePcd]
|
|
|
|
gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores
|
2011-07-01 16:21:12 +02:00
|
|
|
|
2011-07-06 18:07:54 +02:00
|
|
|
[FixedPcd]
|
2011-09-23 01:06:31 +02:00
|
|
|
gArmTokenSpaceGuid.PcdFvBaseAddress
|
|
|
|
gArmTokenSpaceGuid.PcdFvSize
|
2020-01-06 12:38:29 +01:00
|
|
|
gArmTokenSpaceGuid.PcdVFPEnabled
|
2011-02-01 06:41:42 +01:00
|
|
|
|
2011-09-23 01:05:20 +02:00
|
|
|
gArmPlatformTokenSpaceGuid.PcdCPUCoresStackBase
|
|
|
|
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
|
|
|
|
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
2017-10-20 12:44:04 +02:00
|
|
|
|
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdInitValueInTempStack
|