switch-coreboot/src
Julius Werner 03784fa97a 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).

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>
(cherry picked from commit cef5fa13c31375a316ca4556c0039b17c8ea7900)
Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com>
Reviewed-on: http://review.coreboot.org/6905
Tested-by: build bot (Jenkins)
2014-09-22 18:42:20 +02:00
..
arch arm: Have the linker garbage-collect unused functions and variables 2014-09-22 18:41:54 +02:00
console arm: Remove CAR_MIGRATE Kconfig and associated cruft 2014-09-15 17:38:28 +02:00
cpu arm: Remove CAR_MIGRATE Kconfig and associated cruft 2014-09-15 17:38:28 +02:00
device pnp: Allow setting of misc register 0xf4 in device tree 2014-09-17 17:34:16 +02:00
drivers spi: add Kconfig variable for dual-output read enable 2014-09-17 19:56:16 +02:00
ec chrome ec: Add support for limiting charger current 2014-09-19 21:38:34 +02:00
include Add check_member macro to allow clean and easy struct offset checking 2014-09-22 18:42:20 +02:00
lib arm: Move exception_init() close to console_init() 2014-09-13 02:21:02 +02:00
mainboard snow/pit: include chromeos.c in romstage 2014-09-22 18:40:48 +02:00
northbridge intel/gma: consolidate vbt code 2014-09-13 14:27:03 +02:00
soc Add check_member macro to allow clean and easy struct offset checking 2014-09-22 18:42:20 +02:00
southbridge lynxpoint: Don't enable SMI handling of TCO 2014-09-18 18:31:25 +02:00
superio pnp: Allow setting of misc register 0xf4 in device tree 2014-09-17 17:34:16 +02:00
vendorcode tpm: Clean up I2C TPM driver 2014-09-10 19:37:49 +02:00
Kconfig payloads/external/SeaBIOS: Bump version to 1.7.5 2014-09-14 21:03:19 +02:00