Commit Graph

71612 Commits

Author SHA1 Message Date
Ye Li
89d4976521 hab: Change calling to ROM API failsafe
Modify to use hab_rvt_failsafe function for failsafe ROM API, not
directly call its ROM address. This function will wrap the sip call for iMX8M
platforms.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Utkarsh Gupta
55eab945da imx: HAB: Validate IVT before authenticating image
Calling csf_is_valid() with an un-signed image may lead to data abort
as the CSF pointer could be pointing to a garbage address when accessed
in HAB_HDR_LEN(*(const struct hab_hdr *)(ulong)ivt_initial->csf).

Authenticate image from DDR location 0x80800000...
Check CSF for Write Data command before authenticating image
data abort
pc : [<fff5494c>]          lr : [<fff54910>]
reloc pc : [<8780294c>]    lr : [<87802910>]
sp : fdf45dc8  ip : 00000214     fp : 00000000
r10: fffb6170  r9 : fdf4fec0     r8 : 00722020
r7 : 80f20000  r6 : 80800000     r5 : 80800000  r4 : 00720000
r3 : 17a5aca3  r2 : 00000000     r1 : 80f2201f  r0 : 00000019
Flags: NzcV  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

resetting ...

To avoid such errors during authentication process, validate IVT structure
by calling validate_ivt function which checks the following values in an IVT:

IVT_HEADER = 0x4X2000D1
ENTRY != 0x0
RES1 = 0x0
DCD = 0x0       /* Recommended */
SELF != 0x0     /* Absoulute address of IVT */
CSF != 0x0
RES2 = 0x0

This commit also checks if Image's start address is 4 byte aligned.

commit "0088d127 MLK-14945 HAB: Check if IVT valid before authenticating image"
removed as this patch addresses the issue.

Signed-off-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Peng Fan
1fcd09703c imx: HAB: Update hab codes to support ARM64 and i.MX8M
There are some changes to support ARM64 i.MX8M platform in this patches:
1. The hab_rvt base and function vectors are different as i.MX6/7

2. Need to bypass an workaround for i.MX6 to fix problem in MMU.

3. The x18 register needed save & restore before calling any HAB API. According
   to ARM procedure call spec, the x18 is caller saved when it is used as
   temporary register. So calling HAB API may scratch this register, and
   cause crash once accessing the gd pointer.

   On ARMv7, the r9 is callee saved when it is used as variable register. So
   no need to save & restore it.

4. Add SEC_CONFIG fuse for iMX8M

When current EL is not EL3, the direct calling to HAB will fail because
CAAM/SNVS can't initialize at non-secure mode. In this case, we use
SIP call to run the HAB in ATF.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Ye Li
71c0b0af77 imx: hab: Add function to authenticate kernel image
When loading kernel image, the image size is parsed from header, so it
does not include the CSF and IVT.

Add back the authenticate_image function to wrap the imx_hab_authenticate_image
with calculating IVT offset and full image size.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Breno Lima
5e9f69309d imx: Avoid hardcoded Job Ring Max size
Prior instantiating RNG we have to ensure if the CAAM job rings are
available. Avoid hardcoded job ring max size and use the definition at
fsl_sec.h

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Breno Lima
9756cf53c3 imx: Ensure CAAM clock is enabled prior getting out_jr_size
Prior calling sec_in32() we have to ensure CAAM clock is enabled, the
function sec_in32() is reading CAAM registers and if CAAM clock is disabled
the system will hang.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Breno Lima
405100ba55 imx: Avoid hardcoded output ring size register offset (ORSR)
The CAAM output ring size register offset is currently defined in fsl_sec.h
as FSL_CAAM_ORSR_JRa_OFFSET, use this definition to avoid hardcoded value in
i.MX common code.

Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Breno Lima
61f8eba7b1 imx: imx7 Support for Manufacturing Protection
This code was originally developed by Raul Cardenas <raul.casas@nxp.com>
and modified to be applied in U-Boot imx_v2017.03.

More information about the initial submission can be seen
in the link below:
https://lists.denx.de/pipermail/u-boot/2016-February/245273.html

