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. BUG=chrome-os-partner:21969 TEST=None 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> |
||
|---|---|---|
| .. | ||
| args.c | ||
| console.c | ||
| ctype.c | ||
| exec.c | ||
| getopt_long.c | ||
| hexdump.c | ||
| ipchecksum.c | ||
| lar.c | ||
| lib.c | ||
| Makefile.inc | ||
| malloc.c | ||
| memory.c | ||
| printf.c | ||
| qsort.c | ||
| rand.c | ||
| readline.c | ||
| string.c | ||
| strings.c | ||
| strlcpy.c | ||
| sysinfo.c | ||
| time.c | ||