mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-03-13 21:36:57 +00:00
xilinx: zynqmp: Check that DT is 64bit aligned
DT needs to be 64bit aligned. If it is not fdt64_to_cpu will fail when try to read information about reserved memory. The system ends in exception without any clue what's going it. That's why detect not aligned DT and panic to show where the issue is coming from. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
This commit is contained in:
parent
8823253272
commit
5bd5ee02b2
1 changed files with 3 additions and 0 deletions
|
@ -470,6 +470,9 @@ ulong board_get_usable_ram_top(ulong total_size)
|
|||
phys_addr_t reg;
|
||||
struct lmb lmb;
|
||||
|
||||
if (!IS_ALIGNED((ulong)gd->fdt_blob, 0x8))
|
||||
panic("Not 64bit aligned DT location: %p\n", gd->fdt_blob);
|
||||
|
||||
/* found enough not-reserved memory to relocated U-Boot */
|
||||
lmb_init(&lmb);
|
||||
lmb_add(&lmb, gd->ram_base, gd->ram_size);
|
||||
|
|
Loading…
Add table
Reference in a new issue