i.MX7D has an a protection feature for Manufacturing process.
This feature uses asymmetric encryption to sign and verify
authenticated software handled between parties. This command
enables the use of such feature.

The private key is unique and generated once per device.
And it is stored in secure memory and only accessible by CAAM.
Therefore, the public key generation and signature functions
are the only functions available for the user.

The manufacturing-protection authentication process can be used to
authenticate the chip to the OEM's server.

Command usage:

Print the public key for the device.
- mfgprot pubk

Generates Signature over given data.
- mfgprot sign <data_address> <data_size>

Signed-off-by: Raul Ulises Cardenas <raul.casas@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Peng Fan
2cbaf614cf imx8m: add regs used by CAAM
Add regs used by CAAM

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Peng
b8fcf47dbb imx8mn: evk: update MAINTAINERS
Add imx8mn_evk_defconfig to be maintained
Typo fix

Signed-off-by: Peng <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Ye Li
0f894c1aee imx8mq_evk: Applying default LPDDR4 script for B2
Both i.MX8MQ B1 and B2 should use default LPDDR4 script, while B0
has another dedicated script.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Ye Li
9c80e53575 misc: ocotp: Update OCOTP driver for iMX8MQ B2
i.MX8MQ B2 also has fixed value in OCOTP_READ_FUSE_DATA register,
so it does not support "fuse sense" command like B1.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Ye Li
84a351c489 iMX8MQ: Recognize the B2 revision
i.MX8MQ B2 is using same value in OCOTP_READ_FUSE_DATA like B1, so
we have to check the ROM verision to distinguish the revision.

As we have checked the B1 rev for sticky bits work around in
secure boot. So it won't apply on B2.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Peng Fan
eb3ad32754 arch: mach-imx: imx8m: fix unique_id read error for imx8mp
The value of Unique ID in uboot and kernel is different for iMX8MP:

serial#=02e1444a0002aaff
root@imx8mpevk:/sys/devices/soc0# cat soc_uid
D699300002E1444A

The reason is that Fuse Addresses of Unique ID of iMX8MP are 0x420 and
0x430.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Alice Guo <alice.guo@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Ye Li
c8738f6531 imx8m: ddr: Disable CA VREF Training for LPDDR4
Users reported LPDDR4 MR12 value is set to 0 during PHY training,
not the value from FSP timing structure, which cause compliance test failed.
The root cause is the CATrainOpt[0] is set to 1 in 2D FSP timing
but not set in 1D.  According to PHY training application node,
to enable the feature both 1D and 2D need set this field to 1,
otherwise the training result will be incorrect.
The PHY training doc also recommends to set CATrainOpt[0] to 0 to use
MR12 value from message block (FSP structure). So update the LPDDR4
scripts of all mscale to clear CATrainOpt[0].

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Peng Fan
62a7a8e06f imx8m: soc: update fuse path
Update fuse path to disable modules correctly.

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Ye Li
e4263b9748 imx8m: Update thermal and PMU kernel nodes for dual/single cores
For dual core and single core iMX8M parts, the thermal node and PMU node
in kernel DTB also needs update to remove the refers to deleted core nodes.
Otherwise both driver will fail to work.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Ye Li
211f4743e9 imx8mn: Add support for 11x11 UltraLite part number
There are 3 part numbers for 11x11 i.MX8MNano with different core number
configuration: UltraLite Quad/Dual/Solo

