blob: 041ef677ad7b0e52c6cc7cd67be92f84268ca8a3 [file] [log] [blame]
Angel Pons32859fc2020-04-02 23:48:27 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Nico Hubere0ed9022016-10-07 12:58:17 +02002
3#ifndef _ADAINIT_H
4#define _ADAINIT_H
5
6/**
7 * @file adainit.h
8 *
9 * Ada supports some complex constructs that result in code for runtime
10 * initialization. It's also possible to have explicit procedures for
11 * package level initialization (e.g. you can initialize huge arrays in
12 * a loop instead of cluttering the binary).
13 *
Elyes HAOUAS8250e2e2019-12-06 20:25:56 +010014 * When an Ada main() is in charge, GNAT emits the call to the initia-
Nico Hubere0ed9022016-10-07 12:58:17 +020015 * lizations automatically. When not, we have to call it explicitly.
16 */
17
Jeremy Compostellafa838872022-11-30 19:26:01 -070018#if CONFIG(ROMSTAGE_ADA)
19void romstage_adainit(void);
20#else
21static inline void romstage_adainit(void) {}
22#endif
23
Julius Wernercd49cce2019-03-05 16:53:33 -080024#if CONFIG(RAMSTAGE_ADA)
Nico Hubere0ed9022016-10-07 12:58:17 +020025void ramstage_adainit(void);
26#else
27static inline void ramstage_adainit(void) {}
28#endif
29
30#endif /* _ADAINIT_H */