2015-02-28 21:26:20 +01:00
|
|
|
#/** @file
|
|
|
|
#
|
2015-05-29 15:50:43 +02:00
|
|
|
# Copyright (c) 2011-2015, ARM Ltd. All rights reserved.<BR>
|
2015-02-28 21:26:20 +01:00
|
|
|
# Copyright (c) 2015, Linaro Ltd. All rights reserved.<BR>
|
|
|
|
#
|
2019-04-04 01:03:23 +02:00
|
|
|
# SPDX-License-Identifier: BSD-2-Clause-Patent
|
2015-02-28 21:26:20 +01:00
|
|
|
#
|
|
|
|
#**/
|
|
|
|
|
|
|
|
[Defines]
|
|
|
|
INF_VERSION = 0x00010005
|
|
|
|
BASE_NAME = ArmVirtPrePiUniCoreRelocatable
|
|
|
|
FILE_GUID = f7d9fd14-9335-4389-80c5-334d6abfcced
|
|
|
|
MODULE_TYPE = SEC
|
|
|
|
VALID_ARCHITECTURES = AARCH64
|
|
|
|
VERSION_STRING = 1.0
|
|
|
|
|
|
|
|
[Sources]
|
2017-11-17 12:09:44 +01:00
|
|
|
FdtParser.c
|
2018-03-10 18:06:10 +01:00
|
|
|
PrePi.c
|
2018-03-10 17:54:24 +01:00
|
|
|
PrePi.h
|
2015-02-28 21:26:20 +01:00
|
|
|
|
|
|
|
[Sources.AArch64]
|
|
|
|
AArch64/ArchPrePi.c
|
|
|
|
AArch64/ModuleEntryPoint.S
|
|
|
|
|
2015-12-17 18:11:16 +01:00
|
|
|
[Sources.ARM]
|
|
|
|
Arm/ArchPrePi.c
|
|
|
|
Arm/ModuleEntryPoint.S
|
|
|
|
|
2015-02-28 21:26:20 +01:00
|
|
|
[Packages]
|
|
|
|
MdePkg/MdePkg.dec
|
|
|
|
MdeModulePkg/MdeModulePkg.dec
|
|
|
|
EmbeddedPkg/EmbeddedPkg.dec
|
|
|
|
ArmPkg/ArmPkg.dec
|
|
|
|
ArmPlatformPkg/ArmPlatformPkg.dec
|
2015-05-29 15:50:43 +02:00
|
|
|
ArmVirtPkg/ArmVirtPkg.dec
|
2015-02-28 21:26:20 +01:00
|
|
|
|
|
|
|
[LibraryClasses]
|
|
|
|
BaseLib
|
|
|
|
DebugLib
|
2017-11-17 12:09:44 +01:00
|
|
|
FdtLib
|
2015-02-28 21:26:20 +01:00
|
|
|
ArmLib
|
|
|
|
IoLib
|
|
|
|
TimerLib
|
|
|
|
SerialPortLib
|
|
|
|
ExtractGuidedSectionLib
|
|
|
|
LzmaDecompressLib
|
|
|
|
PrePiLib
|
|
|
|
MemoryAllocationLib
|
|
|
|
HobLib
|
|
|
|
PrePiHobListPointerLib
|
|
|
|
PlatformPeiLib
|
|
|
|
MemoryInitPeiLib
|
2015-04-14 13:56:56 +02:00
|
|
|
CacheMaintenanceLib
|
2015-02-28 21:26:20 +01:00
|
|
|
|
|
|
|
[Ppis]
|
|
|
|
gArmMpCoreInfoPpiGuid
|
|
|
|
|
|
|
|
[Guids]
|
|
|
|
gArmMpCoreInfoGuid
|
|
|
|
|
|
|
|
[FeaturePcd]
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdPrePiProduceMemoryTypeInformationHob
|
|
|
|
gArmPlatformTokenSpaceGuid.PcdSendSgiToBringUpSecondaryCores
|
|
|
|
|
|
|
|
[FixedPcd]
|
|
|
|
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString
|
|
|
|
|
|
|
|
gArmTokenSpaceGuid.PcdVFPEnabled
|
|
|
|
|
|
|
|
gArmTokenSpaceGuid.PcdFdSize
|
|
|
|
gArmTokenSpaceGuid.PcdFvSize
|
|
|
|
|
|
|
|
gArmPlatformTokenSpaceGuid.PcdCPUCorePrimaryStackSize
|
|
|
|
gArmPlatformTokenSpaceGuid.PcdCPUCoreSecondaryStackSize
|
|
|
|
|
|
|
|
gArmPlatformTokenSpaceGuid.PcdSystemMemoryUefiRegionSize
|
|
|
|
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdPrePiCpuIoSize
|
|
|
|
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIReclaimMemory
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiACPIMemoryNVS
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiReservedMemoryType
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesData
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiRuntimeServicesCode
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesCode
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiBootServicesData
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderCode
|
|
|
|
gEmbeddedTokenSpaceGuid.PcdMemoryTypeEfiLoaderData
|
|
|
|
|
|
|
|
[Pcd]
|
|
|
|
gArmTokenSpaceGuid.PcdSystemMemoryBase
|
|
|
|
gArmTokenSpaceGuid.PcdSystemMemorySize
|
2015-05-29 15:50:43 +02:00
|
|
|
gArmVirtTokenSpaceGuid.PcdDeviceTreeInitialBaseAddress
|
2015-02-28 21:26:20 +01:00
|
|
|
gArmTokenSpaceGuid.PcdFdBaseAddress
|
|
|
|
gArmTokenSpaceGuid.PcdFvBaseAddress
|
|
|
|
|
|
|
|
[BuildOptions]
|
ArmVirtPkg/ArmVirtPrePiUniCoreRelocatable: revert to PIE linking
In some cases, the CLANG38 toolchain profile in LTO mode emits GOT
based relocations in spite of our attempts to avoid this, by using
hidden visibility, -Bsymbolic etc.
On AARCH64, we managed to work around this by processing the GOT
based relocations in GenFw. As it turns out, the same issue exists
on 32-bit ARM, but unfortunately, we cannot use a similar trick to
get rid of the GOT entry, and the relocation metadata is insufficient
to locate the GOT entry in the binary.
Note that in this particular case, we are interested in PIE linking
only (i.e., producing a .rela section containing dynamic relocations
that the startup code can process directly), and not in position
independent code generation, and by passing the -pie option to the
linker directly using -Wl,-pie (and dropping -shared), we can coerce
the GOLD linker into doing only the former rather than both when it
performs its LTO code generation.
Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
2019-09-05 00:49:28 +02:00
|
|
|
GCC:*_*_*_DLINK_FLAGS = -Wl,-Bsymbolic,-pie,-T,$(MODULE_DIR)/Scripts/PrePi-PIE.lds
|