Comparing with i.MX8MN Lite parts, they have MIPI DSI disabled. So
checking the MIPI DSI disable fuse to recognize these parts.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Ye Li
9dd35fa7db imx8mn: Add low drive mode support for DDR4/LPDDR4 EVK
Add dedicated defconfigs for iMX8MN low drive mode which set the VDD_SOC
and VDD_DRAM to 0.8v, DDR at 1600MTS (800Mhz clock) and GPU at 200Mhz.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Peng Fan
b0b4ecfc9a imx8mn: Add LPDDR4 EVK board support
Add support for iMX8MN LPDDR4 EVK board which uses 2GB LPDDR4 and
PCA9450B PMIC.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Peng Fan
43a83124fa imx8mn_evk: drop duplicated code
uart clk has been enabled, no need enable again.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:57 -03:00
Peng Fan
f4e44aed12 power: pca9450: add a new parameter for power_pca9450_init
Currently PCA9450 might have address 0x25 or 0x35, so let user
choose the address.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2021-04-27 15:13:56 -03:00
Jacky Bai
95cae9ed31 imx8mn: Update the DDR4 timing script on imx8mn ddr4 evk
On i.MX8MN, we can only support DLL-ON mode only, so update the timing
to support 2400mts & 1066mts setpoint.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:56 -03:00
Peng Fan
f090ea5aa5 imx8mp_evk: Increase VDD_ARM to 0.95v Overdrive voltage
There is a frequency/timing limitation for SOC and ARM, if SOC is OD
voltage/OD freq, then ARM can't run at ND voltage/1.2Ghz, it may have
timing risk from SOC to ARM.

Current VDD_SOC is set to 0.95v OD voltage in SPL, and kernel will
increase bus clocks to OD frequency before it increases ARM voltage.
So to conform to the limitation, we'd better increases VDD_ARM to OD
voltage in SPL.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:56 -03:00
Peng Fan
4df0449c99 imx8mp_evk: spl: clean up including headers
Clean up the including headers

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:56 -03:00
haidong.zheng
7366423a03 imx8mp: refine power on imx8mp board
VDD SOC normal run changed to 0.85V
LPDDR4 freq0 change from 4000MTS to 2400MTS

Signed-off-by: haidong.zheng <haidong.zheng@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:56 -03:00
Ye Li
4acc082972 imx8mp_evk: Update LPDDR4 refresh time
Use more safer refresh time value for 6GB LPDDR4 on this EVK board.
Update the parameters for every frequency point.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:56 -03:00
Ye Li
b60472054e imx8mp_evk: Update LPDDR4 timing for new FW 202006
After switching to new LPDDR4 firmware 202006 version, have to
update the LPDDR4 timing accordingly from RPA tool.

Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Sherry Sun <sherry.sun@nxp.com>
Tested-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:56 -03:00
Sherry Sun
44a7ab03c0 imx8mp: ddr: Add inline ECC feature support
Add inline ECC support for lpddr4 on imx8mp-evk. And add a config which
can enable/disable inline ECC feature for lpddr4 on imx8mp-evk board.

Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:56 -03:00
Peng Fan
6e85a44b08 imx8mp_evk: add/cleanup variable for distro
Add fdt_addr_r fdtfile which used by distro boot
Clean up environment

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:56 -03:00
Peng Fan
d0e56da17a imx8mm_evk: add/cleanup variable for distro
Add fdt_addr_r fdtfile which used by distro boot
Clean up environment

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:56 -03:00
Peng Fan
7bdc71c175 imx8mm/p: remove boot.cmd
These files should not be in U-Boot repo

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:56 -03:00
Ye Li
198cff805b imx8mm_evk: Switch to new imx8mm evk board
Update PMIC to use PCA9540, the legacy board not supported by NXP

Signed-off-by: Ye Li <ye.li@nxp.com>
2021-04-27 15:13:56 -03:00
Ye Li
8e4b8b45fd imx8mm_evk: Update to latest LPDDR4 script
Update LPDDR4 script to sync with v2020.04 u-boot

