summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include
diff options
context:
space:
mode:
authorYi Chou <yich@google.com>2023-10-16 11:34:52 +0800
committerFelix Held <felix-coreboot@felixheld.de>2023-11-21 13:50:53 +0000
commit582c2a79808e94225ed3f0e7bf3a203c3239b5a4 (patch)
tree3e4d830ae57f0a19ce6ce8477fed1163f0fbb06b /payloads/libpayload/include
parentcbbfd68481002fd5b12e832f6b6c4bbd0fa671ad (diff)
libpayload: Add dma_allocator_range()
Some sensitive data may remain DMA buffer, we will want to zero out everything on the DMA buffer before we jump into the kernel to prevent leaking sensitive data into the kernel. To accomplish that, we will need this function to get the range of memory that can be allocated by the dma allocator. BUG=b:248610274 TEST=emerge-cherry libpayload BRANCH=none Signed-off-by: Yi Chou <yich@google.com> Change-Id: I8f3058dfd861ed44f716623967201b8cabe8d166 Reviewed-on: https://review.coreboot.org/c/coreboot/+/78407 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'payloads/libpayload/include')
-rw-r--r--payloads/libpayload/include/stdlib.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/payloads/libpayload/include/stdlib.h b/payloads/libpayload/include/stdlib.h
index e129cd10d4..cb9addfbde 100644
--- a/payloads/libpayload/include/stdlib.h
+++ b/payloads/libpayload/include/stdlib.h
@@ -137,6 +137,7 @@ void print_malloc_map(void);
void init_dma_memory(void *start, u32 size);
int dma_initialized(void);
int dma_coherent(const void *ptr);
+void dma_allocator_range(void **start_out, size_t *size_out);
static inline void *xmalloc_work(size_t size, const char *file,
const char *func, int line)