2 * Jailhouse, a Linux-based partitioning hypervisor
4 * Copyright (c) Siemens AG, 2013
7 * Jan Kiszka <jan.kiszka@siemens.com>
9 * This work is licensed under the terms of the GNU GPL, version 2. See
10 * the COPYING file in the top-level directory.
14 #include <asm/percpu.h>
16 /* Entry point for Linux loader module on JAILHOUSE_ENABLE */
25 lsl r4, #PERCPU_SIZE_SHIFT
27 * percpu data = pool + cpuid * shift
28 * TODO: handle aff1 and aff2
31 add r4, r1, #PERCPU_LINUX_SP
35 * r4 is used so that they can be easily retrieved on failure.
43 add sp, #PERCPU_STACK_END
45 * Keep some space for a struct registers, in case setup fails and needs
46 * to return to the driver through the arch_shutdown_self path.
48 sub sp, #((NUM_USR_REGS + 1) * 4)
49 /* Call entry(cpuid, struct per_cpu*) */
53 * entry only returns here when there is an error before setting up EL2
60 /* Keep the return value in r0 */
65 .globl bootstrap_vectors
79 * Load the physical values of lr and sp, and continue execution at EL2.