Ji Luo [Thu, 18 Jun 2020 02:01:19 +0000 (10:01 +0800)]
MA-17387 Remove the rpmb handle flag in hwcrypto
The handle_rpmb flag should indicate whether the call will invoke
RPMB callbacks, which has been removed by below commit:
commit
dfd911856d31fd91eb4e3c1edb1d691723c6edaf
Author: Roberto Pereira <rpere@google.com>
Date: Thu Nov 2 15:09:20 2017 -0700
ql-tipc: trusty_ipc: Change ipc polling to be per device
This allows ipc devices to provide service callbacks (e.g. rpmb) transparently
to the application instead of needing to have prior knowledge of the expected
request and having to poll the individual services' channels separately.
Change-Id: I3257ae5e429f4a0c279f070d750b56c5600c38d5
Sync the change for hwcrypto, it will help remove some build warnings.
Test: builds and boots with trusty.
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: I696b13d9d509d5983c934df5ee6fb36e46f4c884
(cherry picked from commit
8812d39018c23cc26afa43a97acf27427979c90c)
(cherry picked from commit
e79c079bd3f10d4fd80d33edeae184d53f80f706)
Ji Luo [Thu, 18 Jun 2020 02:52:37 +0000 (10:52 +0800)]
MA-17390 Clean build warnings for android
This commit eliminate the annoying build warning logs.
Test: builds with buildman.
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: Ia335dafe3f4c0eab08e011215b9de5d2974b8d0c
(cherry picked from commit
85e0d429d19b8f9a62369a5f20e088644c488b1e)
(cherry picked from commit
52471735760a8d3a410f88c144910a07a161028d)
Ji Luo [Wed, 17 Jun 2020 07:44:05 +0000 (15:44 +0800)]
MA-17382 spl: Add weak function at the end of image load
Add a weak function after the image load in case we have extra
steps to complete, like check the rpmb keyblob for trusty enabled
platform.
Test: Boots with trusty.
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: Ie8181fcb32d1640e39fdcc3cebb2dbf50cbfdbab
(cherry picked from commit
b16fc52cf9a9ea4d63bced50b949d0bc2328ddea)
(cherry picked from commit
3e40454cdac6b7b63cdff36ab48f86e4b98502be)
Ji Luo [Wed, 10 Jun 2020 10:29:54 +0000 (18:29 +0800)]
MA-17353-1 Add system board reset command for imx8q devices
Default 'reset' command in bootloader will only trigger partition reboot
for A core, which will not reload everything (like SPL, SCFW, M4, etc.).
Sometimes, we want to trigger a board reboot without pressing the reset
button, it can be very helpful in some cases like remote debugging...
This commit adds command 'reboot' to trigger system board reboot via the
psci interface provided by ATF, it's enabled on i.MX 8 Quad platforms only.
Test: system board reboot on imx8qm/imx8qxp.
Change-Id: I27f2291806b6959d46fa6f55fe186041d141d2f4
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
f8a127354ba4f77ba5b1af87f692133bb704cfe0)
(cherry picked from commit
646b99c6bcba96c97d3517a2c21d54908a8c4ed5)
zhang sanshan [Thu, 28 May 2020 08:13:53 +0000 (16:13 +0800)]
MA-17261 fix start kernel hang issue
overwrite the console to hvc0 in xen, otherwise it will hang at starting kernel.
specific androidboot.android_dt_dir which define dts, and let the system mount in first stage. It may change in xen.
disable selinux temporarily
Change-Id: I90d4c374f0d0478d6386ae31cddb3f7ef510ae93
Signed-off-by: zhang sanshan <pete.zhang@nxp.com>
(cherry picked from commit:
e7ddf17f0e95867d0e59ef5e7aef1e3b5c4e7a3b)
Ji Luo [Thu, 28 May 2020 03:06:37 +0000 (11:06 +0800)]
MA-17260 Add vendor boot and boot header v3 support
GKI(Generic Kernel Image) would require the boot header v3 and vendor
boot support, all device specific info are moved to vendor_boot partition
,the boot header v3 will not be compatible with earlier version(0/1/2).
This commit adds support for boot header v3 and vendor boot, it would
concatenate the generic ramdisk and vendor ramdisk to generate the
final ramdisk passed to kernel.
Test: boots with or without boot header v3 and vendor boot support.
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Change-Id: Ib3298ae46bfc728aa4a34909d372eff6cc86ca70
(cherry picked from commit
c3854f270a19e7d57b996e6074d692ab9bc88c32)
Ji Luo [Fri, 22 May 2020 02:54:30 +0000 (10:54 +0800)]
MA-17226 Invalidate the dcache after DMA operation
The main memory contents can spontaneously come to the cache due to
the speculative memory access by the CPU, this may cause coherency
problem if this happens during the DMA operaion is on-going.
Invalidate the dcache range after DMA opeartion but before the main
memory read to avoid coherency problem.
Test: reboot test.
Change-Id: I93824deab9285b5478669e0a311e0b338bf02f8a
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
4cd1d087111dd3b4ddaad33ef4862f7ac1ab1b34)
Ji Luo [Tue, 28 Apr 2020 02:52:56 +0000 (10:52 +0800)]
MA-17046-3 Add implementation to get ONOFF button status
Add board level implementation to get the ON-OFF button
status for imx8q/imx8m.
Test: Get ON-OFF button status on imx7ulp/imx8m/imx8q.
Change-Id: I8e4ea61ec1c52ab7cfa20b5498756a25f3cd2f8d
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
44c6edfbd2607f1458220031467fc7de20dc46be)
Ji Luo [Tue, 28 Apr 2020 02:05:33 +0000 (10:05 +0800)]
MA-17046-2 imx8q: porting scu api to get onoff button status
Porting the scu api 'sc_misc_get_button_status()' to get the
ON-OFF button status.
Test: Get the ON-OFF button status.
Change-Id: I8e06ef4dc170750fe2dfbeeba7850b5e0dcfc774
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
130747618d813ea64611ed111e5d80487aa154b6)
Ji Luo [Mon, 18 May 2020 03:02:13 +0000 (11:02 +0800)]
MA-17144 Only do security check for rpmb key flashed boards
Only check the bootloader rollback index and trusty keyslot package
for rpmb key flashed boards.
Test: boots on boards without rpmb key.
Change-Id: I130e4d906c0f08d602eac820ec5612214e01ff55
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry pick from commit
bb0c880bb2cd5d9414b4c167eac546682a5d5ccc)
Ji Luo [Thu, 14 May 2020 08:34:19 +0000 (16:34 +0800)]
MA-13050-5 [Android] support evs on mek-8qxp board
camera sometime can't been open once run M4 image.
ISI-CH0 probe funtion is not called when meet issue.
The root cause is:
M4 image set assign resource SC_R_ISI_CH0 into m4 partition
when open camera in m4 side.
Uboot will call update_fdt_with_owned_resources to check
the pd in current dts node. it will call sc_rm_is_resource_owned to
check the pd whether in other partition, if yes, it will delete
the dts node. uboot delete isi_0 node whose pd is SC_R_ISI_CH0.
add CONFIG_SKIP_RESOURCE_CHECKING to skip checking resource when load
dtb.
Change-Id: Iaf9a5eda07074c45c15c43f23cb6ad6b5a77de47
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
(cherry picked from commit:
bd0682f5b3208525363690d446bc86da15a43120)
faqiang.zhu [Thu, 16 Apr 2020 12:46:24 +0000 (20:46 +0800)]
MA-16940 remove logically dead code
boot_buf was used to point to the memory allocated in do_boota function
to save boot partition data. now boot partition is loaded by AVB, this
boot_buf should be removed.
Change-Id: I614c412b5f7ed980d29106b364a8193c56db13dc
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
(cherry picked from commit
2a27f021798e31a8bab37804b053d2b9ebaea928)
(cherry picked from commit
4ae3275bb7065dfcf99dcdf559eaf99d044c51e0)
Ji Luo [Wed, 8 Apr 2020 04:34:55 +0000 (12:34 +0800)]
MA-16877 Skip kernel hab authentication for android
Android use AVB to verify the kernel, hab authentication is
not necessary for boot image.
For imx8m, don't authenticate the kernel image when AVB
(CONFIG_AVB_SUPPORT) is enabled. For imx8q, as android uses
different 'CONFIG_EXTRA_ENV_SETTINGS' and 'CONFIG_BOOTCOMMAND'
with linux bsp, so it won't try to do kernel hab authentication.
by default.
Test: boot imx8mp with "CONFIG_IMX_HAB" and imx8qxp with
'CONFIG_AHAB_BOOT'.
Change-Id: I1b2087ce7d8f9795422a053b6b68a694c86f0b3d
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
f907e4ac090e960ba5110b8039cccc4296841595)
(cherry picked from commit
f9f6ae742696f51326ec7da5b0c74a7fca21f774)
Ji Luo [Thu, 5 Mar 2020 07:41:06 +0000 (15:41 +0800)]
MA-16594-1 Set dtb load offset in bootloader
This commit sets the dtb load address in bootloader, the
dtb load address would be 'kernel_addr + FDT_OFFSET_TO_KERNEL'.
For imx8m, this commit will reserve 64MB for kernel, 2MB for fdt
and 16MB for ramdisk. For imx8q, this commit will reserve 60MB for
kernel, 1.5MB for fdt and 16MB for ramdisk.
This commit is a merge of below commits:
f581f72be1 MA-16594-1 Set dtb load offset in bootloader
207f813b2d MA-16668-2 Fix kernel hang after enabling debug configs
42cdd5ef6d MA-16939-1 correct reserved space for kernel image for non-imx8 SoC
Change-Id: Ie597731992107ec2343e5ab6db0cab0e123f009c
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Haoran.Wang [Wed, 26 Feb 2020 00:45:13 +0000 (08:45 +0800)]
MA-16457-2 support reboot-fastboot command in u-boot
Android implement the userspace fastboot in Android Recovery.
Follow Google's spec, added below 2 fastboot command support:
* fastboot getvar is-userspace
* fastboot reboot fastboot
TEST: fastboot commands.
Change-Id: Ib6047413be0a45b3c00626cdb8594809eb8a2b6b
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
(cherry picked from commit
314bded076dfc3e544cc7094ce3f6c4c330be4dd)
(cherry picked from commit
89e63a8f1b20dfe5633f4d854aeb6d712b3ccaa4)
faqiang.zhu [Tue, 25 Feb 2020 02:18:24 +0000 (10:18 +0800)]
MA-16457-1 avoid to try to access system partition
To enable dynamic partition feature, system partition will be a logic
parition in "super" partition, uboot can't access system partition
anymore.
In i.MX Android use case, only vbmeta partition is used to verify other
imags. boot and system are not used. so there is no need to access
system partition to get avb device info, remove system partition from
avb lib for standard android.
Now, standard Android will boot with ramdisk in boot.img, there is no
need to provide root info to kernel for standard Android. so only
Android Auto will provide this info.
Change-Id: I99a43eb8f7aa1dc635e3937c93266f881c9b3655
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
(cherry picked from commit
3a2418a1cc097cd956347fc12b0b4e0566652bfd)
(cherry picked from commit
133644540d6e5c89cc6e8109b2bf3ac6a9b897d1)
Ji Luo [Tue, 18 Feb 2020 07:32:39 +0000 (15:32 +0800)]
MA-16418 [Android] Support imx8mp spl boot from mmc
Add mmc board level implementation for imx8mp, so we can support
boot from mmc besides ROMAPI.
Test: eMMC/SD boot.
Change-Id: Ie3c28e5622dd819583e2146557ac75f89dbe19ef
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
05b64483e5f46f82beb7f542d0148498fc21334f)
Ji Luo [Fri, 6 Dec 2019 09:34:46 +0000 (17:34 +0800)]
MA-16203 Load boot/dtbo image to fixed memory
When the device is locked, avb will try to verify one slot
first, it will continue to verify another if the first slot
returns failure. Function load_full_partition() will alloc memory
to load boot/dtbo images from heap (which is a big and continuous
memory region), this memory will be freed if the first slot returns
verify failure. but because part of the continous memory region
will be used in following verify process, even total available memory
is enough, u-boot can't find a continous memory region to load the
boot/dtbo image for another slot and will return error "Failed to
allocate memory".
Instead, this commit use fixed memory region start from 96MB offset of
CONFIG_FASTBOOT_BUF_ADDR to load the boot/dtbo images.
Test: slot verify and A/B slot switch.
Change-Id: Ifc83bed5a6be37196c0fd109d942eaf9b07b6a74
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
d13752e831957fb84c71f8ca24fd1979d3605cde)
(cherry picked from commit
11f79ca63338a00960e90763d4764956907fdcb5)
faqiang.zhu [Thu, 26 Dec 2019 05:35:28 +0000 (13:35 +0800)]
MA-16191 eliminate warning info about "is-logical" when flash images
"is-logical" is used to check whether the partition to be flashed is
dynamic partition, if it is, a partition resize command will be issued
by host fastboot. this can be well processed in fastbootd.
process this "is-logical" in uboot, now there is no logical partition,
for every partition found in u-boot, returns "no".
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
Change-Id: I4d93a0c7b32fed9fe5a5ac846bc4e97bfbe69e67
(cherry picked from commit
7b27a2290aec78b49ce7c2aed497db858f436eb4)
(cherry picked from commit
cfc8e3034c5ce4f6f777bc7faff3dbb880de43fe)
Ji Luo [Wed, 20 Nov 2019 05:53:54 +0000 (13:53 +0800)]
MA-15860 Get and switch the target dev in fastboot erase
Target mmc dev is not properly switched when the device enters
fastboot mode via uuu "-i" parameter, which causes "erase"
operation doesn't work.
Get and switch the target mmc dev every time before erase operations
happen.
Test: "fastboot erase boot_a" in uuu fastboot mode.
Change-Id: I4822d2b4ecfd2d874dfbe7474d6824b8fc3a7903
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
46161b62c341139dcdbb13e00634ae8ae903c5da)
(cherry picked from commit
b66d13c7ecd1c1e44dd9edb6c0d5566b4f738bbe)
Ji Luo [Mon, 4 Nov 2019 14:32:45 +0000 (22:32 +0800)]
MA-15813 [Android] imx8q: Enable reset in spl stage
To avoid both A/B slots are marked as unbootable because
of some random failures, we will need to reset at spl stage
when current slot load/verify fail but already with flag
"successful_boot" set.
imx8q can't be reset via the psci driver because the atf
is not avaiable at spl stage, porting the sc_pm_reboot()
scu api so we can do reset at spl stage for imx8qm/imx8qxp
mek boards.
Test: reset on imx8qm_mek and imx8qxp_mek.
Change-Id: Ifa0bdea9393e413942a8a0188a4f937fa0aa9ab8
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from
a5c5748101c383bc3afb424a3ef2689ab2664846)
(cherry picked from
c9f8d7c19a7fc20c99e061beabbb094b6bd50f52)
Ji Luo [Mon, 11 May 2020 03:47:46 +0000 (11:47 +0800)]
MA-15814 Check 'successful_boot' flag before marking unbootable
Slot will be marked as "unbootable" state if error happens during
image load/verify process, this may cause the board never boot up
if some random failures happen (like eMMC/DRAM access error at some
critical temperature).
Check the "successful_boot" flag before marking the slot as "unbootable",
this will help ease the "no bootable slot" issue.
Test: slot switch on imx8qm_mek.
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
6db8ebe2224ab6656e8e798288bd1b3c0472c0c0)
(cherry picked from commit
b64a9dcd87da333265c2ac4da2be8a735186b77e)
Change-Id: Ib060b11cc6687a3bacd09cecda7dd925beba6316
Ji Luo [Mon, 11 May 2020 02:09:52 +0000 (10:09 +0800)]
MA-16966 Add hdmi rx/tx fw loading function
Add implementation to load hdmi rx/tx firmwares, use different config to
guide the function.
Change-Id: Ibb43c2301b5f6cdc8b5103bd04cc30baefac9b9f
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
942bf95ae42750a1f8b8092040ebb3ca144777fd)
Ji Luo [Thu, 24 Oct 2019 06:06:41 +0000 (14:06 +0800)]
MA-15715-1 Refine trusty logs
Refine trusty logs output to make it more
simple.
Test: boots.
Change-Id: Id94fc245206c5f78e0dbcb0baf5db6475c9f744d
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
a50b4fca22111fe7b85b5584ff317db55d664c50)
(cherry picked from commit
c17f0cb30c23ed6dab7312cec88707cb355e91a3)
faqiang.zhu [Sun, 29 Sep 2019 01:56:31 +0000 (09:56 +0800)]
MA-15339-1 load ramdisk in boot image to do first stage mount
With Android10 code, to build GSI image for devices launching with
Android10, the target should be "aosp_$arch-user". Google releases GSI
images is so built in user mode.
To do CTS-on-GSI test, a debug ramdisk containing .prop file to enable
adb root permission and GSI keys to verify the GSI image is needed, this
ramdisk is in boot image. so ramdisk in boot image need to be loaded by
uboot even in non-recovery mode.
To save boot time, only standard Android use ramdisk to boot up Android,
Android Auto keeps the original way: kernel be responsible for verify
and mount system partition. Let the customers to decide whether to use
recovery ramdisk to boot the system. and under this condition, user-debug
Android Auto GSI image need to be used for VTS-on-GSI test.
when use ramdisk to bootup Android, info provided by "dm=" bootarg is
not used by kernel to setup dm-verity, so it is removed from the
bootargs. The 4.19 kernel used together with this uboot does not handle
"skip_initramfs", so it's also removed.
Change-Id: Ia8b8fa8b85a44acda2670b46504038a009ce01a8
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
(cherry picked from commit
e7d3c9ee1a713434d2948928ff0c4daea09ce3dc)
(cherry picked from commit
8f191d088797e9fbea49f482d0aa517f989b7821)
Ji Luo [Tue, 8 Oct 2019 13:22:24 +0000 (21:22 +0800)]
MA-15575-3 Add support for oemlock 1.0 hal
Add commands to read oem device unlock state from
trusty avb app. Use the oem device unlock state to
determine if the device can be unlocked instead of
the state in persistdata part.
Test: Read oem device unlock state from avb app.
Change-Id: Ifccaa788ba0f681c2b3a47151c8474e8da5a2559
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
c6eaf8e32987f120c0c5441ea39aa0f39a65b50d)
(cherry picked from commit
8b58afda1cd1f91048504b48b95260e930a37326)
Ji Luo [Tue, 27 Aug 2019 07:41:57 +0000 (15:41 +0800)]
MA-15360 Verify vbmeta public key for non-trusty devices
Don't skip vbmeta public key verify for non-trusty
platforms.
Test: boot on imx8mm.
Change-Id: I4712e5dd6e5c8848468e9d85c6b38eb5fb11377f
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
9b8264c89ccb3e9179a438e428ad79d72c7efe9b)
(cherry picked from commit
75d9dfb2474d03bd83a5b4d3f03d0a5cea6ea25d)
Ji Luo [Thu, 15 Aug 2019 12:53:53 +0000 (20:53 +0800)]
MA-15321-3 Support secure unlock feature
Decrypt and verify the secure credential in keymaster TA, unlock
operation can only be allowed after secure credential verify pass.
Since the mppubk can only be generated on hab closed imx8q, so secure
unlock feature can only supported when hab is closed.
Test: secure unlock credential verify on hab closed imx8mm_evk.
Change-Id: I1ab5e24df28d1e75ff853de3adf29f34da1d0a71
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
631149fc0fc8ce035311949db643c2708e41435a)
(cherry picked from commit
063d358ab4bbfea998e0c975f31724757243545a)
Ji Luo [Thu, 15 Aug 2019 03:17:00 +0000 (11:17 +0800)]
MA-15321-2 Add command to get serial number
Add commands to support extract serial number from device.
Commands:
$ fastboot oem get-serial-number
$ fastboot get_staged <path-to-serial-number>
Test: serial number upload on imx8mm.
Change-Id: I5c905ab797d4fd28d76c8403914f191eaf2ef687
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
250ef119c1dc02908046113893df5eeb9ef40605)
Ji Luo [Thu, 18 Jul 2019 05:56:45 +0000 (13:56 +0800)]
MA-15158 Set spl recovery mode for dual bootloader
The A/B slot selection is moved to spl, it may lead to hang
if no bootable slots found. The only way to recover the board
is re-flash images with uuu tool, which is quite inconvenient
for some customers who can't enter serial download mode.
This patch will set "spl recovery mode" which will give us a
chance to re-flash images with fastboot commands.
Test: Enter spl recovery mode and flash images when no bootable
slots found.
Change-Id: I31278f5212bde7609fe2f49e77b3849e92c0c516
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
46cc755cf3f42422ee1d7783394e14e8125df2b6)
(cherry picked from commit
047f09ef2ef33657d76fd92d8f5599e00158cd6b)
faqiang.zhu [Wed, 17 Jul 2019 07:32:00 +0000 (15:32 +0800)]
MA-15152 erase user data before setting lock/unlock status
when conduct fastboot lock/unlock operations, erase the userdata first
and then set lock/unlock status to improve security level.
Change-Id: I74c571c35b88afd6fdd4c287463f7209da8c15ff
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
(cherry picked from commit
b81f0b617d23548cd30953b94aca4ff8cc4da723)
(cherry picked from commit
fb9d5e07623098aefd12a81d74c0779060b0bf0a)
Ji Luo [Wed, 17 Jul 2019 04:21:09 +0000 (12:21 +0800)]
MA-15151 Limit some hwcrypto commands within bootloader
It can be dangerous to export some hwcrypto commands to Linux,
add commands to limit some commands within bootloader.
Test: hwcrypto commands can't be used after locking boot state.
Change-Id: Ib0a96a87f661778c133178840d8dccf49f151c22
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
3fc3f521957677b1f363624494ed866985a25505)
(cherry picked from commit
38f9975064dbd6b9c7183a5e7fc54a099a56e973)
Ji Luo [Sat, 22 Jun 2019 02:18:01 +0000 (10:18 +0800)]
MA-15017 Add new command to generate bkek from trusty
Add new command to generate bkek from trusty.
Test: generate and dump bkek.
Change-Id: I6b2a30b87c755eecd00ced7c53cfb86e432040de
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
6c1087c030de491a12b7f1be9d332f30ba27d183)
(cherry picked from commit
02f0cd1484bc8883d784e08ea9c8fd2e9fc7dd3d)
Ji Luo [Fri, 21 Jun 2019 00:52:40 +0000 (08:52 +0800)]
MA-15015 Add sha256_hmac support
Add sha256 hmac support in u-boot.
Test: hmac calculation.
Change-Id: I0f1438fed8290620a1bb0663d19c21e20098eb5a
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from
1e06de6ef23c1ae9d51383f3c57bb045ea180c03)
Haoran.Wang [Tue, 16 Jul 2019 05:12:15 +0000 (13:12 +0800)]
MA-15142 Support secure attestation provision
In host end, need encrypt the attestation keys and certs
by manufacture protection public key though AES-128-ECB.
Then use below 4 set of commands to provision encrypted
RSA attestation and EC attestation:
* $fastboot stage atte_rsa_key.bin
* $fastboot oem set-rsa-atte-key-enc
* $fastboot stage atte_rsa_cert.bin
* $fastboot oem append-rsa-atte-cert-enc
* $fastboot stage atte_ec_key.bin
* $fastboot oem set-ec-atte-key-enc
* $fastboot stage atte_ec_cert.bin
* $fastboot oem append-ec-atte-cert-enc
Change-Id: I8a7c64004a17f7dde89f28c3123a2e2b1a6d3346
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
(cherry picked from commit
58965915dd69050429142d3d180c75e98ad14788)
Ji Luo [Mon, 15 Jul 2019 09:26:30 +0000 (17:26 +0800)]
MA-15019-1 Support Manufacture Protection public key generation
Add new keymaster commands to get Manufacure Production key (mppubk).
Since the mppubk can only be generated in OEM CLOSED imx8q board, so
we can only use this command when the board is HAB/AHAB closed.
Commands to extract the mppubk:
* $fastboot oem get-mppubk
* $fastboot get_staged mppubk.bin
Test: Generate and dump the mppubk.bin
Change-Id: Idc59e78ca6345497e744162664b8293f50d1eda4
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
52300d644a275dfa4fe73ecb51601a8efaff8ab7)
Haoran.Wang [Tue, 9 Jul 2019 04:16:23 +0000 (12:16 +0800)]
MA-15087-4 Support mmc loader for imx8mn_evk
Align using emmc loader when there is no Trusty OS for Android standard
boot in SD/EMMC.
Add hook for getting correct offset when load uboot.
Change-Id: I5898cf196e734ffaca1a513918a049ce504b14e9
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
(cherry picked from commit
c5151ab339c9a37a6c95cabebe328aeba88636f9)
Haoran.Wang [Thu, 6 Jun 2019 04:51:06 +0000 (12:51 +0800)]
MA-14948 Append lock status by Android Property
Follow Bootloader requirement spec in
https://source.android.com/devices/bootloader/unlock-trusty.
Need to pass the flash lock status by androidboot.flash.locked.
This patch fixed the GTS failure
com.google.android.gts.persistentdata.PersistentDataHostTest#testTestGetFlashLockState.
Change-Id: I9a3508f7546b02c998e7668df2a33f864a58db75
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
(cherry picked from commit
3f2c4d49fe147637e61309421e5817b3e574ed56)
yang.tian [Fri, 5 Jul 2019 09:48:33 +0000 (17:48 +0800)]
MA-15082 Do not pass btmacaddr from uboot if serial is all zero
Do not pass BDADDR from uboot cmdline when
serial is all zero, and instead btmacaddr
will be set from persist.service.bdroid.bdaddr
which is set in device's init.freescale.rc
Change-Id: I429c6f369d0b7aaca643443fe505d943a3901215
Signed-off-by: yang.tian <yang.tian@nxp.com>
(cherry picked from
c23398fb379131ad3c5c17c3d762c582796698fb)
Ji Luo [Tue, 23 Jul 2019 07:19:20 +0000 (15:19 +0800)]
MA-15062-2 change mcu firmware partition name
new imx8mn chips have Cortex-M7 inside, not like any other existing
multi-core i.MX MPU, users may manually flash mcu firmware with
fastboot, partition name need to be specified at the same time, so the
mcu firmware partition name need to be changed. related enum and
variable names are also modified.
Change-Id: Ia801e76fb3a20d0074dbbc1433258358c1a53907
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
dc25b7b27fa5c2293d09789a338a1aed2e3a010f)
Haoran.Wang [Mon, 22 Jul 2019 09:45:49 +0000 (17:45 +0800)]
MA-15208 Remap mmc device id in spl
This patch adds mmc device id remap function in spl to get the
correct device id.
Test: boot on imx8mm with trusty enabled.
Change-Id: I41c46494326d9eb2658d2cda692968fb895d0292
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit
c079188d06b3669df7836e1b8c6126558b1fa39e)
faqiang.zhu [Tue, 9 Jul 2019 10:52:12 +0000 (18:52 +0800)]
MA-14916-10 fix fastboot reboot bootloader issue
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 <faqiang.zhu@nxp.com>
(cherry picked from commit
aa78cbe3d3148ab99ea039ede767e6d1152092b4)
Jindong [Mon, 13 May 2019 10:10:25 +0000 (18:10 +0800)]
MA-14712 change androidboot.storage_type to androidboot.boot_device_root
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.
Change-Id: I7486d522696e9fe3dde8bdc8834ac11d25df7d79
Signed-off-by: Jindong <jindong.yue@nxp.com>
(cherry picked from commit
db441a89a090c46149457ee29492bc315c2bdfa9)
Ji Luo [Sun, 30 Sep 2018 07:24:09 +0000 (15:24 +0800)]
MA-12973 [AUTO] Skip serial init in board_init_f
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 <ji.luo@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
690a14ed2fc64328b417a9de448f4a18cc653698)
Ji Luo [Fri, 21 Jun 2019 07:53:50 +0000 (15:53 +0800)]
MA-14916-4 support dual bootloader for imx8m/imx8q
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@nxp.com>
Luo Ji [Wed, 3 Jul 2019 06:38:16 +0000 (14:38 +0800)]
MA-14916-8 [iot] Set power-on write protection for boot1 partition
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 <ji.luo@nxp.com>
(cherry picked from commit
c7e207fbbcd8618d29b1192829c630777fea5220)
(cherry picked from commit
1bbf98ec8a550e4027f399f18781245c9faefc8e)
faqiang.zhu [Wed, 3 Jul 2019 06:23:06 +0000 (14:23 +0800)]
MA-14916-7 comply with mmc struct definition in avb library
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 <faqiang.zhu@nxp.com>
(cherry picked from commit
de905a8a3c6dfdf9241a188b2e22c76dbef851c1)
faqiang.zhu [Tue, 11 Jun 2019 03:02:32 +0000 (11:02 +0800)]
MA-14916-1 adapt to the directory change of libavb
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 <faqiang.zhu@nxp.com>
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry pick from
58010b99560eea2027dd39909eb5b35404e6030e)
Ye Li [Wed, 12 May 2021 10:31:23 +0000 (03:31 -0700)]
MLK-25486 mmc: fsl_esdhc_imx: Fix clock disable issue
The SD clock disable is wrapped by MMC_SUPPORTS_TUNING. So it
only works when UHS is enabled. However, in SD initialization the
power cycle does not depends on UHS. But the power cycle needs
disable the SD clock before power down.
So this causes a problem when UHS is not enabled. Some cards can't
become ready (ACMD14 timeout) due to the clock is enabled during
power cycle.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Haibo Chen <haibo.chen@nxp.com>
Ye Li [Wed, 12 May 2021 06:03:22 +0000 (23:03 -0700)]
MLK-25486 imx8mp: Set MEDIA_AXI_CLK_ROOT to 400Mhz
MEDIA_AXI_CLK_ROOT is 400Mhz for nominal voltage while 500Mhz is
for overdrive voltage.
Since we use OD VDD_SOC voltage for LPDDR4 EVK board, but ND for
DDR4 EVK board. Using 500Mhz will break for DDR4 EVK. So set it to
400Mhz that can work both ND and OD.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Ye Li [Wed, 12 May 2021 02:42:27 +0000 (19:42 -0700)]
MLK-25484 imx8mn: Set VDD_SOC suspend voltage to 0.75v
According to latest i.MX8MN datasheet, it introduces low-v suspend mode
which can set VDD_SOC to 0.75v to save power in suspend.
To align with this mode, adjust the PMIC suspend VDD_SOC to 0.75v in SPL.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Ye Li [Tue, 11 May 2021 05:32:46 +0000 (22:32 -0700)]
MLK-25483 usb: ehci-mx6: Enable USB PHY clock for iMX8DXL
On iMX8DXL, two USB controllers share clock (enabled by SCFW) for
controller but have dedicated LPCG clock for PHY.
The PHY LPCG will be cleared once the PHY is power down. So without
explictly enabling PHY LPCG clock, USB PHY access will cause
u-boot crash.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Ye Li [Mon, 10 May 2021 09:17:33 +0000 (02:17 -0700)]
MLK-25481 imx8mm/mn/mp: Keep watchdog disabled by default
WDOG HW can't be disabled once it is enabled. So after u-boot enables
the watchdog, kernel has to service the watchdog all the time.
However when suspend into s2idle mode, the WDOG counter is not stop,
then cause WDOG timeout and reset the system.
Change to not enable WDOG by default in u-boot to align previous release.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Gaurav Jain [Mon, 10 May 2021 06:21:37 +0000 (11:51 +0530)]
LF-3769 LS1021ATWR: Enable SPL_OF_CONTROL in SECURE Boot defconfig
if enable SPL_DM without SPL_OF_CONTROL,
build errors "undefined reference to fdt_get_resource",
is coming in function `caam_jr_probe'.
Added SPL_OF_CONTROL to remove the error.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Peng Fan [Wed, 28 Apr 2021 13:54:01 +0000 (21:54 +0800)]
MLK-25478-5 efi_loader: loosen buffer parameter check in efi_file_read_int
This is same issue as https://bugzilla.redhat.com/show_bug.cgi?id=
1733817,
but that fix was wrongly partial reverted.
When reading a directory, EFI_BUFFER_TOO_SMALL should be returned when
the supplied buffer is too small, so a use-case is to call
EFI_FILE_PROTOCOL.Read() with *buffer_size=0 and buffer=NULL to
obtain the needed size before doing the actual read.
So remove the check only for directory reading, file reading already
do the check by itself.
Fixes:
db12f518edb0("efi_loader: implement non-blocking file services")
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>
Cc: Stefan Sørensen <stefan.sorensen@spectralink.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Ye Li [Thu, 6 May 2021 13:38:55 +0000 (06:38 -0700)]
MLK-25478-4 imx8mm_evk: Update defconfig for ARM SR-IR cert
Enable some EFI and DFU configs and DFU for ARM system ready IR
certification.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ying-Chun Liu (PaulLiu) [Tue, 5 Jan 2021 15:42:36 +0000 (23:42 +0800)]
MLK-25478-3 workaround: disable verify time of signer and signee.
Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
(cherry picked from commit
696b7db183e6c20b7d0d65550ba644b1fb2568f0)
Signed-off-by: Ye Li <ye.li@nxp.com>
Ying-Chun Liu (PaulLiu) [Sun, 3 Jan 2021 16:05:13 +0000 (00:05 +0800)]
MLK-25478-2 efi: clean memory and reset MemoryOverwriteRequestControl
Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
(cherry picked from commit
2c20c3191a968e1c826aeb4e3d1249caae5fb844)
Ying-Chun Liu (PaulLiu) [Tue, 29 Dec 2020 15:10:28 +0000 (23:10 +0800)]
MLK-25478-1 efi: add Platform-Reset-Attack variables
Signed-off-by: Ying-Chun Liu (PaulLiu) <paulliu@debian.org>
(cherry picked from commit
9853e34839a96be1a3cd5d05b288f8b94b2a6a56)
Ye Li [Fri, 7 May 2021 09:08:04 +0000 (11:08 +0200)]
Pull request #14: Job Ring Driver model
Merge in LFAC/uboot-nxp from ~NXF60555/uboot-nxp-gaurav:imx_v2021.04 to imx_v2021.04
* commit '
ecbf49601e34dfb550e8017d0e7bc9acc6a0cecf':
LFU-126-11 LS(1012/1046/2080): Remove Sec initialization from board files.
LFU-126-10 LS1021: Enable Job ring driver model in U-Boot.
Ye Li [Fri, 7 May 2021 03:02:54 +0000 (20:02 -0700)]
LF-3483-21 DTS: imx6sx: Set ENET interface to rgmii-id
The RX clock delay setting for atheros PHY is still needed on
6SX SDB and ARD. So remove the rgmii-txid to use rgmii-id
Signed-off-by: Ye Li <ye.li@nxp.com>
Gaurav Jain [Thu, 6 May 2021 06:40:42 +0000 (12:10 +0530)]
LFU-126-11 LS(1012/1046/2080): Remove Sec initialization from board files.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Gaurav Jain [Thu, 6 May 2021 06:17:08 +0000 (11:47 +0530)]
LFU-126-10 LS1021: Enable Job ring driver model in U-Boot.
LS1021A(iot/qds/tsn/twr) - added support for JR driver.
sec is initialized based on job ring information processed
from device tree.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Ye Li [Fri, 30 Apr 2021 13:25:56 +0000 (06:25 -0700)]
LF-3483-20 imx8m: Add back fdt_addr variable for UUU download
Since uuu script and boot env will use fdt_addr variable for
kernel fdt loading, need add back the fdt_addr
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 30 Apr 2021 10:12:55 +0000 (03:12 -0700)]
LF-3483-19 imx8mn/imx8mp: Change SPL stack and BSS address
To fit for large SPL image size, adjust the BSS address and SPL stack
address. Set the BSS address at higher space than stack, so when
SPL image grows, we don't need to re-adjust stack and BSS
Signed-off-by: Ye Li <ye.li@nxp.com>
Gaurav Jain [Fri, 30 Apr 2021 08:11:05 +0000 (13:41 +0530)]
LFU-126-9 i.MX8: added IMX8 config for HAB boot.
i.MX8(QM/QXP/DX/DXL/DXL_phantom) - Added code for HAB checking.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Peng Fan [Fri, 30 Apr 2021 06:42:13 +0000 (14:42 +0800)]
LF-3767 imx8m: set mem=xMB to bootargs
Below two commit in Kernel cause no-map reserved memory are still kept
in kernel as memblock.
54d3a5761951 of/fdt: Make sure no-map does not remove already reserved regions
0674fa99a7d8 fdt: Properly handle "no-map" field in the memory region
So when jailhouse enabling, there will be resource conflict because
jailhouse pci will request the reserved memory for itself handling
virtual PCI trap.
So let's cut off the reserved memory using mem=xMB to avoid such issue.
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Fri, 16 Oct 2020 15:32:29 +0000 (15:32 +0000)]
LF-2518 video: hdp: Adjust Layerscape HDP video driver folder
Since the HDP will be shared with i.MX. Move the common HDP library
codes to "driver/video/nxp/hdp" directory.
And use platform specified directory "driver/video/nxp/layerscape"
for LS driver codes and configurations.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Alison Wang <alison.wang@nxp.com>
(cherry picked from commit
f13b64fbea53ceff72ab5bb015aec77201b77439)
Gaurav Jain [Wed, 28 Apr 2021 12:39:21 +0000 (18:09 +0530)]
LFU-126-8 i.MX8: Enable Job ring driver model in SPL and U-Boot.
i.MX8(QM/QXP/DX/DXL/DXL_phantom) - added support for JR driver model.
sec is initialized based on job ring information processed
from device tree.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Gaurav Jain [Wed, 28 Apr 2021 08:31:15 +0000 (14:01 +0530)]
LFU-126-7 Layerscape: Enable Job ring driver model in U-Boot.
LS(1012/1028/1043/1046/1088/2088) - added support for JR driver.
LX2160, LX2162 - added support for JR driver.
sec is initialized based on job ring information processed
from device tree.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Gaurav Jain [Wed, 28 Apr 2021 06:45:06 +0000 (12:15 +0530)]
LFU-126-6 i.MX7ULP: Enable Job ring driver model in U-Boot.
sec is initialized based on job ring information processed
from device tree.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Gaurav Jain [Wed, 28 Apr 2021 06:31:04 +0000 (12:01 +0530)]
LFU-126-5 i.MX7: Enable Job ring driver model in U-Boot.
i.MX7D - added support for JR driver model.
sec is initialized based on job ring information processed
from device tree.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Gaurav Jain [Wed, 28 Apr 2021 06:08:07 +0000 (11:38 +0530)]
LFU-126-4 i.MX6: Enable Job ring driver model in U-Boot.
i.MX6(Q/DL/QP/SOLO/SX/UL) - added support for JR driver model.
sec is initialized based on job ring information processed
from device tree.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Gaurav Jain [Tue, 27 Apr 2021 11:29:31 +0000 (16:59 +0530)]
LFU-126-3 i.MX8M: Enable Job ring driver model in SPL and U-Boot.
i.MX8MM/MN/MP/MQ - added support for JR driver model.
sec is initialized based on job ring information processed
from device tree.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Gaurav Jain [Tue, 27 Apr 2021 09:55:03 +0000 (15:25 +0530)]
LFU-126-2 crypto/fsl: Support BKEK generation
Add support for generating BKEK.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Gaurav Jain [Tue, 27 Apr 2021 09:42:45 +0000 (15:12 +0530)]
LFU-126-1 crypto/fsl: Added support for Job ring driver model
added device tree support for job ring driver.
sec is initialized based on job ring information processed
from device tree.
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
Peng Fan [Wed, 28 Apr 2021 01:21:08 +0000 (09:21 +0800)]
LF-3483-19 imx8qm: xen: drop defconfig
Drop defconfig, it will be added back when android auto feature ready.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 28 May 2020 07:41:57 +0000 (15:41 +0800)]
MLK-24189-2 arm: imx: optee: ignore node create for xen
Ignore node create for xen, currently we not have valid
registers when booting in xen, it might have garbage value and cause
kernel hang.
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
8a20d8bf7a3016863a659862c53473fbda18afc2)
Peng Fan [Thu, 28 May 2020 07:41:09 +0000 (15:41 +0800)]
MLK-24189-1 arm: dts: xen: drop power domain for gpio4/1
gpio4/1 is handled by dom0, but shared with domu. without dropping
the power domain, probe will fail.
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
0e700d7e4a798000818a296235d03dc5e6a01c88)
Peng Fan [Wed, 27 May 2020 06:08:27 +0000 (14:08 +0800)]
MLK-24172-2 configs: imx8qm: disable SPL DM serial for domu
Disable SPL DM SERIAL for domu, there is no mmu setup,
paravirtual console not work.
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
019e2c88f0d97ee83ab0c28493467503bd1f73b1)
Peng Fan [Tue, 26 May 2020 06:18:13 +0000 (14:18 +0800)]
MLK-24172-1 imx8qm: update xen defconfig/dts for 2020.04
Update xen defconfig
Update dts to let xen serial could be used in early stage,
but seems without mmu enabled, it output nothing. It only
output data after mmu enabled.
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
460d28429e14803fce7d8eabc8152e9e55320c87)
Ji Luo [Tue, 12 Mar 2019 08:15:54 +0000 (16:15 +0800)]
MA-14318-1 Support dual bootloader for xen
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 <ji.luo@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
30beee3fe6d4b35166c6e17203909231d33bc2db)
(cherry picked from commit
a4ffa905d90d14ccdd146e4b38a69d40a568b747)
(cherry picked from commit
ca5e676b7a7c5ea7b435cb05eba180f3a25e5335)
Peng Fan [Thu, 21 Feb 2019 02:31:05 +0000 (10:31 +0800)]
MLK-20955 imx8qm: delete power-domains for lpuart0 on xen
To U-Boot on DomU, the lpuart0 is replaced with a xen paravirtual
consol driver, but reused the previous lpuart node. However
there is an power-domains entry in lpuart0 which will call
power_domain_on and failed to probe xen paravirtual driver,
because of recent change:
commit
8524ca764d8f("MLK-20945-2 dm: device: Check the power up result in probe ")
So remove the power-domains entry in lpuart0 to let DomU U-Boot could
output again.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit
38155100481a07e961f375052241d9d03e20a899)
(cherry picked from commit
92104edf74363ab1a322e186887bf4515d47aa9c)
(cherry picked from commit
75074ecb28d47cb1064d10e3d0b85defd7fb3c87)
(cherry picked from commit
10d04fd3f248e1a2f084811768c4690d2bcb2f89)
Peng Fan [Thu, 15 Nov 2018 09:46:06 +0000 (17:46 +0800)]
MLK-20383 imx8qm: xen: enable dm usb
Enable dm usb using the base board otg usb port for fastboot usage
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
88a1718aa7096782e9cf538e391762aaef631bb2)
(cherry picked from commit
279e82b731e7671536b729934e1dc88b760ea05a)
(cherry picked from commit
707c2aed80f747e3d50e2dcc48dce5be892634f2)
Peng Fan [Thu, 15 Nov 2018 05:20:02 +0000 (13:20 +0800)]
MLK-20373-6 imx8qm: xen: enable dm serial
Enable dm serial for xen uboot.
Log as below:
#xl console 1
MMC: FSL_SDHC: 0
Loading Environment from <NULL>... *** Warning - bad CRC, using default environment
Failed (-5)
In: serial@
5a060000
Out: serial@
5a060000
Err: serial@
5a060000
flash target is MMC:0
Fastboot: Normal
Normal Boot
=>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit
132cb6f74bcd963b180de83279f00aef31bbbdca)
(cherry picked from commit
38313a6f8e437568dbc15075251d344fa67fd14b)
(cherry picked from commit
8cb20204281faf34731cbff05af14322d69358b3)
Peng Fan [Thu, 15 Nov 2018 05:17:37 +0000 (13:17 +0800)]
MLK-20373-4 imx8: update mem map table
Update mem map table for xen uboot.
xen console and some magic pages needs to be mappe as normal memory.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit
c96a9844cd3342f6e31627ccc4f3e63544ffd78e)
(cherry picked from commit
30b2d9f4a7c0cfc9b3f999f1c3a1a8c466d66a68)
(cherry picked from commit
03db7649c0f8c7a292160e2d5d8981e6c3b84ee3)
Peng Fan [Wed, 31 Oct 2018 01:14:43 +0000 (09:14 +0800)]
MLK-20134 imx8qm: xen: correct DRAM SIZE and loadaddr
The first DRAM BANK size should be 2GB and the load addr
are 0x80080000.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
56c9ac9734a59c68cb85125b7047087d00d141e8)
(cherry picked from commit
fd9689b3a2bcd0de26594afa161c4e4acb4c7f58)
(cherry picked from commit
ac0d7c6d0adb8e92ad8905d6d1037f20d624b1f4)
Peng Fan [Wed, 12 Sep 2018 06:32:27 +0000 (14:32 +0800)]
MLK-19552 imx8qm: xen: fix memory map
Fixes
9486251ced24("MLK-19494 configs: imx8qm mek android audo: correct xen physical memory")
correct text base, IPC address, memmap.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
884cada50b9a9fcda09d259cf145d87a29122cac)
(cherry picked from commit
55822e16786817f843d32c1347d705c2a2a435dd)
(cherry picked from commit
042c104da526f522175122f1d626c2d13cc57492)
Peng Fan [Fri, 7 Sep 2018 08:49:45 +0000 (16:49 +0800)]
MLK-19494 configs: imx8qm mek android audo: correct xen physical memory
XEN tool has changed GUEST_RAM0_BASE to 2GB, since we assigned
3584M RAM to DomU, so reflect the change in configuration file.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
9486251ced24e3bf3ecbff68a8f9476e694e5bf7)
(cherry picked from commit
0278b14507731b465652aa41c4a95dafa66da5d1)
(cherry picked from commit
d9372c4502c7d958d608911b50a418871ccc4540)
Ye Li [Fri, 15 Jun 2018 02:04:36 +0000 (19:04 -0700)]
MLK-18614-3 Xen: imx8qm_mek: Fix the CONFIG_FASTBOOT_USB_DEV and DTB issue
Because the Xen u-boot is using OTG port not typec port, the CONFIG_FASTBOOT_USB_DEV
should set to 0 not 1. Otherwise the fastboot will fail.
Remove duplicated "/dts-v1/;" from Xen DTB.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
ceaa529b34752045dcd294572c30c7c56a48abe7)
(cherry picked from commit
2942cb192c0fff45307042bf60da08a30ccddaf2)
(cherry picked from commit
9e8b963dc74f54a781cdb495f24b9b6a669cd17e)
(cherry picked from commit
be348f08fca7620698ec7fea3d94f7b95485aa2c)
Peng Fan [Tue, 12 Jun 2018 08:18:00 +0000 (16:18 +0800)]
MLK-18577-7 imx8qm: mek: support uboot in vm
We are targeting let uboot loading images from emmc to boot android.
Currently only emmc1 is enabled, so other devices are disabled.
Also change memory layout according to VM layout. The memory layout
needs to be samesize as what you configured in as "memory = "3584"".
Add a new dts dedicated for this kind uboot, add a new defconfig
to select CONFIG_XEN/CONFIG_XEN_DEBUG_SERIAL, deselect CONFIG_DM_SERIAL,
select CONFIG_ENABLE_ARM_SOC_BOOT0_HOOK, and disable some devices
compared with imx8qm_mek_androidauto_defconfig.
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
a4e932cae433b9d2e1cff6a94b12e4abcac45543)
(cherry picked from commit
a26de6e05563d3e3e6734e0d99e464437aa89db5)
(cherry picked from commit
74ac579ee195c4a2f6651ccc0f86efb0eebd889e)
(cherry picked from commit
7258e558b51a7f56d2b895c9c554423e12037ed3)
Peng Fan [Tue, 12 Jun 2018 08:07:24 +0000 (16:07 +0800)]
MLK-18577-5 imx8: update soc code to support uboot in XEN VM
Update SOC code to support U-Boot in a XEN VM. Currently
we only support to boot android using uboot in a VM,
so there is hardcode that using MMC1_BOOT boot.
There are a few small fixes included.
For the mmu configuration, the mem map is used from xen
guest VM and our iomem space in vm cfg file.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
533087bc1bce0c35fead0956b0613971862c280f)
(cherry picked from commit
c2ba2460d8985aa0b084f7beef2d0bc8773d90e3)
(cherry picked from commit
2b0a537f59646f3f222d60ebe46611160ba6bdc9)
Peng Fan [Wed, 13 Jun 2018 03:02:33 +0000 (11:02 +0800)]
MLK-18577-4 serial: add simple xen debug output
Add simple debug output when uboot runs in a VM.
Needs DM_SERIAL disabled, and XEN_DEBUG_SERIAL enabled.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
b41475b83c8d7c83bd6069f4fea05d3405e81e50)
(cherry picked from commit
695ae513cdf6c671cda5c32e4a2974e3119450d0)
(cherry picked from commit
d4189c87bbd3a5fd0abc74f7e9ce12a2f86c0de0)
(cherry picked from commit
bb686e0c1ac24fcb72eaab51c249020b40807ec7)
Peng Fan [Tue, 12 Jun 2018 08:00:23 +0000 (16:00 +0800)]
MLK-18577-3 armv8: xen: add console write hypercall
Introduce console write hypercall to let Uboot could directly
output with xen console, this needs CONFIG_VERBOSE_DEBUG
enabled in xen.
Because input is not a must requirement in android VM,
and develop pvconsole needs more efforts, so let's use
this hypercall first.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
8836c3104a1edfe542e0c1cef6690bc9d3d842a0)
(cherry picked from commit
aea71150857d4617009730683c95d858acb43392)
(cherry picked from commit
3173d3ac39bed27a3197829ea13ffce5a89b07ac)
Ye Li [Wed, 28 Apr 2021 17:09:52 +0000 (10:09 -0700)]
LF-3483-18 net: eqos: add function to get phy node and address
Since new atheros PHY driver needs to access its PHY node through
phy device, we have to assign the phy node in ethernet controller
driver. Otherwise the PHY driver will fail to get some nodes
and properties.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Tue, 27 Apr 2021 21:55:44 +0000 (14:55 -0700)]
LF-3483-17 imx: optee: Copy the fdt overlay before using it
Since fdt overlay only can use once, but distro boot will call
"bootefi bootmgr" to apply the overlay to fdt. So when distro boot
is failed, following BSP default boot can't apply the overlay any
longer.
Using the patch to copy the fdt overlay before using it to avoid
above problem.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 28 Apr 2021 01:19:19 +0000 (18:19 -0700)]
LF-3483-16 mmc: fix device_remove when HS400_ES is enabled
HS400_ES is missed when down grade to HS mode when
device_remove the mmc device
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 28 Apr 2021 01:16:30 +0000 (18:16 -0700)]
LF-3483-15 mmc: fix switch issue with send_status disabled
According to the comment, when send_status is false or wait_dat0
is not supported, the switch should not send CMD13 but directly
return.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Sat, 24 Apr 2021 00:17:31 +0000 (17:17 -0700)]
LF-3483-14 pmic: pca9450: Add compatible string for pca9450c
Add driver compatible string for pca9450c PMIC device. Otherwise
we will fail to bind the pmic
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Tue, 9 Mar 2021 03:26:57 +0000 (19:26 -0800)]
usb: ehci-hcd: Add IAA handshake for removing async QH
According to EHCI spec, software needs to do handshake with HC for
safely removing QH from async list. This handshake is implemented by
setting IAAD (Interrupt on Async Advance Doorbell) bit in USB_USBCMD
register and poll the IAA (Interrupt on Async Advance bit) in the
USB_USBSTS to ensure the HC has released all on-chip state that may
potentially reference one of the data structures just removed.
Current codes only check active status of the last QTD, but this can't
ensure the QH is released from HC. We can meet unrecoverable
"EHCI timed out on TD" errors when running UEFI SCT tests on USB disk.
The USB_ASYNCLISTADDR register is changed to a invalid address when the
issue happens. It is fixed after adding the IAA handshake.
Steps to reproduce the issue:
1. Build the UEFI SCT from https://github.com/tianocore/edk2-test
2. Build the EDK2 UEFI Shell from https://github.com/tianocore/edk2
3. Copy SCT files and Shell.efi to USB disk FAT partition
4. Load the Shell.efi from USB FAT, and run bootefi to execute it
5. After booting into Shell, enter the SCT directory and run "sct -a"
to execute all tests.
6. Tests run about 1 hour and stop with many EHCI timeout errors like
EHCI timed out on TD - token=0x801f8c80
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
e1769da17ed339bc937d30c49176bc3664b261af)