1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (c) 2024, Linaro Limited
7 * get_mem_top() - Compute the value of ram_top
8 * @ram_start: Start of RAM
10 * @size: Minimum RAM size requested
13 * The function computes the top address of RAM memory that can be
14 * used by U-Boot. This is being done by going through the list of
15 * reserved memory regions specified in the devicetree blob passed
16 * to the function. The logic used here is derived from the lmb
17 * allocation function.
19 * Return: address of ram top on success, 0 on failure
21 phys_addr_t get_mem_top(phys_addr_t ram_start, phys_size_t ram_size,
22 phys_size_t size, void *fdt);