xref: /aosp_15_r20/external/coreboot/src/include/adainit.h (revision b9411a12aaaa7e1e6a6fb7c5e057f44ee179a49c)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
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  *
14  * When an Ada main() is in charge, GNAT emits the call to the initia-
15  * lizations automatically. When not, we have to call it explicitly.
16  */
17 
18 #if CONFIG(ROMSTAGE_ADA)
19 void romstage_adainit(void);
20 #else
romstage_adainit(void)21 static inline void romstage_adainit(void) {}
22 #endif
23 
24 #if CONFIG(RAMSTAGE_ADA)
25 void ramstage_adainit(void);
26 #else
ramstage_adainit(void)27 static inline void ramstage_adainit(void) {}
28 #endif
29 
30 #endif /* _ADAINIT_H */
31