coreboot/payloads/libpayload/include
Julius Werner aedc177f00 libpayload: arm64: Reduce DMA allocator space to 1MB
On arm64 device libpayload reserves 32MB of space for the DMA allocator.
DMA allocators are usually just used for small bounce buffers or DMA
descriptors for SPI, I2C or USB transfers, nothing that should get
anywhere near the size of megabytes.

Presumably the original number was just made arbitrarily large because
it didn't matter. But more recently we have had security applications
(guarding secrets that get received over SPI/I2C from firmware and must
not be visible to the OS after handoff) that made us want to erase the
entire DMA heap just to be sure no driver left a copy of any secret
lying around there. This means the size is no longer fully harmless
because erasing a larger heap takes more time.

Change the default to 1MB which should still be more than more than
enough for any real applications, but should bring the time required to
erase it back into negligible territory.

BUG=b:418942992
TEST=Booted Trogdor from USB.

Change-Id: Id56486203c512d7ff08909cac1a016adc44d8e68
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87780
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-05-22 20:56:14 +00:00
..
arm/arch payloads/libpayload: Add fast data types to types.h 2025-03-10 15:21:44 +00:00
arm64/arch libpayload: arm64: Reduce DMA allocator space to 1MB 2025-05-22 20:56:14 +00:00
arpa treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
mock/arch payloads/libpayload: Add fast data types to types.h 2025-03-10 15:21:44 +00:00
pci libpayload/storage: Add NVMe driver 2021-04-07 10:58:04 +00:00
storage libpayload/storage: Add NVMe driver 2021-04-07 10:58:04 +00:00
sys treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
udc treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
usb libpayload/usb: Add format string checking to usb_debug 2020-11-22 22:34:55 +00:00
x86/arch payloads/libpayload: Add fast data types to types.h 2025-03-10 15:21:44 +00:00
archive.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
assert.h libpayload: Use __func__ instead of old __FUNCTION__ 2023-02-17 16:19:44 +00:00
boot_device.h libpayload: Add boot_device_read() function 2021-12-10 17:56:34 +00:00
cbfs.h libpayload: Remove legacy CBFS API 2024-02-22 21:18:39 +00:00
cbfs_glue.h cbfs/vboot: Adapt to new vb2_digest API 2022-09-02 23:51:29 +00:00
cbgfx.h libpayload: cbgfx: Support buffered I/O 2020-08-28 21:40:58 +00:00
coreboot_tables.h libpayload: Switch to commonlib ipchksum() algorithm 2024-02-02 22:48:48 +00:00
ctype.h payloads: Drop unneeded empty lines 2020-09-21 16:20:57 +00:00
delay.h libpayload: Use Kconfig instead of weak symbol for arch_ndelay() 2025-05-22 19:27:30 +00:00
die.h treewide: Move stdlib.h to commonlib 2024-03-15 10:09:43 +00:00
endian.h libpayload/endian: Add read32p/write32p macros and friends 2024-10-15 10:16:40 +00:00
errno.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
exception.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
fmap.h commonlib/bsd: Remove cb_err_t 2022-03-09 02:18:21 +00:00
fpmath.h libpayload: Add simple 32.32 fixed-point math API 2020-07-09 00:32:11 +00:00
gdb.h libpayload: gdb: Factor out gdb_handle_reentrant_exception() from arm32 2018-10-12 20:17:40 +00:00
getopt.h
inttypes.h
kconfig.h Add new CONFIG(XXX) macro to replace IS_ENABLED(CONFIG_XXX) 2019-03-07 17:06:28 +00:00
keycodes.h
libpayload.h libpayload: Include commonlib/helpers.h in libpayload.h for GPL builds 2024-03-25 08:23:35 +00:00
limits.h includes: Define CHAR_BIT in limits.h 2021-06-18 04:38:33 +00:00
lp_vboot.h libpayload: Add vboot and reboot utility functions 2023-09-18 15:42:31 +00:00
lz4.h
lzma.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
malloc.h
multiboot_tables.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
panel.h
pci.h libpayload/pci: Add support for bus mapping 2022-05-20 02:51:33 +00:00
queue.h payloads: Drop unneeded empty lines 2020-09-21 16:20:57 +00:00
stdarg.h libpayload/include/stdarg.h: Add va_copy builtin 2023-08-17 16:46:07 +00:00
stdbool.h libpayload: Add <stdbool.h> 2020-10-26 06:57:06 +00:00
stddef.h libpayload: Outsource delay function into own header 2023-08-24 13:35:02 +00:00
stdint.h libpayload: Add missing SIZE_MAX define 2024-08-19 23:20:00 +00:00
stdio.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
stdlib.h treewide: Move stdlib.h to commonlib 2024-03-15 10:09:43 +00:00
string.h libpayload: Use Kconfig for architecture memcpy, not weak symbols 2025-05-22 19:27:24 +00:00
strings.h libpayload: strings.h: Use builtin __ffs instead of included one 2023-03-07 17:11:05 +00:00
sysinfo.h Add allocation of a buffer for pvmfw within cbmem 2025-04-05 00:24:26 +00:00
term.h
time.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
unistd.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
video_console.h treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
wchar.h includes: Provide wchar.h with wchar_t and wint_t 2021-06-18 04:38:16 +00:00