]> Git Repo - u-boot.git/commit
lib: lmb: extend lmb for checks at load time
authorSimon Goldschmidt <[email protected]>
Mon, 14 Jan 2019 21:38:18 +0000 (22:38 +0100)
committerTom Rini <[email protected]>
Wed, 16 Jan 2019 21:37:04 +0000 (16:37 -0500)
commit4cc8af8037ebabd674d0a6bed202b0c711dc7699
tree8617a878fbb2be6711067e854144670539e60769
parente2237a2c263783996a85b70ccbf1f967aa2ec182
lib: lmb: extend lmb for checks at load time

This adds two new functions, lmb_alloc_addr and
lmb_get_unreserved_size.

lmb_alloc_addr behaves like lmb_alloc, but it tries to allocate a
pre-specified address range. Unlike lmb_reserve, this address range
must be inside one of the memory ranges that has been set up with
lmb_add.

lmb_get_unreserved_size returns the number of bytes that can be
used up to the next reserved region or the end of valid ram. This
can be 0 if the address passed is reserved.

Added test for these new functions.

Reviewed-by: Simon Glass <[email protected]>
Signed-off-by: Simon Goldschmidt <[email protected]>
include/lmb.h
lib/lmb.c
test/lib/lmb.c
This page took 0.034111 seconds and 4 git commands to generate.