2017-02-13 12:46:28 +00:00
|
|
|
/*
|
2019-05-29 05:03:58 +01:00
|
|
|
* Copyright (c) 2017-2019, ARM Limited and Contributors. All rights reserved.
|
2017-02-13 12:46:28 +00:00
|
|
|
*
|
2017-05-03 09:38:09 +01:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
2017-02-13 12:46:28 +00:00
|
|
|
*/
|
|
|
|
|
2018-11-08 10:20:19 +00:00
|
|
|
#ifndef PARAM_HEADER_H
|
|
|
|
#define PARAM_HEADER_H
|
2017-02-13 12:46:28 +00:00
|
|
|
|
2018-08-21 14:14:31 +01:00
|
|
|
#include <stdbool.h>
|
2018-12-14 00:18:21 +00:00
|
|
|
|
2019-07-09 21:49:11 +01:00
|
|
|
#ifndef __ASSEMBLER__
|
2019-05-29 05:03:58 +01:00
|
|
|
#include <stdint.h>
|
2019-07-09 21:49:11 +01:00
|
|
|
#endif /*__ASSEMBLER__*/
|
2018-08-21 14:14:31 +01:00
|
|
|
|
2019-05-29 05:03:58 +01:00
|
|
|
#include <export/common/param_header_exp.h>
|
2017-02-13 12:46:28 +00:00
|
|
|
|
2019-05-29 05:03:58 +01:00
|
|
|
#define VERSION_1 PARAM_VERSION_1
|
|
|
|
#define VERSION_2 PARAM_VERSION_2
|
2017-02-13 12:46:28 +00:00
|
|
|
|
|
|
|
#define SET_PARAM_HEAD(_p, _type, _ver, _attr) do { \
|
|
|
|
(_p)->h.type = (uint8_t)(_type); \
|
|
|
|
(_p)->h.version = (uint8_t)(_ver); \
|
2018-08-02 10:14:12 +01:00
|
|
|
(_p)->h.size = (uint16_t)sizeof(*(_p)); \
|
2017-02-13 12:46:28 +00:00
|
|
|
(_p)->h.attr = (uint32_t)(_attr) ; \
|
2018-08-21 14:14:31 +01:00
|
|
|
} while (false)
|
2017-02-13 12:46:28 +00:00
|
|
|
|
|
|
|
/* Following is used for populating structure members statically. */
|
|
|
|
#define SET_STATIC_PARAM_HEAD(_p, _type, _ver, _p_type, _attr) \
|
|
|
|
._p.h.type = (uint8_t)(_type), \
|
|
|
|
._p.h.version = (uint8_t)(_ver), \
|
|
|
|
._p.h.size = (uint16_t)sizeof(_p_type), \
|
|
|
|
._p.h.attr = (uint32_t)(_attr)
|
|
|
|
|
2018-11-08 10:20:19 +00:00
|
|
|
#endif /* PARAM_HEADER_H */
|