18 May, 2020

13 commits

  • new imx8mn chips have Cortex-M7 inside, not like other imx8m devices
    of imx8mm and imx8mq which have Cortex-M4 inside. the names of MACROs
    used to boot MCU on imx8m devices is modified to make them more common
    to cover M4 and M7.
    annotations are also modified based on the differences between M4 and
    M7.

    Change-Id: Ida272e6ecdf577eeaadb9f1242f4524bd1014cac
    Signed-off-by: faqiang.zhu
    (cherry picked from commit eb825f8d4fbc2289b9ccf8f457fcba04922c8259)

    faqiang.zhu
     
  • imx-regs-imx8mm.h is used both for imx8mm and imx8mn, while mcu in
    imx8mn is Cortex-M7, it's different from Cortex-M4 in imx8mm, change
    the MACRO name of mcu TCM base address from M4_BOOTROM_BASE_ADDR to
    MCU_BOOTROM_BASE_ADDR.
    since this MACRO will be used in common code for i.MX chips, the same
    MACRO name in other files are also modified.

    Change-Id: I433dd78d11c485d0f4cb82bab299f61cb29dce45
    Signed-off-by: faqiang.zhu
    (cherry picked from commit e2eb616fdbc4ce6475b084ab11b77cd5dcaa6fd2)

    faqiang.zhu
     
  • Due SPL doesn't have env, so cannot use mmc_get_env_dev() get
    the mmc index.
    Following spl_mmc.c get correct mmc index in SPL.

    Change-Id: I0f07a9ea35d5b3ba0d638af436238d0cfe925981
    Signed-off-by: Haoran.Wang
    (cherry picked from commit 6e4753b4dc0c5bde5aa573b42cb6b7caa6a95bc9)

    Haoran.Wang
     
  • In Android, the reboot bootloader flag is written to misc partition, in
    the boot flow, u-boot will check that message to decide whether enter
    fastboot mode or not. To be compatible with the common implemention,
    keep the fastboot_set_reboot_flag there and redefine it to avoid the
    error return value which block the reboot process.

    Change-Id: Ifb55236d5a5daf3edd124d3ed01851ff6e916e1a
    Signed-off-by: faqiang.zhu
    (cherry picked from commit aa78cbe3d3148ab99ea039ede767e6d1152092b4)

    faqiang.zhu
     
  • storage_type is emmc or sd, which is not friendly
    for user space, for example android health HAL need access
    /sys/block/mmcblkX/stat.

    Replace it with mmcblkX named as boot_device_root.
    (Keep storage_type for compatibility now)

    Change-Id: I7486d522696e9fe3dde8bdc8834ac11d25df7d79
    Signed-off-by: Jindong
    (cherry picked from commit db441a89a090c46149457ee29492bc315c2bdfa9)

    Jindong
     
  • Serial init in board_init_f will cost much time, skip it here
    because the serial will be initialized again in board_init_r
    and it's more faster (after cache is enabled). We will miss
    some logs before the serial is ready but it's ok for Android Auto.
    This commit will save about 190ms on imx8qm.

    Test: boot ok for both imx8qm and imx8qxp.

    Change-Id: If6efdc19794aecda862f22b6fec7f7aba2005766
    Signed-off-by: Ji Luo
    Reviewed-by: Ye Li
    (cherry picked from commit 690a14ed2fc64328b417a9de448f4a18cc653698)

    Ji Luo
     
  • Blob buffer size is 48 bytes larger than the plain text buffer,
    set correct range when flush the dcache. Also use cache aligned
    buffer for the blob/plain_text to avoid failure in CAAM.

    Change-Id: I8f311b9d21fc7d26d60e9ba23dfb239d2582cedf
    Signed-off-by: Ji Luo
    (cherry picked from commit b3d3a85b9a23d3da3e2133301d5b58fb375946e5)

    Ji Luo
     
  • This commit enables dual bootloader feature for imx8m/imx8q, but
    as commit 'a2018ab' already brings in some dual bootloader codes
    when enabling fastboot support, so this commit won't be a complete
    and standalone patch to introduce the dual bootloader feature.

    This commit will do the following:
    1. clean up dual bootloader flow and add missing implementation.
    2. Merge the dual bootloader entry for fit and container to one
    function 'mmc_load_image_raw_sector_dual_uboot'.

    Change-Id: Ic9410a48092cc05de599dd897fc912177e2a1fe1
    Signed-off-by: Ji Luo

    Ji Luo
     
  • The RPMB keyslot is stored in last block of boot1 partition which
    is easily erased or tampered, set power-on write protection for this
    partition to prevent corruption.

    Test: Power-on write protection works as expected on imx8m.

    Change-Id: Ib7e1094b979f7d94c0a2817391c5b3b5f3205d76
    Signed-off-by: Luo Ji
    (cherry picked from commit c7e207fbbcd8618d29b1192829c630777fea5220)

    Luo Ji
     
  • Driver Module may be used in SPL, with CONFIG_BLK enabled for U-Boot,
    CONFIG_SPL_BLK will be enabled, struct mmc definition will be different.
    comply with that mmc struct definition in fsl_avbkey.c file to handle
    conditions when DM is used in SPL.

    Change-Id: I632600556e764b25228ba467a5e5141cf3fc3dfe
    Signed-off-by: faqiang.zhu
    (cherry picked from commit de905a8a3c6dfdf9241a188b2e22c76dbef851c1)

    faqiang.zhu
     
  • The CAAM driver in u-boot will use JR0 by default, but for
    imx8q, both JR0 and JR1 are assigned to SECO and A core
    should never access them.
    Power on the JR3 in this patchset and use it to complete
    the CAAM operations for imx8q.

    Test: CAAM self test cases pass for imx8q.

    below patches are merged to this commit:
    MA-13964 imx8q: Kick the CAAM JR before kicking the SMMU
    MA-13969 Fix CAAM build warnings

    Change-Id: Ie3d77d1f2910e7f4c257c797c12b5c8a30ad936a
    Signed-off-by: Ji Luo
    (cherry picked from commit d6e0fdcde5773fed4804cdacf927808bd2da3d7d)

    Ji Luo
     
  • Add CAAM RNG generating and BLOB encap/decap
    self test cases.

    Test: Test cases pass on imx8qm_mek/imx6qp_sabresd.

    Change-Id: I538f7b1581b36df83a3006ac133ca9e7b57ab4f0
    Signed-off-by: Ji Luo
    (cherry pick from 89ff2dcb74806fb19d43d5f2c06fb4335cba1231)

    Ji Luo
     
  • libavb is now under the directory of lib/, not lib/avb/ as before, to
    adapt to this change, some modifications are made:
    1. header file inclusion change, including parameter of -I option in
    Makefile
    2. remove fsl_avb_sysdeps_uboot.c as the functions have been defined in
    avb_sysdeps_posix.c.

    Change-Id: I4216e3ddb4e3e810783e4f46b953eda510c2627b
    Signed-off-by: faqiang.zhu
    Signed-off-by: Ji Luo
    (cherry pick from 58010b99560eea2027dd39909eb5b35404e6030e)

    faqiang.zhu
     

