Acidanthera UEFI Development Kit based on EDK II edk2-stable202311
Go to file
Ard Biesheuvel 026a82abf0 BaseTools/GenFw AARCH64: convert ADRP to ADR instructions if binary size allows it
The ADRP instruction in the AArch64 ISA requires the link time and load time
offsets of a binary to be equal modulo 4 KB. The reason is that this instruction
always produces a multiple of 4 KB, and relies on a subsequent ADD or LDR
instruction to set the offset into the page. The resulting symbol reference
only produces the correct value if the symbol in question resides at that
exact offset into the page, and so loading the binary at arbitrary offsets
is not possible.

Due to the various levels of padding when packing FVs into FVs into FDs, this
alignment is very costly for XIP code, and so we would like to relax this
alignment requirement if possible.

Given that symbols that are sufficiently close (within 1 MB) of the reference
can also be reached using an ADR instruction which does not suffer from this
alignment issue, let's replace ADRP instructions with ADR after linking if
the offset can be encoded in this instruction's immediate field. Note that
this only makes sense if the section alignment is < 4 KB. Otherwise,
replacing the ADRP has no benefit, considering that the subsequent ADD or
LDR instruction is retained, and that micro-architectures are more likely
to be optimized for ADRP/ADD pairs (i.e., via micro op fusing) than for
ADR/ADD pairs, which are non-typical.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
2016-08-02 10:58:07 +02:00
AppPkg AppPkg/.../Python: Clean up and document how to escape the -# option. 2016-01-06 01:00:19 +00:00
ArmPkg ArmPkg: add prebuilt glue binaries for GCC5 LTO support 2016-08-02 10:53:57 +02:00
ArmPlatformPkg ArmPlatformPkg: Convert ArmJunoDxe to use common juno revision code 2016-07-28 15:29:35 +01:00
ArmVirtPkg BaseTools GCC: use 'gcc' as the linker command for GCC44 and later 2016-08-02 08:40:43 +02:00
BaseTools BaseTools/GenFw AARCH64: convert ADRP to ADR instructions if binary size allows it 2016-08-02 10:58:07 +02:00
BeagleBoardPkg BeagleBoardPkg: Convert to build FatPkg from source 2016-04-07 20:45:39 +02:00
Conf EDK II: Add .gitignore 2014-10-14 16:08:15 +00:00
CorebootModulePkg CorebootModulePkg: Remove unused PCI non-enumeration drivers 2016-05-27 14:26:16 -07:00
CorebootPayloadPkg CorebootModulePkg/PciHostBridgeLib: Fix PCI 64bit memory BAR size issue 2016-05-27 14:28:37 -07:00
CryptoPkg MdePkg CryptoPkg EdkCompatibilityPkg: retire NO_BUILTIN_VA_FUNCS define 2016-07-21 13:32:09 +02:00
DuetPkg DuetPkg FSVariable: return error for empty str VariableName to GetVariable 2016-05-15 17:48:53 +08:00
EdkCompatibilityPkg EdkCompatibilityPkg: Fix GCC build failure 2016-08-01 12:44:44 +08:00
EdkShellBinPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
EdkShellPkg */Contributions.txt: Update example email address 2015-02-03 17:29:14 +00:00
EmbeddedPkg EmbeddedPkg/AcpiLib: add GICC table init macro for ACPI 6.0 2016-07-06 10:51:38 +02:00
EmulatorPkg BaseTools GCC: use 'gcc' as the linker command for GCC44 and later 2016-08-02 08:40:43 +02:00
FatBinPkg FatBinPkg: Change to 2-clause BSD license 2016-04-22 00:55:21 -07:00
FatPkg FatPkg: Add Contributions.txt 2016-04-22 00:55:21 -07:00
IntelFrameworkModulePkg IntelFrameworkModulePkg BdsDxe: Use definition in IndustryStandard/Smbios.h 2016-07-29 10:10:55 +08:00
IntelFrameworkPkg IntelFrameworkPkg/FrameworkUefiLib: implement EfiEventGroupSignal 2016-03-23 12:05:45 +01:00
IntelFsp2Pkg IntelFsp2Pkg: Skip loading Microcode if MicrocodeCodeSize is zero 2016-07-27 09:08:43 +08:00
IntelFsp2WrapperPkg IntelFsp2WrapperPkg: Add missing License.txt. 2016-07-26 10:52:04 +08:00
IntelFspPkg IntelFspPkg: Add missing License.txt. 2016-07-26 10:52:05 +08:00
IntelFspWrapperPkg IntelFspWrapperPkg: Add missing License.txt. 2016-07-26 10:52:06 +08:00
IntelSiliconPkg IntelSiliconPkg/IgdOpRegion: Add definition for Intel IGD 2016-06-16 08:42:44 +08:00
MdeModulePkg MdeModulePkg: Add new LoadFileOnFv2 in Package DSC for Build 2016-08-01 12:58:33 +08:00
MdePkg BaseTools GCC: introduce GCC5 toolchain to support GCC v5.x in LTO mode 2016-08-02 10:54:11 +02:00
NetworkPkg NetworkPkg: Add missed character in copyright. 2016-08-01 10:21:04 +08:00
Nt32Pkg Nt32Pkg: Make Shell as the first boot option 2016-08-01 12:58:43 +08:00
Omap35xxPkg Omap35xxPkg: drop CpuExceptionHandlerLib library class resolution 2016-03-17 09:15:11 +01:00
OptionRomPkg OptionRomPkg: Fix typos in comments 2016-07-11 10:29:47 +08:00
OvmfPkg OvmfPkg/Sec: Support SECTION2 DXEFV types 2016-07-27 15:41:19 +02:00
PcAtChipsetPkg PcAtChipsetPkg/PcRtc: Fix a NULL pointer deference issue 2016-07-27 10:27:16 +08:00
PerformancePkg PerformancePkg: Replace UnicodeStrToAsciiStr/AsciiStrToUnicodeStr 2016-06-21 12:46:25 +08:00
QuarkPlatformPkg QuarkPlatformPkg: fix ASSERT_EFI_ERROR() typos 2016-06-30 13:08:14 +02:00
QuarkSocPkg QuarkSocPkg/SmmCpuFeaturesLib: Add SMRR PhysBase/PhysMask fields check 2016-05-19 10:04:34 -07:00
SecurityPkg SecurityPkg: AuthVariableLib: Revert UserPhysicalPresent feature from AuthVariableLib 2016-07-22 09:48:00 +08:00
ShellBinPkg ShellBinPkg: Ia32/X64 Shell binary update. 2016-07-29 10:44:17 +08:00
ShellPkg ShellPkg: Unregister hotkey callback when exiting Shell 2016-07-29 09:52:40 +08:00
SourceLevelDebugPkg SourceLevelDebugPkg DebugAgentLib: Add nasm source file into LIB INF files. 2016-06-28 09:52:25 +08:00
StdLib StdLib: Series of patches to fix typos - availabe to available 2016-07-07 15:23:19 -07:00
StdLibPrivateInternalFiles StdLib: Clarify and improve comments. 2016-01-06 00:31:42 +00:00
UefiCpuPkg UefiCpuPkg/PiSmmCpuDxeSmm: SMM_CPU_DATA_BLOCK is not cleared 2016-07-20 18:50:53 -07:00
UnixPkg UnixPkg: Remove UnixPkg files (It is replaced by EmulatorPkg) 2013-07-29 21:09:55 +00:00
Vlv2DeviceRefCodePkg Vlv2DeviceRefCodePkg&Vlv2DevicePkg:Add sample WSMT table. 2016-07-31 11:59:54 +08:00
Vlv2TbltDevicePkg Vlv2DeviceRefCodePkg&Vlv2DevicePkg:Add sample WSMT table. 2016-07-31 11:59:54 +08:00
.gitignore EDK II: Add .gitignore 2014-10-14 16:08:15 +00:00
BuildNotes2.txt BaseTools: Updated BuildNotes URLs 2016-03-25 09:46:44 +08:00
Edk2Setup.bat BaseTools: Update Edk2Setup.bat to support multiple workspaces 2015-10-08 09:29:36 +00:00
Maintainers.txt Change ShellPkg&ShellBinPkg maintainer 2016-07-06 08:05:21 -07:00
edksetup.bat Update edksetup.bat to check NASM system environment variable 2016-07-26 10:16:48 +08:00
edksetup.sh BaseTools: Update edksetup.sh to support multiple workspaces 2015-10-08 09:29:56 +00:00