Nico Huber | e0ed902 | 2016-10-07 12:58:17 +0200 | [diff] [blame] | 1 | /* |
| 2 | * This file is part of the coreboot project. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License as published by |
| 6 | * the Free Software Foundation; version 2 of the License. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | |
| 14 | #ifndef _ADAINIT_H |
| 15 | #define _ADAINIT_H |
| 16 | |
| 17 | /** |
| 18 | * @file adainit.h |
| 19 | * |
| 20 | * Ada supports some complex constructs that result in code for runtime |
| 21 | * initialization. It's also possible to have explicit procedures for |
| 22 | * package level initialization (e.g. you can initialize huge arrays in |
| 23 | * a loop instead of cluttering the binary). |
| 24 | * |
| 25 | * When an Ada main() is in charge, GNAT emmits the call to the initia- |
| 26 | * lizations automatically. When not, we have to call it explicitly. |
| 27 | */ |
| 28 | |
| 29 | #if IS_ENABLED(CONFIG_RAMSTAGE_ADA) |
| 30 | void ramstage_adainit(void); |
| 31 | #else |
| 32 | static inline void ramstage_adainit(void) {} |
| 33 | #endif |
| 34 | |
| 35 | #endif /* _ADAINIT_H */ |