14 Mar, 2019
5 commits
-
Fix coverity issue: CID 2970630: Resource leak (RESOURCE_LEAK)
leaked_storage: Variable cdns going out of scope leaks the storage
it points to.Memory allocated by devm_kzalloc() won't be freed automatically in
u-boot, free the memory manually here.Test: Coverity scan pass.
Change-Id: I3000a2385941cef3b8b7e01611cfdc999971a4ca
Signed-off-by: Luo Ji -
Fix coverity issues as:
CID 5899697: Dereference before null check (REVERSE_INULL)
CID 3616594: Unchecked return value (CHECKED_RETURN)
CID 3616598: Resource leak (RESOURCE_LEAK)
CID 3616591: Resource leak (RESOURCE_LEAK)Test: Coverity scan pass.
Change-Id: I70abb41c3cd825c6eec43dc7e5baec716ae46680
Signed-off-by: Luo Ji -
Fix coverity issue:
CID 43787: Buffer not null terminated (BUFFER_SIZE_WARNING)
buffer_size_warning: Calling strncpy with a maximum size argument
of 32 bytes on destination array sdev.name of size 32 bytes might
leave the destination string unterminated.Test: Coverity scan pass.
Change-Id: Ib10e631bab893cb9cd1484082229f806b02849ba
Signed-off-by: Luo Ji -
Fix coverity issue: CID 1477258: Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value txbuf when calling __fswab32.Test: Coverity scan pass.
Change-Id: If57f70c272ef49a6636a59ae3b5dcc5430fd1753
Signed-off-by: Luo Ji -
change the mtd rootfs partition index number for i.MX8QXP lpddr4 validation board.
Signed-off-by: Han Xu
(cherry picked from commit 2d5923f215dfcc74b187e3b7ec4af1d0c9462d45)
12 Mar, 2019
8 commits
-
Add defconfig file to support dual bootloader for xen.
Test: build and boot on imx8qm_mek.
Change-Id: I21e372b71a9b25e4cbf71cf7f41cfd87296b9afe
Signed-off-by: Ji Luo -
Meet the build error below with ARM2 SPL defconfig
arch/arm/mach-imx/imx8/image.c: In function ‘spl_nor_get_uboot_base’:
arch/arm/mach-imx/imx8/image.c:224:13: error: ‘CONFIG_SYS_UBOOT_BASE’
undeclared (first use in this function)
if (end
Reviewed-by: Peng Fan
(cherry picked from commit a96fd317601db7f21402e5f74fe24653e2af8ae7) -
Trusty is not supported for xen so we don't need to check
the keyslot package or rollback index in spl. Reassign the
dram address for spl and u-boot to avoid conflicts.Support serial init functions to enable debug console
in spl when xen is running.Test: Boot and A/B slot switch on imx8qm_mek.
Change-Id: If6829252f1ec2e32255f951715c8747181951fd0
Signed-off-by: Ji Luo
Reviewed-by: Peng Fan -
Fix resource leak in libavb, coverity issue:
CID 5899691: Resource leak (RESOURCE_LEAK) leaked_storage: Variable
hash_out going out of scope leaks the storage it points to.CID 5899689: Resource leak (RESOURCE_LEAK) leaked_storage: Variable
hash_buf going out of scope leaks the storage it points to.CID 5899688: Uninitialized pointer read (UNINIT) uninit_use: Using
uninitialized value digest.CID 5899692: Structurally dead code (UNREACHABLE) unreachable: This
code cannot be reached: goto out;Test: Coverity scan pass.
Change-Id: If8e26fdd383c32a9160775006621830b42c0f07e
Signed-off-by: Luo Ji -
Fix coverity issue: CID 5433686: Uninitialized scalar variable (UNINIT)
uninit_use_in_call: Using uninitialized value value when calling
call_imx_sip_ret2.Test: coverity scan pass.
Change-Id: Id89f8f6f69fb944179b34dca4146fd7636505681
Signed-off-by: Luo Ji -
Fix coverity issue CID 3298992: Double free (USE_AFTER_FREE)
double_free: Calling free frees pointer rsrc_data which has
already been freed.Check the rsrc_data buffer before free to avoid free NULL
pointer.Change-Id: I781e87667a5d3bbe25ec12fbae8e3958d9b29244
Signed-off-by: Luo Ji -
The enable pin of USB is controlled by i2c IO expender which is
controlled by M4 image. Add macro to enable virtual i2c function. It
will send i2c message to M4 side to enable USB phy chip.Change-Id: Ib7ed710d293b002526be3bd233921797eb9c6d41
Signed-off-by: Zhang Bo -
Image size is about 30M and 0x8028000+30M has overlaped with malloc
memory. malloc memory end address is 0x88000000 and need to decrease the
malloc size to reserve enough memory for loading kernel and dtb image.The memory address 0x90000000~0x92000000 has been reserved for M4 in
SCFW. Need to change the HDMI firmware loading address to 0x84000000
which is aligned with BSP image.Change-Id: I6f9b6e05a9c9d8b5f7d385632a0ef54a0c20667d
Signed-off-by: Zhang Bo
11 Mar, 2019
2 commits
-
We are currently using SC_R_LAST as a marker for imx8 power domain tree
nodes without a resource attached. This value is compiled into dtb as
part of the linux build and used by uboot.The SC_R_LAST constant changes frequently as SCFW resources are added
(by design) and every time we need to update linux and uboot headers
together or boot can fail.Fix this by replacing SC_R_LAST usage with a new constant SC_R_NONE
defined to be 0xFFF0.Signed-off-by: Leonard Crestez
Reviewed-by: Peng Fan
(cherry picked from commit 93f302a6642adedfdd6336b22d08f32284539e35) -
Also fixes MLK-21051: Replace manually added pads with defines from SCFW
export package.Signed-off-by: Leonard Crestez
Acked-by: Fugang Duan
(cherry picked from commit cc76365cb15dc9d4ba3983ec93094c6017e12d83)
08 Mar, 2019
2 commits
-
Move spl to 0x8000_0000 will cause cpu1 ~ cpu3 jump to spl when
boot/reboot, revert this patch.This reverts commit 7d111f4c8bac25c234b0fc24af885421ce8bb188.
Change-Id: I9adcd980b42a7539d6309cafaabff9d079ca993d
-
Currenlty U1 and U2 low power modes are allowed in device mode.
Allowing U1 and U2 low power modes during data transfers in
device mode is causing U1 exit failure on some USB3 host: which
will transite to SS.inactive instead of U0, then host will send
warm reset and ultimately result in reenumeration. This is observed
on UUU tool with some PC host. Hence disable U1 and U2 low power
modes for now.USB3 spec 7.5.10.4.2 Exit from Recovery.Configuration
The port shall transition to eSS.Inactive when the following
conditions are met:
1. Either the Ux_EXIT_TIMER or the 6-ms timer
(tRecoveryConfigurationTimeout) times out.
2. For a downstream port, the transition to Recovery is not to
attempt a Hot Reset.Signed-off-by: Li Jun
(cherry picked from commit ae0cdc741f7313398539f7b576ced73871f6cd71)
07 Mar, 2019
1 commit
-
The spl is located at ocram which will be lost when suspend/resume,
partition reboot will make A core reboot from the start address of
ATF, which blocks dual bootloader feature on Android Auto.Move the spl to dram and make the partition reboot from spl to fix this
issue. The memory map will be changed to:
SPL: 0x0000_0000 --------> 0x8000_0000
ATF: 0x8000_0000 --------> 0x8004_0000
U-boot: 0x8002_0000 --------> 0x8006_0000Test: reboot ok on imx8qm/imx8qxp.
Change-Id: I49e8be51bf427dd00eb7507de22a787c6f6e1582
Signed-off-by: Ji Luo
05 Mar, 2019
4 commits
-
The HDMI digital PLL, bus clock and core clock need to change to improve the
firmware loading time. The clock are now set to 800 MHz for DPLL, 200 MHz for
HDMI core, and 100 MHz for HDMI bus.Signed-off-by: Oliver Brown
-
Currently when SPL load 3rd container, it will do the authentication
unconditionally. But when running SPL on Xen, the seco authentication
is not supported, and cause failure in loading.Change the parser codes to depend on CONFIG_AHAB_BOOT to do the
authentication.Signed-off-by: Ye Li
Acked-by: Peng Fan
(cherry picked from commit e38169a27fbe052561c5b369500e80477760ec3e) -
Create new config file based on "imx8mq_aiy_android_defconfig"
and enable the CONFIG_IMX_TRUSTY_OS to supprt Trusty OS for AIY.
Also enlarge the malloc poll to 96 MB because calculate hash
with CAAM will consume more heap memory.Test: Trusty OS boots up and CAAM functions work.
Change-Id: Ia4bdf4c32617cb4d2951b63f34f3a4a83f4af1b5
Signed-off-by: Ji Luo -
Trusty OS will check and require the memory passed from non-secure world
is inner shareable. Change the memory attribute as PTE_BLOCK_INNER_SHARE
in u-boot to meet the requirement.Test: build and boot on imx8qm/imx8qxp.
Change-Id: I1aac9b430ecc0fa94f9a1f6dd519b34ce6fef7bd
Signed-off-by: Ji Luo
04 Mar, 2019
2 commits
-
Check the return values for SCFW APIs and print error logs
if the return value is not "SC_ERR_NONE".Test: boot on imx8qm.
Change-Id: Ic7008bd2656375875e77dd3c922dafb1be145357
Signed-off-by: Ji Luo -
On iMX8MM, the V flag in TRISTR register only reflect the state of SNSR
value, not the calibrated TEMP value. So checking this flag is not
reliable. Per IC suggestion, change to read the TEMP/AVG_TEMP directly
and check whether it in valid range 10-125C.Signed-off-by: Ye Li
(cherry picked from commit fe41c5fa6af88cce7f5a9723c82d6ad4e61357ce)
27 Feb, 2019
2 commits
-
Update SCFW API to v1.3 at below commit. A new API sc_pm_set_boot_parm
is added.commit c5ef21f894de0ac8329f0fe540331a272fcd1461
Author: Chuck Cannon
Date: Tue Feb 26 15:36:53 2019 -0600SCF-352: Add more to SECO test.
Signed-off-by: Chuck Cannon
Signed-off-by: Ye Li
Acked-by: Peng Fan
(cherry picked from commit e79209e4174054bb328bae441bf8ab3c1312ee4e) -
Set the default environment "panel" as "NULL" to fix the
LVDS0-HDMI not work issue.Test: LVDS0-HDMI works fine on imx8qm_mek.
Change-Id: I115b0a185717762af911fe1e9237fb26ecbb7e3e
Signed-off-by: Ji Luo
26 Feb, 2019
9 commits
-
Fix a typo in path provided for imx-mkimage iMX8QM and iMX8QXP directories.
Reported-by: Marius Grigoras
Signed-off-by: Breno Lima
Reviewed-by: Ye Li
(cherry picked from commit c75243c1a87a10f003377d9c144bcf412ba80440) -
The commands included in introduction guide should not be used as
reference for programming the SRK Hash fuses as they are in big
endian.Add a note to avoid a possible mistake.
Reported-by: Clement Le Marquis
Signed-off-by: Breno Lima
Reviewed-by: Ye Li
(cherry picked from commit 137319826cc32d98a9b6890f35dd6670e104c2a5) -
Since commit 771b824728ca ("MLK-20919 imx8: ahab: Add command to
close the chip") the U-Boot is able to move the lifecycle from
NXP closed to OEM closed.Update AHAB guides to use U-Boot ahab_close command instead of SCFW CLI.
As the procedure is now independent of SCFW terminal we can remove
this condition from documentation.Signed-off-by: Breno Lima
Reviewed-by: Ye Li
(cherry picked from commit 6f93d877e1454024f666a4810d24148cf595429e) -
Starting in L4.14.78 release, the OP-TEE CAAM driver does not set the
JROWN_NS field in case LMID is locked.We need to include the Unlock MID command in CSF file otherwise device
will fail to boot in HAB closed mode.Add section to avoid crash when OP-TEE is enabled.
Reported-by: Frank Zhang
Signed-off-by: Breno Lima
Reviewed-by: Ye Li
(cherry picked from commit af03284ad38bd03ef1f0d4942842629db93d2c11) -
When flexspi is assigned to M4 for XIP, its power up/down will fail.
This is expected so don't need to give warning.Signed-off-by: Ye Li
(cherry picked from commit 0803b4a9d4074a5bb101d194633cbdd7510a1e9a) -
The CONFIG_QSPI_BOOT has been removed from SPL flexspi build, because
we have to change the u-boot ENV to SD/MMC, and this configuration will
set relevant configurations.But we don't clean up CONFIG_QSPI_BOOT for SPL completely, SPL still has
some places using it and cause problem to flexspi boot.
Using CONFIG_SPL_SPI_SUPPORT to replace the CONFIG_QSPI_BOOT.Signed-off-by: Ye Li
(cherry picked from commit 0491bd4ba21ad620b4c514323a7d6b8a9e10325c) -
If resource is not owned, we ignore sid settings.
When support CM41 + android auto on xen, some resources
are owned by CM41, when CM41 releases those resources,
CM41 will program SID for those resources.Signed-off-by: Peng Fan
Reviewed-by: Flynn xu
(cherry picked from commit cd0ec61b235929d75965c43e82127b73e73e1697) -
Partition creation will be done in xen, remove it from uboot.
And add domu-android-auto propertySigned-off-by: Peng Fan
Reviewed-by: Flynn xu
(cherry picked from commit 23f7a037d14d05c2eea5622bd8ffda2f23d04372) -
Update the ddr training code to work with the atf 2.0.
Test: Build and boot on imx8mq aiy 3G board.
Change-Id: I8546c34cfa4aeeed819f7797f8362676e420b41f
Signed-off-by: Ji Luo
25 Feb, 2019
4 commits
-
Need to enable SPL NOR support for working with M4 XIP image. Missed
it in previous patch.Signed-off-by: Ye Li
(cherry picked from commit 51f7d1e0c46e67355f8361c1bac8322e8c6788a8) -
When M4 is booted by ROM, we have to enable RPMSG in kernel, so need
to select the -rpmsg.dtb. If M4 is not enabled, use default kernel dtb.Signed-off-by: Ye Li
Reviewed-by: Peng Fan
(cherry picked from commit 8a57be45e18295ce1b19799723775cf5b205281d) -
When using fdt_next_node, the depth variable needs being initialized
first, otherwise we many get undefined depth.Signed-off-by: Ye Li
(cherry picked from commit 1ae3d2d3859c5f2610c74cd192da2657e2600aff) -
Remove trusty support in domu, since trusty EL3 not ready to handle
tipc being interrupt by xen. But we still leave the memory for trusty,
then it could be easy to add trusty back.Signed-off-by: Peng Fan
Reviewed-by: Flynn xu
(cherry picked from commit 1623426811bdf59c3d5dcab2be20293910a9bc5d)
23 Feb, 2019
1 commit
-
The iMX8MQLite new part will not disable DCSS in fuse. So change
the codes to check the DCSS fuse before disable relevant FDT nodes
and u-boot HDMI splash screen.Signed-off-by: Ye Li
(cherry picked from commit 9e6ab0397b8d94de8b904250884726e58633066b)