coreboot/src/arch
Ryan Salsamendi f0b0712023 arch/x86: Fix undefined behavior
Fixes report found by undefined behavior sanitizer. Dereferencing a
pointer that is not aligned to the size of access is undefined behavior.
Switch to memcpy() for unaligned write to EBDA_LOWMEM. Change other
write16()s in setup_ebda() to memcpy() for consistency.

Change-Id: I79814bd47a14ec59d84068b11d094dc2531995d9
Signed-off-by: Ryan Salsamendi <rsalsamendi@hotmail.com>
Reviewed-on: https://review.coreboot.org/20132
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
2017-06-14 19:51:12 +02:00
..
arm arch/arm/include/armv7/arch: Correct keyword organization in cpu.h 2017-06-02 18:31:03 +02:00
arm64 arch/arm: Correct checkpatch errors 2017-06-02 18:30:53 +02:00
mips arch: Unify basic cache clearing API 2017-05-30 22:19:50 +02:00
power8 arch: Unify basic cache clearing API 2017-05-30 22:19:50 +02:00
riscv src: change coreboot to lowercase 2017-06-07 12:09:15 +02:00
x86 arch/x86: Fix undefined behavior 2017-06-14 19:51:12 +02:00