diff options
author | davidcunado-arm <david.cunado@arm.com> | 2018-01-24 14:31:53 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-24 14:31:53 +0000 |
commit | 040f1e6987ab78ce459a96137a92cb985c16a136 (patch) | |
tree | 4ac8cf8073f03180de5b04373302518727a03490 /include/drivers/console_assertions.h | |
parent | d2184052ec9f7055e666885d2e9f1c563bdd8d93 (diff) | |
parent | 1c5f5031f38ed77688298d419727a6f0930e0673 (diff) | |
download | platform_external_arm-trusted-firmware-040f1e6987ab78ce459a96137a92cb985c16a136.tar.gz platform_external_arm-trusted-firmware-040f1e6987ab78ce459a96137a92cb985c16a136.tar.bz2 platform_external_arm-trusted-firmware-040f1e6987ab78ce459a96137a92cb985c16a136.zip |
Merge pull request #1193 from jwerner-chromium/JW_coreboot
New console API and coreboot support [v4]
Diffstat (limited to 'include/drivers/console_assertions.h')
-rw-r--r-- | include/drivers/console_assertions.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/include/drivers/console_assertions.h b/include/drivers/console_assertions.h new file mode 100644 index 000000000..cedce8679 --- /dev/null +++ b/include/drivers/console_assertions.h @@ -0,0 +1,30 @@ +/* + * Copyright (c) 2017, ARM Limited and Contributors. All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef __CONSOLE_ASSERTIONS_H__ +#define __CONSOLE_ASSERTIONS_H__ + +#include <cassert.h> + +/* + * This file contains some separate assertions about console_t, moved here to + * keep them out of the way. Should only be included from <console.h>. + */ +CASSERT(CONSOLE_T_NEXT == __builtin_offsetof(console_t, next), + assert_console_t_next_offset_mismatch); +CASSERT(CONSOLE_T_FLAGS == __builtin_offsetof(console_t, flags), + assert_console_t_flags_offset_mismatch); +CASSERT(CONSOLE_T_PUTC == __builtin_offsetof(console_t, putc), + assert_console_t_putc_offset_mismatch); +CASSERT(CONSOLE_T_GETC == __builtin_offsetof(console_t, getc), + assert_console_t_getc_offset_mismatch); +CASSERT(CONSOLE_T_FLUSH == __builtin_offsetof(console_t, flush), + assert_console_t_flush_offset_mismatch); +CASSERT(CONSOLE_T_DRVDATA == sizeof(console_t), + assert_console_t_drvdata_offset_mismatch); + +#endif /* __CONSOLE_ASSERTIONS_H__ */ + |