blob: 28f62e24ea75c13ebd550e8a33649ff057838b13 [file] [log] [blame]
Sughosh Ganu29c7e442024-10-25 22:57:23 +05301/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Copyright (c) 2024, Linaro Limited
4 */
5
6/**
7 * get_mem_top() - Compute the value of ram_top
8 * @ram_start: Start of RAM
9 * @ram_size: RAM size
10 * @size: Minimum RAM size requested
11 * @fdt: FDT blob
12 *
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.
18 *
19 * Return: address of ram top on success, 0 on failure
20 */
21phys_addr_t get_mem_top(phys_addr_t ram_start, phys_size_t ram_size,
22 phys_size_t size, void *fdt);