2 * This is the analog to the kexec "purgatory" code
4 * The goal here is to call the actual kernel entry point with the arguments it
5 * expects when kexec calls into it with no arguments. The value of the kernel
6 * entry point and arguments r3-r7 are copied into the trampoline text (which
7 * can be executed from any address) at bytes 8-32. kexec begins execution
8 * of APs at 0x60 bytes past the entry point, executing in a copy relocated
9 * to the absolute address 0x60. Here we implement a loop waiting on the release
10 * of a lock by the kernel at 0x40.
15 #include <machine/asm.h>
17 .globl CNAME(kerneltramp),CNAME(szkerneltramp)
21 .space 24 /* branch address, r3-r7 */
23 . = kerneltramp + 0x40 /* AP spinlock */
26 . = kerneltramp + 0x60 /* AP entry point */
32 /* Jump into CPU reset */
39 2: /* Continuation of kerneltramp */
55 .long endkerneltramp - CNAME(kerneltramp)