linux/arch/arm/include/asm
Ard Biesheuvel 138728dd4e efi/arm-stub: Correct FDT and initrd allocation rules for arm64
On arm64, we have made some changes over the past year to the way the
kernel itself is allocated and to how it deals with the initrd and FDT.
This patch brings the allocation logic in the EFI stub in line with that,
which is necessary because the introduction of KASLR has created the
possibility for the initrd to be allocated in a place where the kernel
may not be able to map it. (This is mostly a theoretical scenario, since
it only affects systems where the physical memory footprint exceeds the
size of the linear mapping.)

Since we know the kernel itself will be covered by the linear mapping,
choose a suitably sized window (i.e., based on the size of the linear
region) covering the kernel when allocating memory for the initrd.

The FDT may be anywhere in memory on arm64 now that we map it via the
fixmap, so we can lift the address restriction there completely.

Tested-by: Richard Ruigrok <rruigrok@codeaurora.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Jeffrey Hugo <jhugo@codeaurora.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/20170404160245.27812-4-ard.biesheuvel@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-04-05 12:27:23 +02:00
..
hardware ARM: 8651/1: cache-uniphier: include <linux/errno.h> instead of <linux/types.h> 2017-02-28 11:06:16 +00:00
mach scripts/spelling.txt: add "partiton" pattern and fix typo instances 2017-02-27 18:43:46 -08:00
xen arm/arm64: xen: Move shared architecture headers to include/xen/arm 2016-12-02 11:49:55 -08:00
arch_gicv3.h ARM: gic-v3-its: Add 32bit support to GICv3 ITS 2016-11-29 09:14:48 +00:00
arch_timer.h clocksource: arch_timer: Fix code to use physical timers when requested 2014-12-04 23:30:26 -08:00
arm-cci.h arm-cci: Get rid of secure transactions for PMU driver 2015-03-27 13:44:35 +00:00
asm-offsets.h
assembler.h ARM: 8605/1: V7M: fix notrace variant of save_and_disable_irqs 2016-09-06 15:51:07 +01:00
atomic.h locking/atomic: Remove linux/atomic.h:atomic_fetch_or() 2016-06-16 10:48:32 +02:00
auxvec.h ARM: 8329/1: miscellaneous vdso infrastructure, preparation 2015-03-27 22:20:45 +00:00
barrier.h ARM: 8582/1: remove unused CONFIG_ARCH_HAS_BARRIERS 2016-07-02 11:01:08 +01:00
bitops.h ARM: 8417/1: refactor bitops functions with BIT_MASK() and BIT_WORD() 2015-08-18 14:00:30 +01:00
bitrev.h ARM: 8287/1: add bitrev.h file to support rbit instruction 2015-01-16 14:06:18 +00:00
bL_switcher.h ARM: bL_switcher: Add query interface to discover CPU affinities 2013-09-23 18:47:31 -04:00
bug.h ARM: 8455/1: define __BUG as asm(BUG_INSTR) without CONFIG_BUG 2015-12-03 00:02:29 +00:00
bugs.h
cache.h
cacheflush.h arch: Rename CONFIG_DEBUG_RODATA and CONFIG_DEBUG_MODULE_RONX 2017-02-07 12:32:52 -08:00
cachetype.h ARM: 8604/1: V7M: Add support for reading the CTR with read_cpuid_cachetype() 2016-09-06 15:51:07 +01:00
checksum.h ipv6: Pass proto to csum_ipv6_magic as __u8 instead of unsigned short 2016-03-13 23:55:13 -04:00
clocksource.h arm/arm64: arch_timer: Use archdata to indicate vdso suitability 2016-09-23 17:19:25 +01:00
cmpxchg.h ARM: 8443/1: Adding support for atomic half word exchange 2015-10-09 16:22:54 +01:00
compiler.h ARM: 8300/1: teach __asmeq that r11 == fp and r12 == ip 2015-02-10 10:23:11 +00:00
cp15.h ARM: Move system register accessors to asm/cp15.h 2016-09-22 13:22:10 +02:00
cpu.h
cpuidle.h ARM: cpuidle: add const qualifier to cpuidle_ops member in structures 2016-04-20 06:59:10 +02:00
cputype.h ARM: 8634/1: hw_breakpoint: blacklist Scorpion CPUs 2017-01-10 23:32:26 +00:00
cti.h
dcc.h ARM: tty: Move HVC DCC assembly to arch/arm 2014-05-28 13:33:18 -07:00
delay.h ARM: 8619/1: udelay: document the various constants 2016-10-19 10:52:36 +01:00
device.h treewide: Move dma_ops from struct dev_archdata into struct device 2017-01-24 12:23:35 -05:00
div64.h ARM: 8504/1: __arch_xprod_64(): small optimization 2016-02-11 15:33:37 +00:00
dma-contiguous.h
dma-iommu.h ARM: 8347/1: dma-mapping: fix off-by-one check in arm_setup_iommu_dma_ops 2015-05-03 23:21:55 +01:00
dma-mapping.h treewide: Consolidate get_dma_ops() implementations 2017-01-24 12:23:35 -05:00
dma.h remove <asm/scatterlist.h> 2015-05-05 13:35:39 -06:00
domain.h ARM: 8573/1: domain: move {set,get}_domain under config guard 2016-05-05 19:03:02 +01:00
ecard.h
edac.h EDAC: Cleanup atomic_scrub mess 2015-05-28 15:31:53 +02:00
efi.h efi/arm-stub: Correct FDT and initrd allocation rules for arm64 2017-04-05 12:27:23 +02:00
elf.h Merge branch 'for-linus' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-04-14 21:03:26 -07:00
entry-macro-multi.S ARM: replace BSYM() with badr assembly macro 2015-05-08 17:33:50 +01:00
exception.h arch, ftrace: for KASAN put hard/soft IRQ entries into separate sections 2016-03-25 16:37:42 -07:00
fb.h
fiq.h
firmware.h ARM: EXYNOS: add exynos_get_boot_addr() helper 2015-06-06 02:17:56 +09:00
fixmap.h ARM: add support for generic early_ioremap/early_memremap 2015-12-13 19:18:28 +01:00
flat.h ARM: 8594/1: enable binfmt_flat on systems with an MMU 2016-08-12 16:47:05 +01:00
floppy.h ARM: 8584/1: floppy: avoid gcc-6 warning 2016-07-02 11:02:13 +01:00
fncpy.h
fpstate.h
ftrace.h ARM: 8632/1: ftrace: fix syscall name matching 2017-01-10 23:32:25 +00:00
futex.h ARM: uaccess: provide uaccess_save_and_enable() and uaccess_restore() 2015-08-25 16:14:43 +01:00
glue-cache.h ARM: 8607/1: V7M: Wire up caches for V7M processors with cache support. 2016-09-06 15:51:08 +01:00
glue-df.h ARM: 8065/1: remove last use of CONFIG_CPU_ARM710 2014-05-30 01:12:30 +01:00
glue-pf.h
glue-proc.h ARM: 8103/1: save/restore Cortex-A9 CP15 registers on suspend/resume 2014-07-18 12:29:37 +01:00
glue.h
gpio.h ARM: delete old reference to ARM_GPIOLIB_COMPLEX 2014-06-30 21:37:39 +02:00
hardirq.h ARM: 8487/1: Remove IPI_CALL_FUNC_SINGLE 2015-12-22 12:09:43 +00:00
highmem.h kmap_atomic_to_page() has no users, remove it 2015-11-09 15:11:24 -08:00
hugetlb-3level.h
hugetlb.h mm/hugetlb: remove arch_prepare/release_hugepage from arch headers 2015-06-25 17:00:35 -07:00
hw_breakpoint.h ARM: 8598/1: remove traces of perf_ops_bp 2016-08-23 10:09:23 +01:00
hw_irq.h ARM: Remove ununsed set_irq_flags 2015-09-16 16:53:39 +02:00
hwcap.h ARM: 7981/1: add support for AT_HWCAP2 ELF auxv entry 2014-02-25 11:40:48 +00:00
hypervisor.h
ide.h
idmap.h
insn.h ARM: kprobes: enable OPTPROBES for ARM 32 2015-01-13 16:10:17 +00:00
io.h arm, arm64: don't include blk_types.h in <asm/io.h> 2016-11-01 09:43:26 -06:00
irq_work.h arm: Tell irq work about self IPI support 2014-09-13 18:38:39 +02:00
irq.h nmi_backtrace: add more trigger_*_cpu_backtrace() methods 2016-10-07 18:46:30 -07:00
irqflags.h ARM: 8422/1: enable imprecise aborts during early kernel startup 2015-09-22 08:13:56 +01:00
jump_label.h locking/static_keys: Add a new static_key interface 2015-08-03 11:34:15 +02:00
Kbuild sched/cputime: Remove generic asm headers 2017-02-01 09:14:07 +01:00
kexec.h ARM: kexec: fix kexec for Keystone 2 2016-08-02 19:35:29 -04:00
kgdb.h ARM: kdgb: use <asm/opcodes.h> for data to be assembled as intruction 2013-10-19 20:46:35 +01:00
kmap_types.h
kprobes.h kprobes: move kprobe declarations to asm-generic/kprobes.h 2017-02-27 18:43:45 -08:00
kvm_arm.h arm: KVM: Survive unknown traps from guests 2017-03-07 14:50:45 +00:00
kvm_asm.h arm/arm64: KVM: Perform local TLB invalidation when multiplexing vcpus on a single CPU 2016-11-04 17:56:28 +00:00
kvm_coproc.h
kvm_emulate.h arm: KVM: Add Virtual Abort injection helper 2016-09-08 12:53:00 +02:00
kvm_host.h KVM: arm/arm64: Remove KVM_PRIVATE_MEM_SLOTS definition that are unused 2017-03-09 09:13:45 +00:00
kvm_hyp.h arm/arm64: KVM: Perform local TLB invalidation when multiplexing vcpus on a single CPU 2016-11-04 17:56:28 +00:00
kvm_mmio.h KVM: arm/arm64: Export mmio_read/write_bus 2016-05-20 15:39:42 +02:00
kvm_mmu.h arm/arm64: KVM: Stop propagating cacheability status of a faulted page 2017-01-30 13:47:38 +00:00
kvm_psci.h ARM/ARM64: KVM: Make kvm_psci_call() return convention more flexible 2014-04-30 04:18:57 -07:00
limits.h
linkage.h
mc146818rtc.h
mcpm.h ARM: MCPM: remove residency argument from mcpm_cpu_suspend() 2015-05-06 11:47:10 -04:00
mcs_spinlock.h ARM: 8098/1: mcs lock: implement wfe-based polling for MCS locking 2014-07-18 12:29:35 +01:00
memblock.h ARM: 8025/1: Get rid of meminfo 2014-06-01 01:17:12 +01:00
memory.h ARM: 8648/2: nommu: display vectors base 2017-02-28 11:06:14 +00:00
mmu_context.h sched/headers: Prepare to remove the <linux/mm_types.h> dependency from <linux/sched.h> 2017-03-02 08:42:37 +01:00
mmu.h ARM: 8329/1: miscellaneous vdso infrastructure, preparation 2015-03-27 22:20:45 +00:00
module.h ARM: kernel: merge core and init PLTs 2016-08-30 17:45:34 +01:00
mpu.h
mtd-xip.h
neon.h
nwflash.h
opcodes-sec.h
opcodes-virt.h
opcodes.h
outercache.h ARM: move heavy barrier support out of line 2015-07-25 15:28:05 +01:00
page-nommu.h asm-generic: page.h: Remove useless get_user_page and free_user_page 2016-02-26 15:24:55 +01:00
page.h
paravirt.h arm: introduce CONFIG_PARAVIRT, PARAVIRT_TIME_ACCOUNTING and pv_time_ops 2015-12-21 14:40:54 +00:00
patch.h ARM: probes: move all probe code to dedicate directory 2015-01-09 09:36:50 +00:00
pci.h PCI: Move pci_dma_* helpers to common code 2016-03-07 10:40:02 -06:00
percpu.h ARM: 8174/1: Use global stack register variable for percpu 2014-11-13 23:58:06 +00:00
perf_event.h arm: perf: Fix callchain parse error with kernel tracepoint events 2015-05-27 16:12:05 +01:00
pgalloc.h arm: get rid of superfluous __GFP_REPEAT 2016-07-26 16:19:19 -07:00
pgtable-2level-hwdef.h ARM: 8612/1: LPAE: initialize cache policy correctly 2016-09-12 12:12:30 +01:00
pgtable-2level-types.h
pgtable-2level.h ARM: 8578/1: mm: ensure pmd_present only checks the valid bit 2016-06-09 17:51:47 +01:00
pgtable-3level-hwdef.h ARM: 8612/1: LPAE: initialize cache policy correctly 2016-09-12 12:12:30 +01:00
pgtable-3level-types.h
pgtable-3level.h ARM: 8579/1: mm: Fix definition of pmd_mknotpresent 2016-06-09 17:51:47 +01:00
pgtable-hwdef.h
pgtable-nommu.h ARM: 8655/1: improve NOMMU definition of pgprot_*() 2017-02-28 11:06:19 +00:00
pgtable.h arch, mm: convert all architectures to use 5level-fixup.h 2017-03-09 11:48:47 -08:00
probes.h ARM: optprobes: execute instruction during restoring if possible. 2015-01-14 12:24:52 +00:00
proc-fns.h ARM: redo TTBR setup code for LPAE 2015-06-01 23:48:19 +01:00
processor.h locking/core: Provide common cpu_relax_yield() definition 2016-11-17 08:17:36 +01:00
procinfo.h
prom.h of/fdt: move memreserve and dtb memory reservations into core 2014-04-30 00:59:17 -05:00
psci.h ARM: SoC cleanups for v4.5 2016-01-20 17:55:20 -08:00
ptrace.h ARM: save and reset the address limit when entering an exception 2016-07-07 16:01:01 +01:00
sections.h ARM: 8518/1: Use correct symbols for XIP_KERNEL 2016-02-11 15:43:14 +00:00
setup.h ARM: 8495/1: ATAGS: move save_atags() to arch/arm/include/asm/setup.h 2016-01-04 11:26:00 +00:00
shmparam.h
signal.h
smp_plat.h ARM: 8392/3: smp: Only expose /sys/.../cpuX/online if hotpluggable 2015-07-31 18:58:30 +01:00
smp_scu.h ARM: make it easier to check the CPU part number correctly 2014-07-18 12:29:02 +01:00
smp_twd.h
smp.h ARM: 8423/1: add const qualifier to smp_operations member in structures 2015-09-22 08:13:57 +01:00
sparsemem.h ARM: 8411/1: Add default SPARSEMEM settings 2016-02-16 16:35:21 +00:00
spinlock_types.h ARM: locks: prefetch the destination word for write prior to strex 2013-09-30 16:42:55 +01:00
spinlock.h locking/spinlock, arch: Update and fix spin_unlock_wait() implementations 2016-06-14 11:55:15 +02:00
stackprotector.h
stacktrace.h ARM: 8070/1: Introduce arm_get_current_stack_frame() 2014-07-18 12:29:11 +01:00
stage2_pgtable.h kvm-arm: arm32: Introduce stage2 page table helpers 2016-04-21 14:57:26 +02:00
string.h
suspend.h ARM: 8389/1: Add cpu_resume_arm() for firmwares that resume in ARM state 2015-06-12 21:17:17 +01:00
swab.h
switch_to.h sched, arm: Remove finish_arch_switch() 2015-08-04 09:37:52 +02:00
sync_bitops.h ARM: 7989/1: Delete asm/system.h 2014-02-25 11:33:37 +00:00
syscall.h ARM: 8152/1: Convert pr_warning to pr_warn 2014-09-26 14:39:53 +01:00
system_info.h ARM: 8355/1: arch: Show the serial number from devicetree in cpuinfo 2015-05-08 10:42:35 +01:00
system_misc.h
tcm.h
therm.h
thread_info.h Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm 2015-09-14 12:24:10 -07:00
thread_notify.h
timex.h ARM: drop <mach/timex.h> for !ARCH_MULTIPLATFORM, too 2013-12-20 17:17:16 +01:00
tlb.h mm: remove the page size change check in tlb_remove_page 2016-12-12 18:55:07 -08:00
tlbflush.h sched/headers: Prepare to remove the <linux/mm_types.h> dependency from <linux/sched.h> 2017-03-02 08:42:37 +01:00
tls.h ARM: 8178/1: fix set_tls for !CONFIG_KUSER_HELPERS 2014-09-30 16:55:23 +01:00
topology.h sched/topology: Rename topology_thread_cpumask() to topology_sibling_cpumask() 2015-05-27 15:22:15 +02:00
traps.h
trusted_foundations.h treewide: remove redundant #include <linux/kconfig.h> 2016-10-11 15:06:33 -07:00
uaccess.h ARM: 8657/1: uaccess: consistently check object sizes 2017-02-16 15:58:31 +00:00
ucontext.h
unified.h ARM: replace BSYM() with badr assembly macro 2015-05-08 17:33:50 +01:00
unistd.h ARM: wire up new pkey syscalls 2016-10-19 10:18:47 +01:00
unwind.h
uprobes.h ARM: add uprobes support 2014-03-18 16:39:40 -04:00
user.h
v7m.h ARM: 8603/1: V7M: Add addresses for mem-mapped V7M cache operations 2016-09-06 15:51:06 +01:00
vdso_datapage.h ARM: 8329/1: miscellaneous vdso infrastructure, preparation 2015-03-27 22:20:45 +00:00
vdso.h ARM: 8329/1: miscellaneous vdso infrastructure, preparation 2015-03-27 22:20:45 +00:00
vfp.h ARM: vfp: Add vfp_disable for problematic platforms 2015-05-20 15:07:00 -07:00
vfpmacros.h
vga.h
virt.h KVM: arm64: Access CNTHCTL_EL2 bit fields correctly on VHE systems 2017-01-13 11:19:25 +00:00
word-at-a-time.h ARM: 8322/1: keep .text and .fixup regions closer together 2015-03-29 23:11:56 +01:00
xor.h