UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

取消
显示结果 
搜索替代 
您的意思是: 
Highlighted
Observer liup1990
Observer
756 次查看
注册日期: ‎06-14-2018

zynq7020开启RSA认证后,从SD卡可成功认证并运行,从qspi启动却无任何输出.

转到解答

大家好:

      我开启了zynq7020的RSA认证功能,并且制作了包含RSA认证信息的BOOT.BIN,其bif文件如下:

      //arch = zynq; split = false; format = BIN
the_ROM_image:
{
[pskfile]E:\mydoc\task\rsa-aes\rsa-key\psk.pk1
[sskfile]E:\mydoc\task\rsa-aes\rsa-key\ssk.pk1
[bootloader, authentication = rsa]E:\vivado-workstation\my_flatform\my_flatform.sdk\fsbl\Release\fsbl.elf
[authentication = rsa]E:\vivado-workstation\my_flatform\my_flatform.sdk\u-boot.elf
}

从sd运行,可以正常认证并进入uboot,输出如下:

Xilinx First Stage Boot Loader
Release 2017.1 Nov 27 2018-19:43:38
Devcfg driver initialized
Silicon Version 3.1
Boot mode is SD
SD: rc= 0
SD Init Done
Flash Base Address: 0xE0100000
Reboot status register: 0x60400000
Multiboot Register: 0x0000C000
Image Start Address: 0x00000000
Partition Header Offset:0x00000C80
Partition Count: 2
RSA enabled for Chip
SPK Hash Calculated START
D6C5F8FF3E04010BB0D1D57D530FB9F6
DEAE09C47AFFCD7A655903593B3B3F14

SPK Hash Calculated END
SPK Decrypted Hash START
143F3B3B590359657ACDFF7AC409AEDE
F6B90F537DD5D1B00B01043EFFF8C5D6
2004000501020403650148866009060D
30313000FFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF

......

FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFF0100

Partition Decrypted Hash END
Partition Hash Calculated START
536BA3CB60D50114BE0482232A8AB8F1
AB2C5201413120D3F40D225B3C3B3B06

Partition Hash Calculated END
Authentication Done
Handoff Address: 0x00400000
In FsblHookBeforeHandoff function
SUCCESSFUL_HANDOFF
FSBL Status = 0x1


U-Boot 2017.01 (Jul 07 2018 - 11:00:12 +0800)

Model: Zynq Zed Development Board
Board: Xilinx Zynq
DRAM: ECC disabled 512 MiB
MMC: sdhci@e0100000: 0 (SD)
SF: Detected s25fl256s_64k with page size 256 Bytes, erase size 64 KiB, total 64 MiB
*** Warning - bad CRC, using default environment

In: serial
Out: serial
Err: serial
Net: ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
eth0: ethernet@e000b000
U-BOOT for avnet-digilent-zedboard-2017_1

Hit any key to stop autoboot: 0
Zynq>

然后我将这个BOOT.BIN写入qspi,并且切换到qspi boot模式,然而没有任何输出.

然后我又将同样的BOOT.BIN写入没有开启RSA认证的板子上的qspi中,FSBL被成功加载并运行了,输出如下:


Xilinx First Stage Boot Loader
Release 2017.1 Nov 27 2018-19:43:38
Devcfg driver initialized
Silicon Version 3.1
Boot mode is SD
SD: rc= 0
SD Init Done
Flash Base Address: 0xE0100000
Reboot status register: 0x60400000
Multiboot Register: 0x0000C000
Image Start Address: 0x00000000
Partition Header Offset:0x00000C80
Partition Count: 2
Partition Number: 1
Header Dump
Image Word Len: 0x00018D12
Data Word Len: 0x00018D12
Partition Word Len:0x00018ED0
Load Addr: 0x00400000
Exec Addr: 0x00400000
Partition Start: 0x00007780
Partition Attr: 0x00008010
Partition Checksum Offset: 0x00000000
Section Count: 0x00000001
Checksum: 0xFF78588A
Application
RSA Signed
SPK Hash Calculated START
D6C5F8FF3E04010BB0D1D57D530FB9F6
DEAE09C47AFFCD7A655903593B3B3F14

SPK Hash Calculated END
SPK Decrypted Hash START
490000EA250000EA2B0000EA3B0000EA
320000EA00F020E3000000EA0F0000EA
0F502DE9100B2DED200B6DED101AF1EE
04102DE5101AF8EE04102DE5361A00EB
04109DE4101AE8EE04109DE4101AE1EE
200BFDEC100BBDEC0F50BDE804F05EE2
0F502DE9100B2DED200B6DED101AF1EE
04102DE5101AF8EE04102DE5211A00EB
04109DE4101AE8EE04109DE4101AE1EE
200BFDEC100BBDEC0F50BDE804F05EE2
0F502DE974009FE504104EE2001080E5
1E1A00EB0F50BDE80EF0B0E10F502DE9
200010E3B2005E11FF0CC01304001E05
FF04C0031A1A00EB0F50BDE80EF0B0E1
4FF07FF50F502DE934009FE508104EE2
001080E5171A00EB0F50BDE808F05EE2

SPK Decrypted Hash END
Partition SPK Signature Authentication failed
AUTHENTICATION_FAIL
FSBL Status = 0xA00C

This Boot Mode Doesn't Support Fallback
In FsblHookFallback function

 为什么同样的BOOT.BIN从sd可以正常启动,从qspi就没有任何输出?写入未开启RSA认证的板子上,从qspi启动又有输出?

 

0 项奖励
1 个已接受解答

已接受的解答
Observer liup1990
Observer
648 次查看
注册日期: ‎06-14-2018

回复: zynq7020开启RSA认证后,从SD卡可成功认证并运行,从qspi启动却无任何输出.

转到解答
我找到问题的原因了,开启了rsa认证,烧入qspi时,不能从0地址开始.
In cases of Quad-SPI boot, if the image is authenticated, then the boot image should be placed
at a 32K offset other than 0x0 (the image should not be placed starting at 0x0 offset in
Quad-SPI).
3 条回复3
Xilinx Employee
Xilinx Employee
711 次查看
注册日期: ‎04-15-2011

回复: zynq7020开启RSA认证后,从SD卡可成功认证并运行,从qspi启动却无任何输出.

转到解答
参考UG585, 6.3.12 BootROM Error Codes这一部分,通过INIT_B把error code读出来,通过error code看看失败原因是什么。
另外,你烧写flash的时候,是在JTAG模式下烧写的吗?烧写的时候,有使能verify确认烧写进去的内容正确吗?
-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 项奖励
Observer liup1990
Observer
675 次查看
注册日期: ‎06-14-2018

回复: zynq7020开启RSA认证后,从SD卡可成功认证并运行,从qspi启动却无任何输出.

转到解答
@longley 感谢你的关注.我也从JTAG模式烧写过,并且开启了verify,依然有问题.

我没有开启加密功能,通过JTAG读取reboot_status: 0048e00c,其error code为e00c,UG585并没有这个值.前面0048表示,上次reset怎么既是POR又是SLC soft reset?
0 项奖励
Observer liup1990
Observer
649 次查看
注册日期: ‎06-14-2018

回复: zynq7020开启RSA认证后,从SD卡可成功认证并运行,从qspi启动却无任何输出.

转到解答
我找到问题的原因了,开启了rsa认证,烧入qspi时,不能从0地址开始.
In cases of Quad-SPI boot, if the image is authenticated, then the boot image should be placed
at a 32K offset other than 0x0 (the image should not be placed starting at 0x0 offset in
Quad-SPI).