libpayload: Support unaligned pointers for memset

Hardware / Coreboot - Jeremy Compostella [intel.com] - 12 July 2017 06:58 EDT

The optimization of the memset() function introduced by commit dbadb1dd634c8c9419215ade0666a7fb69a4447b (libpayload: Reorder default memcpy, speed up memset and memcmp) is provoking an issue on x86 platform when compiling without the CONFIG_GPL option.

GCC is making use of the movdqa instruction to copy words. This instruction can raise a "General Protection Fault Exception" when it is called on a non-aligned address argument.

Change-Id: I73382a76a4399d8e78244867f2ebb1dca176a6bf

54db255 libpayload: Support unaligned pointers for memset
payloads/libpayload/libc/memory.c | 5 +++++
1 file changed, 5 insertions(+)

Upstream: review.coreboot.org


  • Share