From d022718001a7651d9d357a1a3359d07c13a0ad9d Mon Sep 17 00:00:00 2001 From: Kyösti Mälkki Date: Fri, 8 Jun 2018 20:19:21 +0300 Subject: bootmem: Clarify usage with bounce-buffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add bootmem_targets_usable_with_bounce() to handle cases of payload loading via bounce-buffer. Change-Id: I9ebbc621f8810c0317d7c97c6b4cdd41527ddcbb Signed-off-by: Kyösti Mälkki Reviewed-on: https://review.coreboot.org/26985 Reviewed-by: Aaron Durbin Reviewed-by: Julius Werner Tested-by: build bot (Jenkins) --- src/include/bootmem.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/include/bootmem.h') diff --git a/src/include/bootmem.h b/src/include/bootmem.h index 0a960c992a..28bc95bae8 100644 --- a/src/include/bootmem.h +++ b/src/include/bootmem.h @@ -97,6 +97,11 @@ bool bootmem_walk(range_action_t action, void *arg); /* Return 1 if region targets usable RAM, 0 otherwise. */ int bootmem_region_targets_usable_ram(uint64_t start, uint64_t size); +/* Return 1 if region targets usable RAM, and we allow memory ranges + * with type >BM_MEM_OS_CUTOFF to be overwritten at the time we jump + * to payload. 0 otherwise. */ +int bootmem_region_usable_with_bounce(uint64_t start, uint64_t size); + /* Allocate a temporary buffer from the unused RAM areas. */ void *bootmem_allocate_buffer(size_t size); -- cgit v1.2.3