Aaron Durbin | 5add435 | 2014-09-17 11:43:20 -0500 | [diff] [blame] | 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 |
Patrick Georgi | b890a12 | 2015-03-26 15:17:45 +0100 | [diff] [blame] | 17 | * Foundation, Inc. |
Aaron Durbin | 5add435 | 2014-09-17 11:43:20 -0500 | [diff] [blame] | 18 | */ |
| 19 | |
| 20 | #include <arch/asm.h> |
| 21 | |
| 22 | ENTRY(__wait_for_spin_table_request) |
| 23 | /* Entry here is in EL2 with the magic address in x0. */ |
| 24 | mov x28, x0 |
| 25 | 1: |
| 26 | ldr x27, [x28] |
| 27 | cmp x27, xzr |
| 28 | b.ne 2f |
| 29 | wfe |
| 30 | b 1b |
| 31 | 2: |
| 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) |