On 3/31/26 10:01 AM, Ilias Apalodimas wrote:

[...]

@@ -321,6 +323,19 @@ __weak phys_addr_t board_get_usable_ram_top(phys_size_t 
total_size)
                 */
                return 0;
  #endif
+       if (IS_ENABLED(CONFIG_RELOCATE_LAST_BANK)) {
+               phys_addr_t old_top = gd->ram_top;
+
+               ret = fdtdec_setup_mem_ram_top();
+               if (ret)
+                       debug("failed to relocate to ram top");
+               ret = fdtdec_setup_ram_size();
+               if (ret) {
+                       debug("failed to calculate RAM size");
+                       gd->ram_top = old_top;
This changes ram_size , why is this restoring ram_top ? Should this also restore gd->ram_size ?

Reply via email to