arm64: split cpu.c
[coreboot.git] / src / arch / arm64 / spintable_asm.S
blob3066b7e679954d51e95d7a67fafc2584dfe8743a
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright 2014 Google Inc.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18  */
20 #include <arch/asm.h>
22 ENTRY(__wait_for_spin_table_request)
23         /* Entry here is in EL2 with the magic address in x0. */
24         mov     x28, x0
26         ldr     x27, [x28]
27         cmp     x27, xzr
28         b.ne    2f
29         wfe
30         b       1b
32         /* Entry into the kernel. */
33         mov     x0, xzr
34         mov     x1, xzr
35         mov     x2, xzr
36         mov     x3, xzr
37         br      x27
38 ENDPROC(__wait_for_spin_table_request)