Signed-off-by: Ye Li <ye.li@nxp.com>
2021-04-27 15:13:56 -03:00
Peng Fan
bb6b1f68ed tools: imx image: fix write warning
Fix the warning by set the variable zero to uint64_t
"warning: ‘write’ reading 5 bytes from a region of size 4"

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2021-04-27 15:13:56 -03:00
Fabio Berton
2ea9a49bda imx: iMX6: Define disconnect_from_pc function
Copied from arch/arm/include/asm/arch-mx7ulp/imx-regs.h

Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br>
2021-04-27 08:57:18 -03:00
Ye Li
be45b06cb5 MLK-21854-2 imx: uuu: Update autoboot to run uuu or fastboot
When booting from USB device, change u-boot autoboot to default
run UUU bootcmd or enter fastboot directly for android.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit eba8710106348a283940b851080b049bc7fbe466)
(cherry picked from commit decfa984826db8ae39e93f2968b8a04d009eef0d)
2021-04-27 08:57:18 -03:00
Otavio Salvador
5ffdb0761a pico-imx6ul, pico-imx7d: Explain how to use eMMC user partition
The default U-Boot environment expects the use of eMMC user
partition. To ensure we are using the proper eMMC partition for boot
we need to run the `mmc partconf` command.

This patch updates the README instructions to avoid users to follow
misleading instructions.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2021-04-27 08:57:17 -03:00
Fabio Estevam
5a14409e0b mx6sabre_common: Dynamically change the video output
Use the 'hdmidetect' command in U-boot to load the appropriate
video arguments. If HDMI is connected during boot then make HDMI
as the primary framebuffer, otherwise let LVDS be the primary framebuffer.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2021-04-27 08:56:03 -03:00
Nikolay Dimitrov
0faab2b983 mx6sabresd: Enable video interfaces in bootargs
Generate kernel video bootargs for sabresd, based on a list of needed video
interfaces ("video_interfaces" U-Boot env-var). The order of initialization
and video settings can be fully customized.

Signed-off-by: Nikolay Dimitrov <picmaster@mail.bg>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2021-04-27 08:56:03 -03:00
Tom Rini
b46dd116ce Prepare v2021.04
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-04-05 11:03:29 -04:00
Fabio Estevam
17bc2cf89b imx8mn_ddr4_evk: Allow booting the kernel by default
Currently it is not possible to boot Linux from the SD card
by default.

Make the necessary adjustments to allow it.

Reported-by: Peter Bergin <peter@berginkonsult.se>
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Tested-by: Andrey Zhizhikin <andrey.z@gmail.com> # imx8mn_ddr4_evk
Reviewed-by: Peng Fan <peng.fan@nxp.com>
2021-04-05 08:08:56 -04:00
Tom Rini
ac2b5d5850 sphinx: Pin to docutils-0.16
In newer docutils writers/latex2e/docutils.sty has a unicode character
in the comments which can in turn cause Python 3.6 at least to fail.
Pin to the previous docutils release for now.

Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
2021-04-04 16:07:09 -04:00
Heinrich Schuchardt
7823ba3397 cmd: CMD_USB depends on USB
The usb command cannot be compiled with CONFIG_USB=n:

ld.bfd: cmd/usb.c:660: undefined reference to `usb_stop'
ld.bfd: cmd/usb.c:663: undefined reference to `usb_started'

Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2021-04-04 16:06:25 -04:00
Simon Glass
a0da06d2f8 Makefile: Silence the deprecation script
This bash code is currently showing up in the build unless 'make -s' is
used. We don't normally show these sorts of things as they are confusing.
Also this code was not shown before the recent refactoring of how these
messages are displayed.

Add an '@' to silence it.

