2012-04-20 21:45:54 +08:00
|
|
|
#
|
|
|
|
# Makefile for the linux kernel.
|
|
|
|
#
|
|
|
|
|
|
|
|
CPPFLAGS_vmlinux.lds := -DTEXT_OFFSET=$(TEXT_OFFSET)
|
|
|
|
AFLAGS_head.o := -DTEXT_OFFSET=$(TEXT_OFFSET)
|
2014-11-18 19:41:27 +08:00
|
|
|
CFLAGS_armv8_deprecated.o := -I$(src)
|
2012-04-20 21:45:54 +08:00
|
|
|
|
2014-04-30 17:54:33 +08:00
|
|
|
CFLAGS_REMOVE_ftrace.o = -pg
|
|
|
|
CFLAGS_REMOVE_insn.o = -pg
|
2014-04-30 17:54:35 +08:00
|
|
|
CFLAGS_REMOVE_return_address.o = -pg
|
2014-04-30 17:54:33 +08:00
|
|
|
|
2012-04-20 21:45:54 +08:00
|
|
|
# Object file lists.
|
2015-03-18 22:55:20 +08:00
|
|
|
arm64-obj-y := debug-monitors.o entry.o irq.o fpsimd.o \
|
2012-04-20 21:45:54 +08:00
|
|
|
entry-fpsimd.o process.o ptrace.o setup.o signal.o \
|
2012-10-20 00:46:27 +08:00
|
|
|
sys.o stacktrace.o time.o traps.o io.o vdso.o \
|
2016-01-04 22:46:47 +08:00
|
|
|
hyp-stub.o psci.o cpu_ops.o insn.o \
|
2015-02-25 20:10:35 +08:00
|
|
|
return_address.o cpuinfo.o cpu_errata.o \
|
2015-05-30 01:28:44 +08:00
|
|
|
cpufeature.o alternative.o cacheinfo.o \
|
2016-01-04 22:44:32 +08:00
|
|
|
smp.o smp_spin_table.o topology.o smccc-call.o
|
2012-04-20 21:45:54 +08:00
|
|
|
|
2015-10-23 22:48:14 +08:00
|
|
|
extra-$(CONFIG_EFI) := efi-entry.o
|
2015-10-09 03:02:04 +08:00
|
|
|
|
|
|
|
OBJCOPYFLAGS := --prefix-symbols=__efistub_
|
|
|
|
$(obj)/%.stub.o: $(obj)/%.o FORCE
|
|
|
|
$(call if_changed,objcopy)
|
|
|
|
|
2012-04-20 21:45:54 +08:00
|
|
|
arm64-obj-$(CONFIG_COMPAT) += sys32.o kuser32.o signal32.o \
|
2015-01-07 00:42:32 +08:00
|
|
|
sys_compat.o entry32.o \
|
2014-11-18 19:41:23 +08:00
|
|
|
../../arm/kernel/opcodes.o
|
2014-04-30 17:54:33 +08:00
|
|
|
arm64-obj-$(CONFIG_FUNCTION_TRACER) += ftrace.o entry-ftrace.o
|
2012-04-20 21:45:54 +08:00
|
|
|
arm64-obj-$(CONFIG_MODULES) += arm64ksyms.o module.o
|
2015-11-24 19:37:35 +08:00
|
|
|
arm64-obj-$(CONFIG_ARM64_MODULE_PLTS) += module-plts.o
|
2015-08-24 20:35:51 +08:00
|
|
|
arm64-obj-$(CONFIG_PERF_EVENTS) += perf_regs.o perf_callchain.o
|
|
|
|
arm64-obj-$(CONFIG_HW_PERF_EVENTS) += perf_event.o
|
2014-02-04 02:18:27 +08:00
|
|
|
arm64-obj-$(CONFIG_HAVE_HW_BREAKPOINT) += hw_breakpoint.o
|
2015-01-27 02:33:44 +08:00
|
|
|
arm64-obj-$(CONFIG_CPU_PM) += sleep.o suspend.o
|
2014-07-17 17:30:07 +08:00
|
|
|
arm64-obj-$(CONFIG_CPU_IDLE) += cpuidle.o
|
2014-01-07 22:17:13 +08:00
|
|
|
arm64-obj-$(CONFIG_JUMP_LABEL) += jump_label.o
|
2014-01-28 19:20:18 +08:00
|
|
|
arm64-obj-$(CONFIG_KGDB) += kgdb.o
|
2015-10-23 22:48:14 +08:00
|
|
|
arm64-obj-$(CONFIG_EFI) += efi.o efi-entry.stub.o
|
2014-09-29 22:29:31 +08:00
|
|
|
arm64-obj-$(CONFIG_PCI) += pci.o
|
2014-11-18 19:41:24 +08:00
|
|
|
arm64-obj-$(CONFIG_ARMV8_DEPRECATED) += armv8_deprecated.o
|
ARM64 / ACPI: Get RSDP and ACPI boot-time tables
As we want to get ACPI tables to parse and then use the information
for system initialization, we should get the RSDP (Root System
Description Pointer) first, it then locates Extended Root Description
Table (XSDT) which contains all the 64-bit physical address that
pointer to other boot-time tables.
Introduce acpi.c and its related head file in this patch to provide
fundamental needs of extern variables and functions for ACPI core,
and then get boot-time tables as needed.
- asm/acenv.h for arch specific ACPICA environments and
implementation, It is needed unconditionally by ACPI core;
- asm/acpi.h for arch specific variables and functions needed by
ACPI driver core;
- acpi.c for ARM64 related ACPI implementation for ACPI driver
core;
acpi_boot_table_init() is introduced to get RSDP and boot-time tables,
it will be called in setup_arch() before paging_init(), so we should
use eary_memremap() mechanism here to get the RSDP and all the table
pointers.
FADT Major.Minor version was introduced in ACPI 5.1, it is the same
as ACPI version.
In ACPI 5.1, some major gaps are fixed for ARM, such as updates in
MADT table for GIC and SMP init, without those updates, we can not
get the MPIDR for SMP init, and GICv2/3 related init information, so
we can't boot arm64 ACPI properly with table versions predating 5.1.
If firmware provides ACPI tables with ACPI version less than 5.1,
OS has no way to retrieve the configuration data that is necessary
to init SMP boot protocol and the GIC properly, so disable ACPI if
we get an FADT table with version less that 5.1 when acpi_boot_table_init()
called.
CC: Catalin Marinas <catalin.marinas@arm.com>
CC: Will Deacon <will.deacon@arm.com>
CC: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Tested-by: Yijing Wang <wangyijing@huawei.com>
Tested-by: Mark Langsdorf <mlangsdo@redhat.com>
Tested-by: Jon Masters <jcm@redhat.com>
Tested-by: Timur Tabi <timur@codeaurora.org>
Tested-by: Robert Richter <rrichter@cavium.com>
Acked-by: Robert Richter <rrichter@cavium.com>
Acked-by: Olof Johansson <olof@lixom.net>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Al Stone <al.stone@linaro.org>
Signed-off-by: Graeme Gregory <graeme.gregory@linaro.org>
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
2015-03-24 22:02:37 +08:00
|
|
|
arm64-obj-$(CONFIG_ACPI) += acpi.o
|
2016-01-26 19:10:38 +08:00
|
|
|
arm64-obj-$(CONFIG_ARM64_ACPI_PARKING_PROTOCOL) += acpi_parking_protocol.o
|
2015-11-23 18:33:49 +08:00
|
|
|
arm64-obj-$(CONFIG_PARAVIRT) += paravirt.o
|
arm64: add support for kernel ASLR
This adds support for KASLR is implemented, based on entropy provided by
the bootloader in the /chosen/kaslr-seed DT property. Depending on the size
of the address space (VA_BITS) and the page size, the entropy in the
virtual displacement is up to 13 bits (16k/2 levels) and up to 25 bits (all
4 levels), with the sidenote that displacements that result in the kernel
image straddling a 1GB/32MB/512MB alignment boundary (for 4KB/16KB/64KB
granule kernels, respectively) are not allowed, and will be rounded up to
an acceptable value.
If CONFIG_RANDOMIZE_MODULE_REGION_FULL is enabled, the module region is
randomized independently from the core kernel. This makes it less likely
that the location of core kernel data structures can be determined by an
adversary, but causes all function calls from modules into the core kernel
to be resolved via entries in the module PLTs.
If CONFIG_RANDOMIZE_MODULE_REGION_FULL is not enabled, the module region is
randomized by choosing a page aligned 128 MB region inside the interval
[_etext - 128 MB, _stext + 128 MB). This gives between 10 and 14 bits of
entropy (depending on page size), independently of the kernel randomization,
but still guarantees that modules are within the range of relative branch
and jump instructions (with the caveat that, since the module region is
shared with other uses of the vmalloc area, modules may need to be loaded
further away if the module region is exhausted)
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2016-01-26 21:12:01 +08:00
|
|
|
arm64-obj-$(CONFIG_RANDOMIZE_BASE) += kaslr.o
|
2016-04-28 00:47:12 +08:00
|
|
|
arm64-obj-$(CONFIG_HIBERNATION) += hibernate.o hibernate-asm.o
|
2012-04-20 21:45:54 +08:00
|
|
|
|
|
|
|
obj-y += $(arm64-obj-y) vdso/
|
|
|
|
obj-m += $(arm64-obj-m)
|
|
|
|
head-y := head.o
|
2015-10-09 03:02:04 +08:00
|
|
|
extra-y += $(head-y) vmlinux.lds
|
2012-04-20 21:45:54 +08:00
|
|
|
|
|
|
|
# vDSO - this must be built first to generate the symbol offsets
|
|
|
|
$(call objectify,$(arm64-obj-y)): $(obj)/vdso/vdso-offsets.h
|
|
|
|
$(obj)/vdso/vdso-offsets.h: $(obj)/vdso
|