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