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>
This commit is contained in:
parent
4ccb4a78c4
commit
aedc177f00
1 changed files with 1 additions and 1 deletions
|
|
@ -161,7 +161,7 @@ extern char _start[], _end[];
|
||||||
#define TCR_TBI_USED (0x0 << TCR_TBI_SHIFT)
|
#define TCR_TBI_USED (0x0 << TCR_TBI_SHIFT)
|
||||||
#define TCR_TBI_IGNORED (0x1 << TCR_TBI_SHIFT)
|
#define TCR_TBI_IGNORED (0x1 << TCR_TBI_SHIFT)
|
||||||
|
|
||||||
#define DMA_DEFAULT_SIZE (32 * MiB)
|
#define DMA_DEFAULT_SIZE (1 * MiB)
|
||||||
#define TTB_DEFAULT_SIZE 0x100000
|
#define TTB_DEFAULT_SIZE 0x100000
|
||||||
|
|
||||||
#define MB_SIZE (1UL << 20)
|
#define MB_SIZE (1UL << 20)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue