xref: /arm-trusted-firmware/include/lib/bl_aux_params/bl_aux_params.h (revision 91f16700b400a8c0651d24a598fc48ee2997a0d7)
1*91f16700Schasinglulu /*
2*91f16700Schasinglulu  * Copyright (c) 2019, Arm Limited and Contributors. All rights reserved.
3*91f16700Schasinglulu  *
4*91f16700Schasinglulu  * SPDX-License-Identifier: BSD-3-Clause
5*91f16700Schasinglulu  */
6*91f16700Schasinglulu #ifndef LIB_BL_AUX_PARAMS_H
7*91f16700Schasinglulu #define LIB_BL_AUX_PARAMS_H
8*91f16700Schasinglulu 
9*91f16700Schasinglulu #include <stdbool.h>
10*91f16700Schasinglulu #include <stdint.h>
11*91f16700Schasinglulu 
12*91f16700Schasinglulu #include <export/lib/bl_aux_params/bl_aux_params_exp.h>
13*91f16700Schasinglulu 
14*91f16700Schasinglulu /*
15*91f16700Schasinglulu  * Handler function that handles an individual aux parameter. Return true if
16*91f16700Schasinglulu  * the parameter was handled, and false if bl_aux_params_parse() should make its
17*91f16700Schasinglulu  * own attempt at handling it (for generic parameters).
18*91f16700Schasinglulu  */
19*91f16700Schasinglulu typedef bool (*bl_aux_param_handler_t)(struct bl_aux_param_header *param);
20*91f16700Schasinglulu 
21*91f16700Schasinglulu /*
22*91f16700Schasinglulu  * Interprets head as the start of an aux parameter list, and passes the
23*91f16700Schasinglulu  * parameters individually to handler(). Handles generic parameters directly if
24*91f16700Schasinglulu  * handler() hasn't already done so. If only generic parameters are expected,
25*91f16700Schasinglulu  * handler() can be NULL.
26*91f16700Schasinglulu  */
27*91f16700Schasinglulu void bl_aux_params_parse(u_register_t head,
28*91f16700Schasinglulu 			 bl_aux_param_handler_t handler);
29*91f16700Schasinglulu 
30*91f16700Schasinglulu #endif /* LIB_BL_AUX_PARAMS_H */
31