28 Dec, 2016

1 commit

  • This patch is fixing missing fclose() calls
    in error patch introduced by:
    "tools: mkimage: Use fstat instead of stat to avoid malicious hacks"
    (sha1: ebe0f53f48e8f9ecc823e533a85b05c13638c350)

    Reported-by: Coverity (CID: 155064, 155065)
    Signed-off-by: Michal Simek
    Reviewed-by: Simon Glass

    Michal Simek
     

09 Dec, 2016

2 commits

  • The patch is fixing:
    "tools: mkimage: Check if file is regular file"
    (sha1: 56c7e8015509312240b1ee15f2ff74510939a45d)
    which contains two issues reported by Coverity
    Unchecked return value from stat and incorrect calling sequence where
    attack can happen between calling stat and fopen.
    Using pair in opposite order (fopen and fstat) is fixing this issue
    because fstat is using the same file descriptor (FILE *).

    Also fixing issue with:
    "tools: mkimage: Add support for initialization table for Zynq and
    ZynqMP" (sha1: 3b6460809c2a28360029c1c48247648fac4455c9)
    where file wasn't checked that it is regular file.

    Reported-by: Coverity (CID: 154711, 154712)
    Signed-off-by: Michal Simek
    Reviewed-by: Tom Rini

    Michal Simek
     
  • This reverts commit 3edc0c252257e4afed163a3a74aba24a5509b198, reversing
    changes made to bb135a0180c31fbd7456021fb9700b49bba7f533.

    Tom Rini
     

08 Dec, 2016

1 commit

  • The patch is fixing:
    "tools: mkimage: Check if file is regular file"
    (sha1: 56c7e8015509312240b1ee15f2ff74510939a45d)
    which contains two issues reported by Coverity
    Unchecked return value from stat and incorrect calling sequence where
    attack can happen between calling stat and fopen.
    Using pair in opposite order (fopen and fstat) is fixing this issue
    because fstat is using the same file descriptor (FILE *).

    Also fixing issue with:
    "tools: mkimage: Add support for initialization table for Zynq and
    ZynqMP" (sha1: 3b6460809c2a28360029c1c48247648fac4455c9)
    where file wasn't checked that it is regular file.

    Reported-by: Coverity (CID: 154711, 154712)
    Signed-off-by: Michal Simek
    Reviewed-by: Tom Rini
    Series-to: trini
    Series-cc: u-boot

    Michal Simek
     

15 Nov, 2016

1 commit

  • The Zynq/ZynqMP boot.bin file contains a region for register initialization
    data. Filling in proper values in this table can reduce boot time
    (e.g. about 50ms faster on QSPI boot) and also reduce the size of
    the SPL binary.

    The table is a simple text file with register+data on each line. Other
    lines are simply skipped. The file can be passed to mkimage using the
    "-R" parameter.

    It is recommended to add reg init file to board folder.
    For example:
    CONFIG_BOOT_INIT_FILE="board/xilinx/zynqmp/xilinx_zynqmp_zcu102/reg.int

    Signed-off-by: Mike Looijmans
    Signed-off-by: Michal Simek

    Mike Looijmans
     

18 Dec, 2015

1 commit


19 Nov, 2015

1 commit

  • As with other platforms vendors love to create their own boot header
    formats. Xilinx is no different and for the Zynq platform/SoC there
    exists the "boot.bin" which is read by the platforms bootrom. This
    format is described to a useful extent within the Xilinx Zynq TRM.

    This implementation adds support for the 'zynqimage' to mkimage. The
    implementation only considers the most common boot header which is
    un-encrypted and packed directly after the boot header itself (no
    XIP, etc.). However this implementation does take into consideration the
    other fields of the header for image dumping use cases (vector table and
    register initialization).

    Signed-off-by: Nathan Rossi
    Cc: Michal Simek
    Cc: Tom Rini
    Reviewed-by: Tom Rini
    Signed-off-by: Michal Simek

    Nathan Rossi