coreboot/src/include
Julius Werner cef5fa13c3 Add check_member macro to allow clean and easy struct offset checking
This patch adds a new static assertion macro that can be used to check
the offsets in structures that overlay register sets at compile time. It
uses the _Static_assert() declaration from the new ISO C11 standard,
which is supported (even without -std=c11) by GCC after version 4.6.
(There is supposedly also support in clang, although I haven't tried
it... let's deal with compiler issues when/if they turn up.)

I've added it to all structures for our current ARM SoCs for now, and I
think every new register overlay we add going forward should use them
(at least for the last member, but feel free to add more if you think
it's useful).

BUG=None
TEST=Compiled for Snow, Pit and Nyan.

Change-Id: If32510e7049739ad05618d363a854dc372d64386
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/179412
Reviewed-by: David Hendricks <dhendrix@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2013-12-11 22:12:25 +00:00
..
boot arm: libpayload: Add cache coherent DMA memory definition and management 2013-08-29 22:48:49 +00:00
console Add a specific post code for S3 resume failures 2013-08-09 11:18:59 -07:00
cpu x86: Add SMM helper functions to MP infrastructure 2013-10-23 04:08:19 +00:00
device pnp: Allow setting of misc register 0xfa in device tree 2013-11-08 00:52:45 +00:00
pc80 tpm: Clean up I2C TPM driver 2013-11-11 23:47:09 +00:00
smp Clean up #ifs 2012-05-08 00:34:34 +02:00
assert.h We call this cache as ram everywhere, so let's call it the same in Kconfig 2010-08-30 17:53:13 +00:00
bootstate.h Rename hardwaremain() to main() 2013-05-10 11:55:20 -07:00
cbfs.h BACKPORT: boot state: rebalance payload load vs actual boot 2013-05-01 14:30:44 -07:00
cbfs_core.h ARM: Generalize armv7 as arm. 2013-10-02 09:18:44 +00:00
cbmem.h cbmem: add reference code ids 2013-10-24 18:06:10 +00:00
delay.h Drop prototype guarding for romcc 2013-05-10 11:55:20 -07:00
edid.h Peppy graphics 2013-09-27 23:07:14 +00:00
ehci.h Drop prototype guarding for romcc 2013-05-10 11:55:20 -07:00
elog.h Extend CMOS POST code logging to store extra data 2013-06-10 18:08:23 -07:00
endian.h Extend CBFS to support arbitrary ROM source media. 2013-01-30 17:58:32 +01:00
fallback.h Make set_boot_successful depend on PC80_SYSTEM 2012-11-30 21:33:35 +01:00
inttypes.h x86: provide more C standard environment 2013-03-20 04:20:25 +01:00
ip_checksum.h Drop prototype guarding for romcc 2013-05-10 11:55:20 -07:00
kconfig.h Add config_enabled() from Linux 2012-05-08 00:36:09 +02:00
lib.h Add simple hexdump function 2013-07-30 15:25:06 -07:00
memrange.h memrange: add 2 new range_entry routines 2013-03-29 20:11:28 +01:00
ramstage_cache.h coreboot: config to cache ramstage outside CBMEM 2013-10-11 23:27:01 +00:00
reg_script.h reg_script: add reg_script_run_on_dev() 2013-12-11 19:51:56 +00:00
reset.h Drop prototype guarding for romcc 2013-05-10 11:55:20 -07:00
rmodule.h rmodule: consolidate rmodule stage loading 2013-10-24 18:06:13 +00:00
romstage_handoff.h coreboot: dynamic cbmem requirement 2013-03-22 00:13:42 +01:00
sdram_mode.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
smbios.h smbios: Add generic type41 write function 2013-05-24 14:02:57 -07:00
spd.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
spd_ddr2.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
spi-generic.h spi-generic.h: Adapt include guard 2013-02-11 22:34:17 +01:00
spi_flash.h Whitespace: Replace tab character in license text with two spaces 2013-02-20 23:30:45 +01:00
stddef.h Add check_member macro to allow clean and easy struct offset checking 2013-12-11 22:12:25 +00:00
stdlib.h exynos5420: Fix mmc clock source. 2013-08-22 16:03:17 -07:00
string.h BACKPORT: string: Add STRINGIFY macro 2013-05-01 14:29:58 -07:00
swab.h Add macros for 64bit byte order swapping 2011-10-21 14:13:19 +02:00
thread.h Possible thread stack implementation. 2013-08-23 10:38:10 -07:00
timer.h timer: Add functions to initialize absolute timer structures. 2013-08-09 11:18:51 -07:00
timestamp.h Timestamp implementation for ARMv7 2013-08-02 12:16:42 -07:00
tpm.h tpm: Clean up I2C TPM driver 2013-11-11 23:47:09 +00:00
trace.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
types.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
uart.h uart: The uart.h header file uses uint32_t without including stdint.h. 2013-10-02 09:18:34 +00:00
uart8250.h UART 8250: Unconditionally provide register constants and use UART8250 prefix. 2013-10-02 09:18:38 +00:00
usb_ch9.h USB Debug Port related license header fixes (trivial). 2010-09-23 18:16:46 +00:00
usbdebug.h Drop prototype guarding for romcc 2013-05-10 11:55:20 -07:00
vbe.h Peppy graphics 2013-09-27 23:07:14 +00:00
version.h Rename almost all occurences of LinuxBIOS to coreboot. 2008-01-18 15:08:58 +00:00
watchdog.h watchdog.h: Fix compile time error on disabling watchdog handling 2013-03-12 12:06:43 +01:00