File tree 2 files changed +26
-1
lines changed
2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,14 @@ fw_dtb_pointer:
1515 .word 0x0
1616#endif
1717
18+ #ifdef CONFIG_ARM64
19+ .align 8
20+ .global reserve_memory
21+ reserve_memory:
22+ .dword 0x0
23+ #endif
24+
25+
1826/*
1927 * Routine: save_boot_params (called after reset from start.S)
2028 * Description: save ATAG/FDT address provided by the firmware at boot time
@@ -27,6 +35,8 @@ save_boot_params:
2735#ifdef CONFIG_ARM64
2836 adr x8, fw_dtb_pointer
2937 str x0, [x8]
38+ adr x8, reserve_memory
39+ str x1, [x8]
3040#else
3141 str r2, fw_dtb_pointer
3242#endif
Original file line number Diff line number Diff line change 1313#include <lcd.h>
1414#include <memalign.h>
1515#include <mmc.h>
16+ #include <asm/system.h>
1617#include <asm/gpio.h>
1718#include <asm/arch/mbox.h>
1819#include <asm/arch/msg.h>
@@ -291,6 +292,17 @@ static struct mm_region bcm283x_mem_map[] = {
291292};
292293#endif
293294struct mm_region * mem_map = bcm283x_mem_map ;
295+
296+ /* From lowlevel_init.S. */
297+ extern u64 reserve_memory ;
298+
299+ int dram_init_banksize (void )
300+ {
301+ gd -> bd -> bi_dram [0 ].start = CONFIG_SYS_SDRAM_BASE + reserve_memory ;
302+ gd -> bd -> bi_dram [0 ].size = get_effective_memsize () - reserve_memory ;
303+ return 0 ;
304+ }
305+
294306#endif
295307
296308int dram_init (void )
@@ -426,7 +438,10 @@ int misc_init_r(void)
426438 set_board_info ();
427439#endif
428440 set_serial_number ();
429-
441+ #ifdef CONFIG_ARM64
442+ if (fw_dtb_pointer )
443+ env_set_hex ("fdt_addr" , (ulong )fw_dtb_pointer );
444+ #endif
430445 return 0 ;
431446}
432447
You can’t perform that action at this time.
0 commit comments