Suggested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Bin Meng <bmeng.cn@gmail.com>
Fixes: 1373252851 ("Makefile: Add common code to report deprecation")
2021-04-01 10:35:16 -04:00
Tom Rini
43d3de544d Pull request for efi-2021-04-rc6
Bug fix:
     Fix ConvertDeviceNodeToText() for Uart()
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEbcT5xx8ppvoGt20zxIHbvCwFGsQFAmBkp/8ACgkQxIHbvCwF
 GsT79BAAikr7H07iBzHFAcBvIXgTmBnsfb/ylUL3RCEho0knFG7G34glAhXx0l4Z
 V5gXHPvLVW6T6QWLxcwdBgCblWq4EgF5DPpmcb4Ph7jaSrYwoTbs/p2WWCj0XueQ
 n+KLHPof2nqDSOw/KcleP6xnsoCUEjMVCw71OjDmn5o9A8uLO0Pgh25fJt/3KOlO
 DYT4WxxzdV8vzoZ51Bu/rZnLo+SJa6kS0Ds6BNJ7DcYV8NWEy/T6dPmZxf6AQVXC
 DNOFsiqPcoWW1fxXBKi2g9giGgHpVC37RrUCNcf/2Ks2pYz6bl/oqR6xPvdNjsJ7
 swgI+bnHACfclggwa7yxYTcAnZ7Az3ZOJqvz6J4Kn8tCmD/HoYihIy+A2FICxUjy
 wCMGvM0bVddsW4CbQgyvaGrnRIqJa8Ncsvbg8OrzR10j/KKpMKcL9lRM4edfGgBh
 jwkVyMBmLX+a9Xbac89rRc8R4QyE6/aKg2tdAYv67uoM2mJAME+ZECnpw9pn93PT
 6XbmFAnUp+MWO8RD264sHPSQkUMyHW7ZuIjDNuA+3B2Fs9stITbABSHyrDgDuufS
 qJFZeb3yjOOxY3q5Spq60xoszrwnU4DxgUxbhFpYffKRFMGICOK3Ad9gXGrfaxYA
 B78xj9l3FgIfFG65uRIqXVCTcLhOXIuk2Yk67ofBQOBF5+Ts6z8=
 =+Ofd
 -----END PGP SIGNATURE-----

Merge tag 'efi-2021-04-rc6' of https://source.denx.de/u-boot/custodians/u-boot-efi

Pull request for efi-2021-04-rc6

Bug fix:
    Fix ConvertDeviceNodeToText() for Uart()
2021-03-31 13:05:57 -04:00
Andy Shevchenko
1ba21bb06b test: Don't unmount not (yet) mounted system
When test suite tries to create a file for a new filesystem test case and fails,
the clean up of the exception tries to unmount the image, that has not yet been
mounted. When it happens, the fuse_mounted global variable is set to False and
inconveniently the test case tries to use sudo, so without this change the
admin of the machine gets an (annoying) email:

  Subject: *** SECURITY information for example.com ***

  example.com : Feb  5 19:43:47 : ... COMMAND=/bin/umount .../build-sandbox/persistent-data/mnt

and second run of the test cases on uncleaned build folder will ask for sudo
which is not what expected.

Besides that there is a double unmount calls during successfully run test case.

All of these due to over engineered Python try-except clause and people didn't
get it properly at all. The rule of thumb is that don't use more keywords than
try-except in the exception handling code. Nevertheless, here we adjust code
to be less intrusive to the initial logic behind that complex and unclear
constructions in the test case, although it adds a lot of lines of the code,
i.e. splits one exception handler to three, so on each step we know what
cleanup shall perform.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
2021-03-31 07:50:17 -04:00
Tom Rini
dd85c9500c Merge https://source.denx.de/u-boot/custodians/u-boot-sunxi
- H616 fixes to keep it in sync with upstream TF-A
2021-03-31 07:48:47 -04:00
Andre Przywara
62acef239f sunxi: dts: H616: Drop reserved-memory node
Trusted Firmware now adds the /reserved-memory subnode to the DT at
runtime[1], putting in the right values.

Drop our hard-coded version, as this might clash with the actual values
(which have also changed), and rely on TF-A to add the node.

[1] https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/7770

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Samuel Holland <samuel@sholland.org>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
2021-03-31 09:50:31 +01:00
Andre Przywara
c629ba854f sunxi: H616: Change TF-A load address to beginning of DRAM
Loading Trusted-Firmware's BL31 at 16KB into DRAM was originally a hack
to allow sharing more code with the other SoCs (which use this offset
in SRAM). However there is no longer a reason for that, as the
problematic macros have been properly separated there.

The latest (and hopefully final) TF-A code drop now changes the load
address to the beginning of DRAM, which is also more easily protected
by the Trustzone memory controller (code to be done).

Adjust the load address of BL31 now, to avoid any issues with
incompatible versions later on (the TF-A patches are about to be merged).

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Samuel Holland <samuel@sholland.org>
2021-03-31 09:50:05 +01:00