[U-Boot] [RFC PATCH v5 0/4] Enable FIT image to be loaded beyond 32-bit space

York Sun york.sun at nxp.com
Thu Feb 25 23:36:15 CET 2016


This set fixes compiling warnings for sandbox on 32-bit host (Ubuntu),
convert ulong to phys_addr_t for image handling. The purpose is to fix
image addresses so FIT image can be put beyond 32-bit space.
The challenge is to keep 32-bit host tool (eg mkimage) working. Using
unsigned long long as phys_addr_t for host is the trick.

This patchset is tested by compiling for selected powerpc, arm, armv8
and sandbox target. It is verified on selected platforms, including
p1021rdb (e500v2)
p4080ds (e500mc)
t4240qds (e6500)
ls1021aqds (armv7)
ls2080ardb (armv8) with 32- and 64-git address images

Need help to test and probably fix on other platforms. Mips probably
has compiling warning for arch/mips/lib/bootm.c.

Changes in v5:
  Add comment to explain casting from 64-bit to 32-bit on 32-bit
    targets with 36-bit or more physical address space
  Revert a change of using pointer in bootm_host_load_image()
  Using new PRIpa macro instead of casting in fit_image_load()
  Add change to arch/x86/lib/bootm.c
  Revise commit message
  Drop % sign in PRIpa macro
  Use %#08llx instead of %08llx when applicable
  New patch split from fixing load and entry address patch
  Split the common function into another patch.
  Revise commit subject.
  Update commit message as suggested by Simon.
  Updated cover letter with testing report.

Changes in v4:
  New patch, separated from fixing FIT image.
  New patch to fix compiling warnings for sandbox built on 32-bit host
  Still need to change CONFIG_SANDBOX_BITS_PER_LONG to 32 to avoid
  these warnings
  include/asm-generic/bitops/__fls.h:17:2: warning: left shift
   count >= width of type [enabled by default]
  include/asm-generic/bitops/__fls.h:19:3: warning: left shift
   count >= width of type [enabled by default]
  include/asm-generic/bitops/__fls.h:22:2: warning: left shift
   count >= width of type [enabled by default]
  include/asm-generic/bitops/__fls.h:26:2: warning: left shift
   count >= width of type [enabled by default]
  include/asm-generic/bitops/__fls.h:30:2: warning: left shift
   count >= width of type [enabled by default]
  include/asm-generic/bitops/__fls.h:34:2: warning: left shift
   count >= width of type [enabled by default]
  include/asm-generic/bitops/__fls.h:38:2: warning: left shift
   count >= width of type [enabled by default]
  Separate ulong to phys_addr_t change to another patch.

Changes in v3:
  Define PRIpa for host and target in common/image-fit.c so printf works
  properly for 32-, 64-bit targets and host tools.

Changes in v2:
  Make a common function for both load and entry addresses.
  Simplify calculation of addresses in a similar way as fdtdec_get_number()
  fdtdec_get_number() is not used, or too many files need to be included
    and/or twisted for host tool
  Continue to use %08llx for print format for load and entry addresses
    because %pa does not always work for host tool (mkimage)

York Sun (4):
  common: Convert ulong to phys_addr_t for image addresses
  sandbox: Fix compiling warning
  common: image-fit: Use a common function to get address
  common: image-fit: Fix load and entry addresses in FIT image

 arch/powerpc/lib/bootm.c         |    4 +-
 arch/sandbox/cpu/cpu.c           |    3 +-
 arch/sandbox/include/asm/types.h |    9 ++++-
 arch/sandbox/lib/bootm.c         |    3 +-
 arch/sandbox/lib/pci_io.c        |    2 +-
 arch/x86/lib/bootm.c             |   15 +++++---
 cmd/bootm.c                      |   11 +++---
 cmd/lzmadec.c                    |    5 ++-
 cmd/ximg.c                       |   21 +++++++---
 common/bootm.c                   |   21 +++++-----
 common/bootm_os.c                |   14 ++++---
 common/image-android.c           |   10 ++---
 common/image-fdt.c               |   16 ++++----
 common/image-fit.c               |   79 +++++++++++++++++++++-----------------
 common/image.c                   |   17 ++++----
 disk/part_efi.c                  |    2 +-
 include/bootm.h                  |    6 +--
 include/image.h                  |   40 ++++++++++++-------
 lib/hashtable.c                  |    2 +-
 tools/default_image.c            |    2 +-
 20 files changed, 166 insertions(+), 116 deletions(-)

-- 
1.7.9.5



More information about the U-Boot mailing list