coreboot/util
Ronald G. Minnich 33d4ebe304 UPSTREAM: ifdtool: avoid potential unaligned pointer usage
In get_region, ifdtool assigns a not-known-to-be-aligned
pointer to a uint32_t *. Now you know and I know that it is
almost certainly aligned, but clang on OSX doesn't like this,
and it's a dicey thing to do in any event, just waiting
to hit someone hard at some future date.

Assign the pointer to a void * and use memmove to copy
the value to a uint32_t.

This usage is more portable to all little-endian architectures,
now, but is still not endian-safe. I doubt we'll ever care.

BUG=none
BRANCH=none
TEST=none

Change-Id: I85be85b9e78c74dde72584f848441a6ddd0ec0c2
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 8db3c2a485
Original-Change-Id: Ifb2f260c3363ab0f5b4a59e5a4e0b5ecf049fa96
Original-Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19921
Original-Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://chromium-review.googlesource.com/522709
2017-06-02 10:38:55 -07:00
..
abuild UPSTREAM: util/abuild: Start junit testcase block on kconfig failure 2017-05-29 01:59:17 -07:00
acpi
amdfwtool UPSTREAM: amdfwtool: Move normal firmware 2 after fanless firmware2s 2017-04-28 22:25:30 -07:00
amdtools
archive
arm_boot_tools/mksunxiboot
autoport UPSTREAM: util/autoport: Add the PCI ID of the iGPU for the Intel i7 3770K 2017-05-06 19:52:17 -07:00
bimgtool
blobtool UPSTREAM: blobtool/ifd-x200.set: Fix flashmap0 NR 2017-05-07 16:25:50 -07:00
board_status UPSTREAM: board_status/towiki.sh: Fix Socket for Sandy and Ivy Bridge 2017-03-14 07:25:39 -07:00
broadcom UPSTREAM: util/broadcom: Check for successful file access 2016-12-19 09:54:20 -08:00
cbfstool UPSTREAM: cbfscomptool: fix display of time_t 2017-05-29 01:59:15 -07:00
cbmem UPSTREAM: cbmem_console: Improve 'cbmem -1' behavior for truncated pre-CBMEM logs 2017-05-22 19:31:14 -07:00
checklist UPSTREAM: util/checklist: Place tables in proper boot order 2016-08-11 03:14:32 -07:00
chromeos UPSTREAM: util/chromeos: Make scripts executable 2016-08-04 23:36:47 -07:00
crossgcc UPSTREAM: crossgcc: disable libsanitizer for the bootstrapped compiler 2017-04-28 22:25:33 -07:00
docker UPSTREAM: util/docker: Update makefile for servers and local use 2017-04-04 03:02:42 -07:00
dtd_parser
ectool UPSTREAM: util/ectool: Dump ram by default 2017-04-26 13:36:57 -07:00
exynos
futility UPSTREAM: util/futility/Makefile: Update clean target 2017-03-30 05:30:07 -07:00
fuzz-tests
genbuild_h
genprof
gitconfig UPSTREAM: Rename and move util/gitconfig/rebase.sh 2016-10-25 14:46:55 -07:00
hugo UPSTREAM: util/hugo: no need to enable an interactive terminal 2017-05-29 01:59:14 -07:00
ifdfake UPSTREAM: util/ifdfake: Add number of regions 2016-12-16 07:51:49 -08:00
ifdtool UPSTREAM: ifdtool: avoid potential unaligned pointer usage 2017-06-02 10:38:55 -07:00
intelmetool UPSTREAM: intelmetool: Enable warning *set-but-unused-variable* 2017-05-15 08:17:43 -07:00
inteltool UPSTREAM: util/inteltool: Add support for Wildcat Point-LP Premium 2017-05-02 20:24:03 -07:00
intelvbttool UPSTREAM: intelvbttool: cope with errors in open() 2016-08-04 23:37:52 -07:00
ipqheader
k8resdump
kbc1126 UPSTREAM: util: Add tools for dumping and inserting KBC1126 firmware images. 2017-05-15 08:17:46 -07:00
kconfig UPSTREAM: Kconfig: Change symbol override from warning to notice 2016-12-13 17:49:40 -08:00
lint UPSTREAM: util/lint: ignore some more binary file types 2017-05-29 01:59:13 -07:00
marvell
me_cleaner UPSTREAM: util/me_cleaner: Pull the latest changes from upstream 2017-03-06 07:04:35 -08:00
mma UPSTREAM: mma: update mma setup script for v2.1018 2017-04-26 09:20:54 -07:00
msrtool UPSTREAM: util/msrtool: Use tabs for indents 2016-10-19 14:06:44 -07:00
mtkheader
nvidia
nvramtool UPSTREAM: nvramtool: Don't consider reserved regions to be "out of range" 2016-08-04 23:37:39 -07:00
optionlist
post
release UPSTREAM: util/release: Update build-release script 2017-05-16 10:41:45 -07:00
riscvtools UPSTREAM: RISCV: change make-spike-elf to use the coreboot toolchain. 2016-10-18 22:14:47 -07:00
rockchip
romcc UPSTREAM: util/romcc: Don't reference a variable after checking it for NULL 2017-02-13 10:01:10 -08:00
sconfig UPSTREAM: lib: provide clearer devicetree semantics 2017-04-26 13:36:55 -07:00
scripts UPSTREAM: util/scripts/get_maintainer.pl: Remove linux tree check 2017-03-07 14:15:56 -08:00
showdevicetree
spkmodem_recv
superiotool UPSTREAM: superiotool: Add registers of LPC47N217 2017-05-09 20:36:02 -07:00
uio_usbdebug
vgabios UPSTREAM: Remove extra newlines from the end of all coreboot files. 2016-08-04 23:36:56 -07:00
viatool UPSTREAM: viatool/quirks: Add newline to end of file 2016-08-02 14:29:22 -07:00
xcompile UPSTREAM: xcompile: replace -print-librt-file-name with -print-libgcc-file-name 2017-05-16 10:41:45 -07:00