9665d389e4
Since the DMA memory is allocated by Coreboot (outside of the payload's linker script), it won't get zeroed upon loading like the heap. Therefore, a warm reboot that doesn't reset memory may leave stale malloc cookies lying around and misinterpret them as memory that is still in use on the next boot. After several boots this may fill up the whole DMA memory and lead to OOM conditions. Therefore, this patch explicitly wipes the first cookie in init_dma_memory() to prevent that from happening. It also expands the existing memory allocator debugging code to cover the DMA parts, which was very helpful in identifying this particular problem. Change-Id: I6e2083c286ff8ec865b22dd922c39c456944b451 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/169455 Reviewed-by: Stefan Reinauer <reinauer@google.com> (cherry picked from commit 8e5e1784638563b865553125cd5dab1d36a5d2cb) Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com> Reviewed-on: http://review.coreboot.org/6645 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> |
||
---|---|---|
.. | ||
armv7/arch | ||
arpa | ||
pci | ||
storage | ||
sys | ||
usb | ||
x86/arch | ||
assert.h | ||
cbfs.h | ||
cbfs_core.h | ||
cbfs_ram.h | ||
coreboot_tables.h | ||
ctype.h | ||
endian.h | ||
errno.h | ||
getopt.h | ||
inttypes.h | ||
ipchksum.h | ||
kconfig.h | ||
keycodes.h | ||
lar.h | ||
libpayload.h | ||
limits.h | ||
lzma.h | ||
malloc.h | ||
multiboot_tables.h | ||
panel.h | ||
pci.h | ||
stdarg.h | ||
stddef.h | ||
stdint.h | ||
stdio.h | ||
stdlib.h | ||
string.h | ||
strings.h | ||
sysinfo.h | ||
term.h | ||
unistd.h | ||
video_console.h |