Angel Pons | 32859fc | 2020-04-02 23:48:27 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* This file is part of the coreboot project. */ |
Nico Huber | e0ed902 | 2016-10-07 12:58:17 +0200 | [diff] [blame] | 3 | |
| 4 | #ifndef _ADAINIT_H |
| 5 | #define _ADAINIT_H |
| 6 | |
| 7 | /** |
| 8 | * @file adainit.h |
| 9 | * |
| 10 | * Ada supports some complex constructs that result in code for runtime |
| 11 | * initialization. It's also possible to have explicit procedures for |
| 12 | * package level initialization (e.g. you can initialize huge arrays in |
| 13 | * a loop instead of cluttering the binary). |
| 14 | * |
Elyes HAOUAS | 8250e2e | 2019-12-06 20:25:56 +0100 | [diff] [blame] | 15 | * When an Ada main() is in charge, GNAT emits the call to the initia- |
Nico Huber | e0ed902 | 2016-10-07 12:58:17 +0200 | [diff] [blame] | 16 | * lizations automatically. When not, we have to call it explicitly. |
| 17 | */ |
| 18 | |
Julius Werner | cd49cce | 2019-03-05 16:53:33 -0800 | [diff] [blame] | 19 | #if CONFIG(RAMSTAGE_ADA) |
Nico Huber | e0ed902 | 2016-10-07 12:58:17 +0200 | [diff] [blame] | 20 | void ramstage_adainit(void); |
| 21 | #else |
| 22 | static inline void ramstage_adainit(void) {} |
| 23 | #endif |
| 24 | |
| 25 | #endif /* _ADAINIT_H */ |