15 May, 2020

2 commits


14 May, 2020

1 commit

  • Found below warning in API_AVI.c by using gcc 9.2 to build iMX8MQ EVK

    drivers/video/imx/hdmi/hdp/API_AVI.c: In function ‘cdn_api_set_avi’:
    drivers/video/imx/hdmi/hdp/API_AVI.c:184:8: warning: array subscript 16
    is outside array bounds of ‘unsigned int[4]’ [-Warray-bounds]
    184 | packet[16] = packet_pb12;
    | ~~~~~~^~~~
    drivers/video/imx/hdmi/hdp/API_AVI.c:74:15: note: while referencing ‘packet_buf’
    74 | unsigned int packet_buf[18 / sizeof(unsigned int)];
    | ^~~~~~~~~~
    drivers/video/imx/hdmi/hdp/API_AVI.c:185:8: warning: array subscript 17
    is outside array bounds of ‘unsigned int[4]’ [-Warray-bounds]
    185 | packet[17] = packet_pb13;
    | ~~~~~~^~~~
    drivers/video/imx/hdmi/hdp/API_AVI.c:74:15: note: while referencing ‘packet_buf’
    74 | unsigned int packet_buf[18 / sizeof(unsigned int)];
    | ^~~~~~~~~~

    There are two array overflow issues in the codes:
    1. The packet array size is not correct. The total buf needs 18 bytes,
    but the array size is only 4 words (16 bytes).
    2. When passing the packet array to cdn_api_infoframeset, the size should
    be words size, but it uses a wrong packet length which is calculated
    in bytes

    Signed-off-by: Ye Li
    Reviewed-by: Peng Fan
    (cherry picked from commit 287a4b7816a34e41f3ca7dd12b3e99aa46bed71e)

    Ye Li
     

13 May, 2020

3 commits


12 May, 2020

2 commits

  • The end of line is missed in the Kconfig and causes issues that
    VIDEO_BRIDGE config can't be sed out on some server.

    Signed-off-by: Ye Li
    (cherry picked from commit 1b1982acfa8562dbe9687e1f9fccdd670cdce363)

    Ye Li
     
  • Currently it's not possible to use UUU to program ECC words. U-Boot is
    asking for a second confirmation when programming ECC covered words.
    Introduce a environment variable "force_prog_ecc", if the env is set
    to "y" or "1", then the ecc fuse checking is skipped.

    In uuu usage, just set this variable in uuu script, then there is no
    second confirmation needed.

    Signed-off-by: Ye Li
    Reviewed-by: Peng Fan
    (cherry picked from commit 67fb736f49bcbf42576254b627cee2a8be4d58ed)

    Ye Li
     

11 May, 2020

19 commits