Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • early-display
  • variant-emmc-nvme-boot
  • 2023-01-25
  • v3
  • variant-emmc-nvme-boot
  • 2020-06-01
7 results

fdt_support.c

Forked from Reform / reform-boundary-uboot
Source project has a limited visibility.
  • Peter Korsgaard's avatar
    c088a108
    fdt_resize(): fix actualsize calculations with unaligned blobs · c088a108
    Peter Korsgaard authored
    
    The code in fdt_resize() to extend the fdt size to end on a page boundary
    is wrong for fdt's not located at an address aligned on a page boundary.
    What's even worse, the code would make actualsize shrink rather than grow
    if (blob & 0xfff) was bigger than the amount of padding added by ALIGN(),
    causing fdt_add_mem_rsv to fail.
    
    Fix it by aligning end address (blob + size) to a page boundary instead.
    For aligned fdt's this is equivalent to what we had before.
    
    Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>
    c088a108
    History
    fdt_resize(): fix actualsize calculations with unaligned blobs
    Peter Korsgaard authored
    
    The code in fdt_resize() to extend the fdt size to end on a page boundary
    is wrong for fdt's not located at an address aligned on a page boundary.
    What's even worse, the code would make actualsize shrink rather than grow
    if (blob & 0xfff) was bigger than the amount of padding added by ALIGN(),
    causing fdt_add_mem_rsv to fail.
    
    Fix it by aligning end address (blob + size) to a page boundary instead.
    For aligned fdt's this is equivalent to what we had before.
    
    Signed-off-by: default avatarPeter Korsgaard <jacmet@sunsite.dk>