Message ID | 20241025121547.181633-1-sughosh.ganu@linaro.org |
---|---|
Headers | show |
Series | Add generic function for computing ram_top | expand |
On 10/25/24 14:15, Sughosh Ganu wrote: > The board_get_usable_ram_top() function is used by boards to compute > uppermost address of RAM(ram_top) that is to be used by U-Boot -- this > need not be the highest RAM address of the platform. This computation > happens before U-Boot relocates to its final destination address in > RAM. Certain platforms, like the Xilinx boards were computing the > ram_top value in an indirect manner, through some LMB API's. Thus it > is no longer possible to use these LMB API's to compute the ram_top, > as the LMB module gets initialised only after relocation, and the heap > memory has been set up. Add generic functionality to compute the value > of ram_top which can be used by platforms. > > > Sughosh Ganu (2): > common: memtop: add logic to detect ram_top > xilinx: use get_mem_top() to compute ram_top > > board/xilinx/common/board.c | 25 +++++ > common/Makefile | 1 + > common/memtop.c | 186 ++++++++++++++++++++++++++++++++++++ > include/memtop.h | 22 +++++ > 4 files changed, 234 insertions(+) > create mode 100644 common/memtop.c > create mode 100644 include/memtop.h > Tested-by: Michal Simek <michal.simek@amd.com> Thanks, Michal