04 Dec, 2018
3 commits
-
Enable the memory operation commands because we need them
sometimes, this won't increase much boot time.Test: build and boot on imx8qm_mek.
Change-Id: Idad8de845203c3d958dd58c58b17b7d8a5d65b4f
Signed-off-by: Ji Luo -
Add commands to write/read vbmeta public key to/from secure
storage. The vbmeta public key can only be set once.
Comands to set the public key:
fastboot stage
fastboot oem set-public-keyTest: build and boot on imx8qxp_mek.
Change-Id: Id3ad4aa5aacef4fc8443f6a2d6ccb931310970ca
Signed-off-by: Ji Luo -
Secure storage is ready in trusty so we should read/write the rollback
index from rpmb.
But for borads without rpmb key, read/write the rpmb will fail and will
block the following avb verify process. In this case, check if the rpmb
key has been set and always return AVB_IO_RESULT_OK for the boards without
rpmb key.Test: build and boot pass on imx8qm_mek.
Change-Id: I10c438e56d049ae97ebedfc446c8202642630d8b
Signed-off-by: Ji Luo
29 Nov, 2018
2 commits
-
now the uboot used by uuu is compiled indepently from the one flashed to
the board, and for imx6 and imx7, defconfig from BSP team is used to
configure the uboot for uuu, so there is no need to unlock the device
when flash the board.Change-Id: Ieefbd67e095dd51eab87e9a32b586cdf88f05d81
Signed-off-by: faqiang.zhu -
to handle situations that it is not allowed to unlock but the board is
already unlocked, unlock logic is modified in this patchChange-Id: I90b22c2dfbc1c64ed9514032986e98b27526c7b9
Signed-off-by: faqiang.zhu
28 Nov, 2018
2 commits
-
In case ocotp error bit is set, clear it.
This is a workaround to ocotp error bit.Signed-off-by: Peng Fan
(cherry picked from commit 781f2d8febe954b2ef3e51b6a2eebcfbf24b08eb) -
compile waring info is as below:
arch/arm/mach-imx/imx8/parser.c: In function ‘mmc_load_image_parse_container’:
arch/arm/mach-imx/imx8/parser.c:244:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^previouse patch change ID:
I40a791d5b5b1eba6a0170d6853626fb546be4b2cChange-Id: Ia605df11beab42e720fff6442a11b1e4b25ac209
Signed-off-by: faqiang.zhu
27 Nov, 2018
3 commits
-
uuu doesn't parse SPL+FIT format for mek_8q platforms. this patch
delete SPL and FIT related configurations in defconfig file for uuu
uboot.Change-Id: If7c352a60a1534b1a5af9f0b661953c9c60191dc
Signed-off-by: faqiang.zhu -
defconfig files for uuu uboot and uboot flashed to board need to be
different.
because ab slot feature need to be used, defconfig of BSP team won't
be used.this patch add for defconfig files for uuu uboot used on imx8. these
two files are directly copied from the files below:
1. imx8qm_mek_android_defconfig
2. imx8qxp_mek_android_defconfig
3. imx8mm_evk_android_defconfig
4. imx8mq_evk_android_defconfigthey are respectively be pasted as:
1. imx8qm_mek_android_uuu_defconfig
2. imx8qxp_mek_android_uuu_defconfig
3. imx8mm_evk_android_uuu_defconfig
4. imx8mq_evk_android_uuu_defconfigChange-Id: I483593beb99477f1821c529254856d372d274661
Signed-off-by: faqiang.zhu -
The SPL loads the FIT image FDT part to an address related with the device
block length. This length is 512 for SD/MMC and is 1 for other devices
like SDP, NOR, NAND, SPI, etc.
When signing FIT image, we use fixed address caculated by SD/MMC block length
to sign FDT part. Thus, when booting through uuu, this causes mismatch and
gets authentication failed.Fix the issue by providing a override function for this FIT buffer address.
When secure boot is enabled, adjust the addresses of other devices to be same
with SD/MMC.Signed-off-by: Ye Li
Reviewed-by: Peng Fan
(cherry picked from commit 710efd3ccb99e144bd30af8e1ee46459b4a54dd6)
26 Nov, 2018
4 commits
-
Get build warning below because the CONFIG_SERIAL_TAG is not defined.
drivers/usb/gadget/f_fastboot.c: In function ‘fastboot_setup’:
drivers/usb/gadget/f_fastboot.c:1768:2: warning: ‘serialnr.high’ is used
uninitialized in this function [-Wuninitialized]
sprintf(serial, "%08x%08x", serialnr.high, serialnr.low);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/gadget/f_fastboot.c:1768:2: warning: ‘serialnr.low’ is used
uninitialized in this function [-Wuninitialized]Signed-off-by: Ye Li
(cherry picked from commit 5a438e8daa7dfe9ae8c8e782a2656e9329c7d4a1) -
Remove the fuse operation commands for imx8qm, this will
help reduce the u-boot binary size.Test: build and boot ok on imx8qm.
Change-Id: I45fd7a86abe5ce7a9a8b9284974190d72b203e1b
Signed-off-by: Luo Ji -
The HABv4 secure boot procedure is now documented in different files:
.
└── habv4
├── csf_examples
│ ├── additional_images
│ │ └── csf_additional_images.txt
│ ├── mx6_mx7
│ │ ├── csf_uboot_fast_authentication.txt
│ │ └── csf_uboot.txt
│ └── mx8m_mx8mm
│ ├── csf_fit.txt
│ └── csf_spl.txt
├── guides
│ ├── mx6_mx7_secure_boot.txt
│ ├── mx8m_mx8mm_secure_boot.pdf
│ └── mx8m_mx8mm_secure_boot.txt
├── introduction_habv4.txt
└── script_examples
└── genIVT.plThe old documentation secure_boot.txt can be removed.
Reviewed-by: Utkarsh Gupta
Signed-off-by: Breno Lima
(cherry picked from commit b0300fcf732ff1e79e771c386bf083e79eacc36a) -
Add HABv4 documentation for i.MX8M and i.MX8MM targets covering the
following topics:- How to sign an securely boot an flash.bin image.
- How to extend the root of trust for additional boot images.
- Add 2 CSF examples.Reviewed-by: Utkarsh Gupta
Signed-off-by: Breno Lima
(cherry picked from commit cc63be298a3e5f44e417f4098c124715917d09e1)
23 Nov, 2018
7 commits
-
Need loadimage before execute mmcboot.
Signed-off-by: Peng Fan
Reviewed-by: Ye Li
(cherry picked from commit 016bb84267ff3882228ffbde64c2c670be7a8f16) -
for 8qxp_mek and 8qm_mek platforms, container is used instead of FIT,
SPL now will load container, not FIT.
This modification can minish the size of u-boot image.Change-Id: Id7e3e62bf95db5941264c3370a3e092e9b77a42f
Signed-off-by: faqiang.zhu -
When booting SPL from SD/MMC, the codes load and parse container image
first, if its authentication is failed, the flow continues to load and parse
for FIT image and cause crash in SPL.The correct way should stop the booting if authentication is failed, avoid
trying the FIT image since FIT does not support AHAB on 8QM/QXP.Signed-off-by: Ye Li
Reviewed-by: Peng Fan
(cherry picked from commit 7843ab1b619d53c24a11f7db10b277287dcd1b11) -
When OP-TEE is enabled a share memory is created between Linux and OP-TEE.
On i.MX 8QM with the use of the SC subsystem, this creates a new chunk of
memory.
Add a new DRAM BANK, so that u-boot is able to capture correctly all
the chunks of memory in meminfo.Signed-off-by: Silvano di Ninno
(cherry picked from commit c89c493cd8657f5d520647c3a9a61861b3f267e0) -
When OP-TEE is enabled a share memory is created
between Linux and OP-TEE. on QxP with the use of the SC
subsystem, this creates a new chunk of memory.
Add a new DRAM BANK, so that u-boot is able to capture
correctly all the chunks of memory in meminfo.Signed-off-by: Silvano di Ninno
(cherry picked from commit abda1b4728f573a43a5b95db675821d2829de99b) -
If OP-TEE is loaded by ATF, u-boot will add
optee device tree node in th edtb so that
Linux can loads OP-TEE driver.Signed-off-by: Silvano di Ninno
(cherry picked from commit 441c23698ffd5c90c6421113da55fae420072473) -
u-boot currently needs information from ATF to know if
OP-TEE os has been loaded.
this information is transmitted via bootargs.
this patch enables saving those bootargs into a structure.Signed-off-by: Silvano di Ninno
(cherry picked from commit 697cfe9dbdc079b68d8b5685b728a7283c837607)
22 Nov, 2018
3 commits
-
Fix typo "ONFIG_CMD_FLASH=y" in defconfig, correct it to
CONFIG_CMD_FLASH=ySigned-off-by: Ye Li
(cherry picked from commit eabb33f2a422aa677816bb984efd1885ae3b9c19) -
The CONFIG_MMC_ENV_DEV binds with CONFIG_ENV_IS_IN_MMC on mx6sabreauto.
When booting from other boot devices like EIMNOR, SPINOR, they need to
load kernel from SD, if the configuration is not set, the loading will fail.Signed-off-by: Ye Li
(cherry picked from commit 59f6322db37945cf69cd418704ffef39b6fd5b31) -
Too many macros are used in fsl_avbkey.c and
make it difficult to maintain.
This patch made some refine by:
1. Move all avb/atx operations to fsl_avb.c.
2. Refine the functions logic.
3. Drop some unsupported conditions/functions.Test: build and boot on
imx8qm_mek/imx8mq_evk/imx6qp_sabresd/imx7d_pico/imx8m_aiy.Change-Id: I5c99732acfc47d53cdf188d69223983777e577f4
Signed-off-by: Luo Ji
21 Nov, 2018
2 commits
-
To enable SPL+CONTAINER format on android auto with tee, after SPL load
container, SPL need to check rpmb keyblob and copy it to secure memory
for latter use.Change-Id: I40a791d5b5b1eba6a0170d6853626fb546be4b2c
Signed-off-by: faqiang.zhu -
Pass "androidboot.keystore=trusty" for trusty backed keymaster
service, pass "androidboot.keystore=software" for software
keymaster service.Test: boot pass on imx8qm_mek.
Change-Id: I9fa38c15a7c10aef09ab29b0e9859b690e3e7a41
Signed-off-by: Ji Luo
20 Nov, 2018
1 commit
-
Update the ddrc Qos setting for B1 to align with B0'ssetting.
Correct the initial clock for dram_pll. This setting will be
overwrite before ddr phy training. Although there is no impact
on the dram init, we still need to correct it to eliminate
confusion.Signed-off-by: Bai Ping
Reviewed-by: Ye Li
Tested-by: Robby Cai
(cherry picked from commit 566b798213ab9690966f163de2765acdbfe647a7)
19 Nov, 2018
1 commit
-
Some platforms don't have alias for usb1 device, so when initialize the
second controller, its seq is allocated by u-boot automatically.
This introduces a problem if the initialization of first controller is failed,
for example nothing connect to first controller, then the seq allocated
for second controller is 0 not 1. EHCI driver uses the seq as index for
USB controller and phy, so it will cause initialization problem for second
controller.Fix the issue by adding the usb1 alias for second USB controller.
Signed-off-by: Ye Li
Reviewed-by: Peng Fan
(cherry picked from commit fe21a1ab93d0788017ec58905e3273c9ab0f5a67)
16 Nov, 2018
2 commits
-
Enlarge dom0 mem to 2048M
Signed-off-by: Peng Fan
(cherry picked from commit 2f756c93a265e96bf524bfbe224fbbeceecd1417) -
Enable dm usb using the base board otg usb port for fastboot usage
Signed-off-by: Peng Fan
Reviewed-by: Ye Li
15 Nov, 2018
6 commits
-
Enable dm serial for xen uboot.
Log as below:
#xl console 1
MMC: FSL_SDHC: 0
Loading Environment from ... *** Warning - bad CRC, using default environmentFailed (-5)
In: serial@5a060000
Out: serial@5a060000
Err: serial@5a060000
flash target is MMC:0
Fastboot: Normal
Normal Boot
=>Signed-off-by: Peng Fan
Reviewed-by: Peng Fan
Reviewed-by: Flynn xu -
Support output/input using `xl console [domid]`.
Signed-off-by: Peng Fan
Reviewed-by: Peng Fan
Reviewed-by: Flynn xu -
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
Reviewed-by: Peng Fan
Reviewed-by: Flynn xu -
Introduce new hypercalls
Signed-off-by: Peng Fan
Reviewed-by: Peng Fan
Reviewed-by: Flynn xu -
Introduce puts hook for dm serial driver.
Signed-off-by: Peng Fan
Reviewed-by: Peng Fan
Reviewed-by: Flynn xu -
Introduce xen header files from Linux Kernel commit
e2b623fbe6a3("Merge tag 's390-4.20-1' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux")Signed-off-by: Peng Fan
Reviewed-by: Peng Fan
Reviewed-by: Flynn xu
14 Nov, 2018
3 commits
-
Fix coverity issue CID 43665: Free of address-of expression (BAD_FREE)
incorrect_free: free frees incorrect pointer pp.pp points the port array field of struct ahci_uc_priv, should not free it.
Signed-off-by: Ye Li
Acked-by: Peng Fan -
Fix coverity issue CID 18031: Resource leak (RESOURCE_LEAK)
leaked_storage: Variable fill_buf going out of scope leaks the storage it points toShould free the fill_buf before function return.
Signed-off-by: Ye Li
-
Current flexspi clock root is set to 25Mhz OSC, but the flash can support
to 166Mhz clock, so change the flexspi clock root to system PLL1 100Mhz
clock to increase speed.Signed-off-by: Ye Li
Reviewed-by: Peng Fan
13 Nov, 2018
1 commit
-
Current code uses strlen of string to get the property data
length, which is wrong for unicode string, also the whole
property length also should be corrected(descriptor length
minus head length, 142-10=132), detail data format of single
GUID see below table:Table 4a: Microsoft Extended Properties Feature Descriptor
===================================================================
Value | TYPE | Description
===================================================================
0x8E, 0x00, 0x00, 0x00 | DWORD (LE) | Descriptor length
| | (142 bytes)
--------------------------------------------------------------------
0x00, 0x01 | BCD WORD (LE) | Version ('1.0')
--------------------------------------------------------------------
0x05, 0x00 | WORD (LE) | Extended Property
| | Descriptor index (5)
--------------------------------------------------------------------
0x01, 0x00 | WORD (LE) | Number of sections (1)
--------------------------------------------------------------------
0x84, 0x00, 0x00, 0x00 | DWORD (LE) | Size of the property
| | section (132 bytes)
--------------------------------------------------------------------
0x01, 0x00, 0x00, 0x00 | DWORD (LE) | Property data type
| | (1 = Unicode
| | REG_SZ,
| | see table below)
--------------------------------------------------------------------
0x28, 0x00 | WORD (LE) | Property name
| | length (40 bytes)
--------------------------------------------------------------------
0x44, 0x00, 0x65, 0x00, | NUL-terminated | Property name
(...) | Unicode String | "DeviceInterfaceGUID"
0x74, 0x00, 0x00, 0x00 | (LE) |
--------------------------------------------------------------------
0x4e, 0x00, 0x00, 0x00 | DWORD (LE) | Property data
| | length (78 bytes)
--------------------------------------------------------------------
0x7b, 0x00, 0x46, 0x00, | NUL-terminated | Property name
(...) | Unicode String | "{xxxxxxxx-xxxx-
0x7d, 0x00, 0x00, 0x00 | (LE) | xxxx-xxxx-
| | xxxxxxxxxxxx}\0"
--------------------------------------------------------------------Details of WCID see below link:
https://github.com/pbatard/libwdi/wiki/WCID-DevicesReviewed-by: Ye Li
Signed-off-by: Li Jun