2011-07-06 18:27:21 +02:00
|
|
|
#/** @file
|
2014-08-19 15:29:52 +02:00
|
|
|
#
|
2015-07-06 18:54:26 +02:00
|
|
|
# (C) Copyright 2015 Hewlett-Packard Development Company, L.P.<BR>
|
2017-06-08 16:40:09 +02:00
|
|
|
# Copyright (c) 2011-2017, ARM Ltd. All rights reserved.<BR>
|
2020-10-23 15:37:14 +02:00
|
|
|
# Copyright (c) 2020, Arm Limited. All rights reserved.<BR>
|
2014-08-19 15:29:52 +02:00
|
|
|
#
|
2019-04-04 01:03:21 +02:00
|
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
2014-08-19 15:29:52 +02:00
|
|
|
#
|
2011-07-06 18:27:21 +02:00
|
|
|
#**/
|
|
|
|
|
|
|
|
[Defines]
|
|
|
|
INF_VERSION = 0x00010005
|
|
|
|
BASE_NAME = ArmPlatformPrePiUniCore
|
2020-10-23 15:37:14 +02:00
|
|
|
FILE_GUID = 3e401783-cc94-4fcd-97bc-bd35ac369d2f
|
2011-07-06 18:27:21 +02:00
|
|
|
MODULE_TYPE = SEC
|
|
|
|
VERSION_STRING = 1.0
|
|
|
|
|
2013-03-12 01:54:02 +01:00
|
|
|
[Sources]
|
2019-08-31 16:07:29 +02:00
|
|
|
PrePi.h
|
2011-07-06 18:27:21 +02:00
|
|
|
PrePi.c
|
|
|
|
MainUniCore.c
|
2013-03-12 01:54:02 +01:00
|
|
|
|
|
|
|
[Sources.ARM]
|
2013-07-18 21:06:52 +02:00
|
|
|
Arm/ArchPrePi.c
|
2013-03-12 01:54:02 +01:00
|
|
|
Arm/ModuleEntryPoint.S | GCC
|
2013-07-18 21:06:52 +02:00
|
|
|
|
|
|
|
[Sources.AArch64]
|
|
|
|
AArch64/ArchPrePi.c
|
2014-05-08 16:54:11 +02:00
|
|
|
AArch64/ModuleEntryPoint.S
|
2014-08-19 15:29:52 +02:00
|
|
|
|
2011-07-06 18:27:21 +02:00
|
|
|
[Packages]
|
|
|
|
MdePkg/MdePkg.dec
|
|
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
|
|
EmbeddedPkg/EmbeddedPkg.dec
|
|
|
|
ArmPkg/ArmPkg.dec
|
|
|
|
ArmPlatformPkg/ArmPlatformPkg.dec
|
|
|
|
|
|
|
|
[LibraryClasses]
|
|
|
|
BaseLib
|
ArmPlatformPkg/PrePi: 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 UEFI memory
region by virtual address, which is the only memory region we will
be touching with the caches and MMU both disabled and enabled.
(This 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@linaro.org>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Tested-by: Pete Batard <pete@akeo.ie>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
2020-02-25 19:28:34 +01:00
|
|
|
CacheMaintenanceLib
|
2011-07-06 18:27:21 +02:00
|
|
|
DebugLib
|
|
|
|
DebugAgentLib
|
|
|
|
ArmLib
|
|
|
|
IoLib
|
|
|
|
TimerLib
|
|
|
|
SerialPortLib
|
|
|
|
ExtractGuidedSectionLib
|
|
|
|
LzmaDecompressLib
|
|
|
|
DebugAgentLib
|
|
|
|
PrePiLib
|
|
|
|
ArmPlatformLib
|
2012-09-28 13:01:36 +02:00
|
|
|
ArmPlatformStackLib
|
2011-07-06 18:27:21 +02:00
|
|
|
MemoryAllocationLib
|
|
|
|
HobLib
|
|
|
|
PrePiHobListPointerLib
|
|
|
|
PlatformPeiLib
|
|
|
|
MemoryInitPeiLib
|
|
|
|
|
2012-07-04 22:17:46 +02:00
|
|
|
[Ppis]
|
|
|
|
gArmMpCoreInfoPpiGuid
|
2011-09-23 01:11:03 +02:00
|
|
|
|
2011-11-02 00:41:52 +01:00
|
|
|
[Guids]
|
2012-07-04 22:17:46 +02:00
|
|
|
gArmMpCoreInfoGuid
|
2017-06-08 16:40:09 +02:00
|
|
|
gEfiFirmwarePerformanceGuid
|
2011-11-02 00:41:52 +01:00
|
|
|
|
2014-08-19 15:29:52 +02:00
|
|
|
[FeaturePcd]
|
2011-07-06 18:27:21 +02:00
|
|
|
gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob
|
|
|
|
gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores
|
|
|
|
|
2015-07-06 18:54:26 +02:00
|
|
|
[Pcd]
|
2012-03-26 13:08:32 +02:00
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString
|
2014-08-19 15:29:52 +02:00
|
|
|
|
2015-07-06 18:54:26 +02:00
|
|
|
[FixedPcd]
|
2011-07-06 18:27:21 +02:00
|
|
|
gArmTokenSpaceGuid.PcdVFPEnabled
|
|
|
|
|
2011-09-23 01:06:31 +02:00
|
|
|
gArmTokenSpaceGuid.PcdFdBaseAddress
|
|
|
|
gArmTokenSpaceGuid.PcdFdSize
|
2011-07-06 18:27:21 +02:00
|
|
|
|
2011-09-23 01:06:31 +02:00
|
|
|
gArmTokenSpaceGuid.PcdFvBaseAddress
|
|
|
|
gArmTokenSpaceGuid.PcdFvSize
|
2011-07-06 18:27:21 +02:00
|
|
|
|
2011-09-23 01:05:20 +02:00
|
|
|
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
|
|
|
|
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
2011-07-06 18:27:21 +02:00
|
|
|
|
|
|
|
gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize
|
2014-08-19 15:29:52 +02:00
|
|
|
|
2012-09-28 12:43:28 +02:00
|
|
|
gArmPlatformTokenSpaceGuid.PcdCoreCount
|
2011-09-23 01:01:13 +02:00
|
|
|
|
2011-07-06 18:27:21 +02:00
|
|
|
gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize
|
|
|
|
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesCode
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesData
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderData
|
2014-09-09 18:11:30 +02:00
|
|
|
|
|
|
|
[Pcd]
|
|
|
|
gArmTokenSpaceGuid.PcdSystemMemoryBase
|
|
|
|
gArmTokenSpaceGuid.PcdSystemMemorySize
|