/* Try to allocate a specific address range: must be in defined memory but not reserved  */
phys_addr_t lmb_alloc_addr(struct lmb *lmb, phys_addr_t base, phys_size_t size)
/* Try to allocate a specific address range: must be in defined memory but not reserved  */
phys_addr_t lmb_alloc_addr(struct lmb *lmb, phys_addr_t base, phys_size_t size)
{
	long rgn;
	rgn = lmb_overlaps_region(&lmb->memory, base, size);
	if (rgn >= 0) {
		if (lmb_addrs_overlap(lmb->memory.region[rgn].base,
				      lmb->memory.region[rgn].size,
				      base + size - 1, 1)) {
			if (lmb_reserve(lmb, base, size) >= 0)
				return base;
		}
	}
	return 0;
}