]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-linux/linux.git/commit
arm: keystone2: kexec: convert physical to aliased addresses and back
authorVitaly Andrianov <vitalya@ti.com>
Fri, 1 Aug 2014 14:09:14 +0000 (10:09 -0400)
committerVitaly Andrianov <vitalya@ti.com>
Wed, 21 Jan 2015 13:53:11 +0000 (08:53 -0500)
commit6a7b41529cb59e9647873f44f3febf14ce3d3358
treeace741e517a351493aa812a1a777ffb0e7b91b9b
parent76161fa9b43c9c10a4a41fe7db333e4afd5e5e3f
arm: keystone2: kexec: convert physical to aliased addresses and back

This patch converts physical addresses and pages that are used for kexec
functionality to the corresponding aliased addresses and pages.
It is required because:

- Keystone2 SoC DDR3 addresses are outside the first 4GB of address range.
In order to access the first 4GB of the memory on boot time before
enabling MMU HW provide memory range aliasing (See KS2 TRM for details).
Before rebooting the kernel we need to convert all physical addresses,
which are used by recovery kernel to the corresponding aliased values.

- Before enabling MMU ARM uses 32 bit addresses. Even if we need a real
physical address instead of aliased one, we still convert it to aliased
address in the working kernel and restore back to physical in the recovery
kernel.

- kexec user utility uses 32 bit variables to pass addresses to the
kernel. So, we have to use aliased addresses as well and convert them to
physical in kernel

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
arch/arm/kernel/machine_kexec.c
arch/arm/kernel/setup.c
arch/arm/mach-keystone/include/mach/memory.h
kernel/kexec.c