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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor lwpeterson
Visitor
151 Views
Registered: ‎10-09-2017

Bootgen 2018.3 ignores pmufw_image option

Jump to solution

The bootgen utility included with the 2018.3 release appears to disregard the pmufw_image BIF option documented on pages 39 & 113 of the UG1283 Bootgen-user-guide, released with 2018.3 on Dec. 21, 2018. 

With the following BIF file, no PMU Firmware image is included in the output BOOT.BIN file:

the_ROM_image:

{

// First Stage Bootloader

[bootloader, destination_cpu = a53-0]

..\Release\FSBL.elf

 

// Platform Management Unit firmware

[pmufw_image]

..\PMUFW\Release\PMUFW.elf

// ARM Trusted Firmware

[partition_owner=fsbl,

destination_cpu = a53-0,

exception_level=el-3,

trustzone=secure]

..\ZYNQMP_ATF\src\build\zynqmp\release\bl31\bl31.elf

// test

[partition_owner=fsbl,

destination_cpu = a53-0,

exception_level=el-1,

trustzone=nonsecure,

offset = 0x02000000,

load = 0x100000,

startup = 0x100000]

..\test.bin

}

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
42 Views
Registered: ‎03-19-2014

Re: Bootgen 2018.3 ignores pmufw_image option

Jump to solution

From Development: 

If PMU FW is specified with attribute [pmufw_image], then PMU FW is loaded by BootROM and is not treated as a separate partition. It is appended to the FSBL, and FSBL and PMU FW together will be one single large partition. Hence you will not see the PMU FW in the log.

If PMU FW is specified below like any other partition, then PMU FW is loaded by FSBL and is treated as a separate partition. Hence you can see the PMU FW in the log.

 

Are you not seeing the PMUFW run on boot?

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
9 Replies
Moderator
Moderator
119 Views
Registered: ‎03-19-2014

Re: Bootgen 2018.3 ignores pmufw_image option

Jump to solution

Refer to page 84 and page 85 of UG1283.   PMUFW can be loaded by the BootROM or FSBL and require different attributes.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Visitor lwpeterson
Visitor
111 Views
Registered: ‎10-09-2017

Re: Bootgen 2018.3 ignores pmufw_image option

Jump to solution

In my example, I am using th "PMUFW load by BootROM", as described in UG1283, p.84.  Below is my bootgen cmd line, the BIF file and the resulting bootgen log output.  Note the log shows the PMUFW.elf is not part of the final image.  It seems bootgen recognized my PMUFW.elf, but fails to include it in the final output file, "BOOT.bin".  The "pmufw_image" BIF option is ignored by this version of bootgen.  Is this a bug?  Or is the option being deprecated, but documentation has not kept pace with the actual bootgen implementation? 

 

### Bootgen command line

exec bootgen -arch zynqmp -image test.bif -o BOOT.bin -w on -log info >CON

 

### BIF File

the_ROM_image:

{

// Platform Management Unit firmware

[pmufw_image] PMUFW.elf

// First Stage Bootloader

[bootloader, destination_cpu = a53-0] FSBL.elf

// test

[partition_owner=fsbl,

   destination_cpu = a53-0,

   exception_level=el-1,

   trustzone=nonsecure,

   offset = 0x02000000,

   load = 0x100000,

   startup = 0x100000] test.bin

}

 

### Bootgen log ouput

****** Xilinx Bootgen v2018.3

  **** Build date : Dec  7 2018-00:33:34

    ** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.

 

[INFO]   : Command line parsing completed successfully

[INFO]   : Filename: PMUFW.elf

[INFO]   : Filename: FSBL.elf

[INFO]   : Parsing Partition Data

[INFO]   : Filename: test.bin

[INFO]   :  Offset: 2000000

[INFO]   :  Load: 100000

[INFO]   : Parsing Partition Data

[INFO]   : BIF file parsing completed successfully

[INFO]   : Building image - the_ROM_image

[INFO]   : Building the Partition Header Table

[INFO]   : After build

           -- Dump of Binary Image ----

           00000000 Len: 000008b8 Res: 00000000 "BootHeader"

           00000000 Len: 00000040 Res: 00000000 "ImageHeaderTable"

           00000000 Len: 00000020 Res: 00000000 "ImageHeader FSBL.elf"

           00000000 Len: 00000020 Res: 000007c0 "ImageHeader test.bin"

           00000000 Len: 00000040 Res: 00000000 "PartitionHeader FSBL.elf.0"

           00000000 Len: 00000040 Res: 00000000 "PartitionHeader test.bin.0"

           00000000 Len: 00000040 Res: 00001680 "PartitionHeader Null"

           00000000 Len: 00039db8 Res: 00000000 "FSBL.elf.0"

           02000000 Len: 0041b7e0 Res: 00000000 "test.bin.0"

           -- End of Dump

[INFO]   : After align

           -- Dump of Binary Image ----

           00000000 Len: 000008b8 Res: 00000000 "BootHeader"

           000008c0 Len: 00000040 Res: 00000000 "ImageHeaderTable"

           00000900 Len: 00000020 Res: 00000000 "ImageHeader FSBL.elf"

           00000940 Len: 00000020 Res: 000007c0 "ImageHeader test.bin"

           00001100 Len: 00000040 Res: 00000000 "PartitionHeader FSBL.elf.0"

           00001140 Len: 00000040 Res: 00000000 "PartitionHeader test.bin.0"

           00001180 Len: 00000040 Res: 00001680 "PartitionHeader Null"

           00002800 Len: 00039db8 Res: 00000000 "FSBL.elf.0"

           02000000 Len: 0041b7e0 Res: 00000000 "test.bin.0"

           -- End of Dump

[INFO]   : Partition Information:

[INFO]   : Image: FSBL.elf

[INFO]   :        Partition 0: FSBL.elf.0,  Size: 236984

[INFO]  : Image: test.bin

[INFO]   :        Partition 1: test.bin.0,  Size: 4306912

[INFO]   : After Link

           -- Dump of Binary Image ----

           00000000 Len: 000008b8 Res: 00000000 "BootHeader"

           000008c0 Len: 00000040 Res: 00000000 "ImageHeaderTable"

           00000900 Len: 00000020 Res: 00000000 "ImageHeader FSBL.elf"

           00000940 Len: 00000020 Res: 000007c0 "ImageHeader test.bin"

           00001100 Len: 00000040 Res: 00000000 "PartitionHeader FSBL.elf.0"

           00001140 Len: 00000040 Res: 00000000 "PartitionHeader test.bin.0"

           00001180 Len: 00000040 Res: 00001680 "PartitionHeader Null"

           00002800 Len: 00039db8 Res: 00000000 "FSBL.elf.0"

           02000000 Len: 0041b7e0 Res: 00000000 "test.bin.0"

           -- End of Dump

 

 

 

0 Kudos
Moderator
Moderator
103 Views
Registered: ‎03-19-2014

Re: Bootgen 2018.3 ignores pmufw_image option

Jump to solution

Please note the ordering of the PMUFW.  If the BootRom is to load the PMUFA, it needs ot be before the FSBL

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Visitor lwpeterson
Visitor
100 Views
Registered: ‎10-09-2017

Re: Bootgen 2018.3 ignores pmufw_image option

Jump to solution

If you check my last post, you can see that I placed PMUFW before the FSBL.  This is consistent with loading by BootRom, no?

0 Kudos
Moderator
Moderator
90 Views
Registered: ‎03-19-2014

Re: Bootgen 2018.3 ignores pmufw_image option

Jump to solution

That's odd.   here is my bif:

//arch = zynqmp; split = false; format = BIN
the_ROM_image:
{
[fsbl_config]a53_x64
[pmufw_image]C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\pmufw\Debug\pmufw.elf
[bootloader]C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\fsbl\Debug\fsbl.elf

[destination_device = pl]C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\config_mpsoc_wrapper_hw_platform_0\config_mpsoc_wrapper.bit
[destination_cpu = a53-0]C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\per\Debug\per.elf
}

bootgen -arch zynqmp -image pmufw_test.bif -w on -o test.bin -log info >log.txt

log.txt:

 

****** Xilinx Bootgen v2018.3
**** Build date : Dec 7 2018-00:33:34
** Copyright 1986-2018 Xilinx, Inc. All Rights Reserved.

[INFO] : Command line parsing completed successfully
[WARNING]: [fsbl_config] a53_x64 | a53_x32 | r5_single | r5_dual will be deprecated, please use 'destination_cpu' attribute of bootloader partition
[INFO] : Filename: C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\fsbl\Debug\fsbl.elf
[INFO] : Parsing Partition Data
[INFO] : Filename: C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\pmufw\Debug\pmufw.elf
[INFO] : Parsing Partition Data
[INFO] : Filename: C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\config_mpsoc_wrapper_hw_platform_0\config_mpsoc_wrapper.bit
[INFO] : Parsing Partition Data
[INFO] : Filename: C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\per\Debug\per.elf
[INFO] : Parsing Partition Data
[INFO] : BIF file parsing completed successfully
[INFO] : Building image - the_ROM_image
[INFO] : Building the Partition Header Table
[INFO] : After build
-- Dump of Binary Image ----
00000000 Len: 000008b8 Res: 00000000 "BootHeader"
00000000 Len: 00000040 Res: 00000000 "ImageHeaderTable"
00000000 Len: 00000020 Res: 00000000 "ImageHeader fsbl.elf"
00000000 Len: 00000020 Res: 00000000 "ImageHeader pmufw.elf"
00000000 Len: 00000030 Res: 00000000 "ImageHeader config_mpsoc_wrapper.bit"
00000000 Len: 0000001c Res: 00000740 "ImageHeader per.elf"
00000000 Len: 00000040 Res: 00000000 "PartitionHeader fsbl.elf.0"
00000000 Len: 00000040 Res: 00000000 "PartitionHeader pmufw.elf.0"
00000000 Len: 00000040 Res: 00000000 "PartitionHeader pmufw.elf.1"
00000000 Len: 00000040 Res: 00000000 "PartitionHeader pmufw.elf.2"
00000000 Len: 00000040 Res: 00000000 "PartitionHeader config_mpsoc_wrapper.bit.0"
00000000 Len: 00000040 Res: 00000000 "PartitionHeader per.elf.0"
00000000 Len: 00000040 Res: 00001580 "PartitionHeader Null"
00000000 Len: 0001c2f0 Res: 00000000 "fsbl.elf.0"
00000000 Len: 000161f8 Res: 00000000 "pmufw.elf.0"
00000000 Len: 00000910 Res: 00000000 "pmufw.elf.1"
00000000 Len: 00000400 Res: 00000000 "pmufw.elf.2"
00000000 Len: 020d78ec Res: 00000000 "config_mpsoc_wrapper.bit.0"
00000000 Len: 00019048 Res: 00000000 "per.elf.0"
-- End of Dump
[INFO] : After align
-- Dump of Binary Image ----
00000000 Len: 000008b8 Res: 00000000 "BootHeader"
000008c0 Len: 00000040 Res: 00000000 "ImageHeaderTable"
00000900 Len: 00000020 Res: 00000000 "ImageHeader fsbl.elf"
00000940 Len: 00000020 Res: 00000000 "ImageHeader pmufw.elf"
00000980 Len: 00000030 Res: 00000000 "ImageHeader config_mpsoc_wrapper.bit"
000009c0 Len: 0000001c Res: 00000740 "ImageHeader per.elf"
00001100 Len: 00000040 Res: 00000000 "PartitionHeader fsbl.elf.0"
00001140 Len: 00000040 Res: 00000000 "PartitionHeader pmufw.elf.0"
00001180 Len: 00000040 Res: 00000000 "PartitionHeader pmufw.elf.1"
000011c0 Len: 00000040 Res: 00000000 "PartitionHeader pmufw.elf.2"
00001200 Len: 00000040 Res: 00000000 "PartitionHeader config_mpsoc_wrapper.bit.0"
00001240 Len: 00000040 Res: 00000000 "PartitionHeader per.elf.0"
00001280 Len: 00000040 Res: 00001580 "PartitionHeader Null"
00002800 Len: 0001c2f0 Res: 00000000 "fsbl.elf.0"
0001eb00 Len: 000161f8 Res: 00000000 "pmufw.elf.0"
00034d00 Len: 00000910 Res: 00000000 "pmufw.elf.1"
00035640 Len: 00000400 Res: 00000000 "pmufw.elf.2"
00035a40 Len: 020d78ec Res: 00000000 "config_mpsoc_wrapper.bit.0"
0210d340 Len: 00019048 Res: 00000000 "per.elf.0"
-- End of Dump
[INFO] : Partition Information:
[INFO] : Image: fsbl.elf
[INFO] : Partition 0: fsbl.elf.0, Size: 115440
[INFO] : Image: pmufw.elf
[INFO] : Partition 1: pmufw.elf.0, Size: 90616
[INFO] : Partition 2: pmufw.elf.1, Size: 2320
[INFO] : Partition 3: pmufw.elf.2, Size: 1024
[INFO] : Image: config_mpsoc_wrapper.bit
[INFO] : Partition 4: config_mpsoc_wrapper.bit.0, Size: 34437356
[INFO] : Image: per.elf
[INFO] : Partition 5: per.elf.0, Size: 102472
[INFO] : After Link
-- Dump of Binary Image ----
00000000 Len: 000008b8 Res: 00000000 "BootHeader"
000008c0 Len: 00000040 Res: 00000000 "ImageHeaderTable"
00000900 Len: 00000020 Res: 00000000 "ImageHeader fsbl.elf"
00000940 Len: 00000020 Res: 00000000 "ImageHeader pmufw.elf"
00000980 Len: 00000030 Res: 00000000 "ImageHeader config_mpsoc_wrapper.bit"
000009c0 Len: 0000001c Res: 00000740 "ImageHeader per.elf"
00001100 Len: 00000040 Res: 00000000 "PartitionHeader fsbl.elf.0"
00001140 Len: 00000040 Res: 00000000 "PartitionHeader pmufw.elf.0"
00001180 Len: 00000040 Res: 00000000 "PartitionHeader pmufw.elf.1"
000011c0 Len: 00000040 Res: 00000000 "PartitionHeader pmufw.elf.2"
00001200 Len: 00000040 Res: 00000000 "PartitionHeader config_mpsoc_wrapper.bit.0"
00001240 Len: 00000040 Res: 00000000 "PartitionHeader per.elf.0"
00001280 Len: 00000040 Res: 00001580 "PartitionHeader Null"
00002800 Len: 0001c2f0 Res: 00000000 "fsbl.elf.0"
0001eb00 Len: 000161f8 Res: 00000000 "pmufw.elf.0"
00034d00 Len: 00000910 Res: 00000000 "pmufw.elf.1"
00035640 Len: 00000400 Res: 00000000 "pmufw.elf.2"
00035a40 Len: 020d78ec Res: 00000000 "config_mpsoc_wrapper.bit.0"
0210d340 Len: 00019048 Res: 00000000 "per.elf.0"
-- End of Dump

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Visitor lwpeterson
Visitor
73 Views
Registered: ‎10-09-2017

Re: Bootgen 2018.3 ignores pmufw_image option

Jump to solution

Are you able to replicate the problem using my bootgen cmd line and my BIF file?  If so, could Xilinx Engineering recommend a specific syntax that will avoid the problem?  My cmd line and BIF file comply with existing documentation, as of the 2018.3 release.

0 Kudos
Moderator
Moderator
43 Views
Registered: ‎03-19-2014

Re: Bootgen 2018.3 ignores pmufw_image option

Jump to solution

From Development: 

If PMU FW is specified with attribute [pmufw_image], then PMU FW is loaded by BootROM and is not treated as a separate partition. It is appended to the FSBL, and FSBL and PMU FW together will be one single large partition. Hence you will not see the PMU FW in the log.

If PMU FW is specified below like any other partition, then PMU FW is loaded by FSBL and is treated as a separate partition. Hence you can see the PMU FW in the log.

 

Are you not seeing the PMUFW run on boot?

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Visitor lwpeterson
Visitor
27 Views
Registered: ‎10-09-2017

Re: Bootgen 2018.3 ignores pmufw_image option

Jump to solution

Thank you for the additional information. 

For my purposes, I need to secure boot and use of the BootROM to load the PMUFW is not recommended.  I will not be using the [pmufw_image] load option for that reason and due to the unexpected behavior I have observed.  To answer your question, the PMUFW does not appear to be running during boot when my boot.bin is created with [pmufw_image].  Here is the terminal output:

Xilinx Zynq MP First Stage Boot Loader
Release 2018.3   May 14 2019  -  11:31:27
Reset Mode      :       System Reset
Platform: Silicon (4.0), Cluster ID 0x80000000
Running on A53-0 (64-bit) Processor, Device Name: XCZU3EG
Processor Initialization Done
================= In Stage 2 ============
SD0 Boot Mode
SD: rc= 0
File name is BOOT.BIN
Multiboot Reg : 0x0
Image Header Table Offset 0x8C0
*****Image Header Table Details********
Boot Gen Ver: 0x1020000
No of Partitions: 0x2
Partition Header Address: 0x440
Partition Present Device: 0x0
Initialization Success
======= In Stage 3, Partition No:1 =======
UnEncrypted data Length: 0x2C12
Data word offset: 0x2C12
Total Data word length: 0x2C12
Destination Load Address: 0x0
Execution Address: 0x0
Data word offset: 0x72C0
Partition Attributes: 0x112
Partition 1 Load Success
All Partitions Loaded
================= In Stage 4 ============
PMU-FW is not running, certain applications may not be supported.
Protection configuration applied
Running Cpu Handoff address: 0x0, Exec State: 0
Exit from FSBL
Status:00000000

0 Kudos
Moderator
Moderator
19 Views
Registered: ‎03-19-2014

Re: Bootgen 2018.3 ignores pmufw_image option

Jump to solution

In my test case, PMUFW was loaded by the bootROM correctly

Bif w/ PMUFW - boot.bin rougly 250 kB

//arch = zynqmp; split = false; format = BIN
the_ROM_image:
{
[fsbl_config]a53_x64
[pmufw_image]C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\pmufw\Debug\pmufw.elf
[bootloader]C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\fsbl\Debug\fsbl.elf

//[destination_device = pl]C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\config_mpsoc_wrapper_hw_platform_0\config_mpsoc_wrapper.bit
//[destination_cpu = a53-0]C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\per\Debug\per.elf
}

PMUFW loaded by bootROM

Xilinx Zynq MP First Stage Boot Loader
Release 2018.3 May 20 2019 - 07:29:13
Reset Mode : System Reset
Platform: Silicon (4.0), Cluster ID 0x80000000
Running on A53-0 (64-bit) Processor, Device Name: XCZUUNKNEG
FMC VADJ Configuration Successful
Board Configuration successful
Processor Initialization Done
================= In Stage 2 ============
SD1 with level shifter Boot Mode
SD: rc= 0
File name is BOOT.BIN
Multiboot Reg : 0x0
Image Header Table Offset 0x8C0
*****Image Header Table Details********
Boot Gen Ver: 0x1020000
No of Partitions: 0x3
Partition Header Address: 0x440
Partition Present Device: 0x0
Initialization Success
======= In Stage 3, Partition No:1 =======
UnEncrypted data Length: 0x835E3B
Data word offset: 0x835E3B
Total Data word length: 0x835E3B
Destination Load Address: 0xFFFFFFFF
Execution Address: 0x0
Data word offset: 0xF980
Partition Attributes: 0x26
Destination Device is PL, changing LoadAddress
Non authenticated Bitstream download to start now
DMA transfer done
PL Configuration done successfully
Partition 1 Load Success
======= In Stage 3, Partition No:2 =======
UnEncrypted data Length: 0x6412
Data word offset: 0x6412
Total Data word length: 0x6412
Destination Load Address: 0x0
Execution Address: 0x0
Data word offset: 0x8457C0
Partition Attributes: 0x116
Partition 2 Load Success
All Partitions Loaded
================= In Stage 4 ============
PM Init Success
Protection configuration applied
Running Cpu Handoff address: 0x0, Exec State: 0
Exit from FSBL


+++++++++++++++++++++++++++++++

bif w/o pmufw - boot.bin roughly 123 kB

//arch = zynqmp; split = false; format = BIN
the_ROM_image:
{
[fsbl_config]a53_x64
//[pmufw_image]C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\pmufw\Debug\pmufw.elf
[bootloader]C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\fsbl\Debug\fsbl.elf

//[destination_device = pl]C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\config_mpsoc_wrapper_hw_platform_0\config_mpsoc_wrapper.bit
//[destination_cpu = a53-0]C:\cases\zcu111\2018.3\base\project_1\project_1.sdk\per\Debug\per.elf
}

no pmufw


Xilinx Zynq MP First Stage Boot Loader
Release 2018.3 May 20 2019 - 07:29:13
Reset Mode : System Reset
Platform: Silicon (4.0), Cluster ID 0x80000000
Running on A53-0 (64-bit) Processor, Device Name: XCZUUNKNEG
FMC VADJ Configuration Successful
Board Configuration successful
Processor Initialization Done
================= In Stage 2 ============
SD1 with level shifter Boot Mode
SD: rc= 0
File name is BOOT.BIN
Multiboot Reg : 0x0
Image Header Table Offset 0x8C0
*****Image Header Table Details********
Boot Gen Ver: 0x1020000
No of Partitions: 0x3
Partition Header Address: 0x440
Partition Present Device: 0x0
Initialization Success
======= In Stage 3, Partition No:1 =======
UnEncrypted data Length: 0x835E3B
Data word offset: 0x835E3B
Total Data word length: 0x835E3B
Destination Load Address: 0xFFFFFFFF
Execution Address: 0x0
Data word offset: 0x7AC0
Partition Attributes: 0x26
Destination Device is PL, changing LoadAddress
Non authenticated Bitstream download to start now
DMA transfer done
PL Configuration done successfully
Partition 1 Load Success
======= In Stage 3, Partition No:2 =======
UnEncrypted data Length: 0x6412
Data word offset: 0x6412
Total Data word length: 0x6412
Destination Load Address: 0x0
Execution Address: 0x0
Data word offset: 0x83D900
Partition Attributes: 0x116
Partition 2 Load Success
All Partitions Loaded
================= In Stage 4 ============
PMU-FW is not running, certain applications may not be supported.
Protection configuration applied
Running Cpu Handoff address: 0x0, Exec State: 0
Exit from FSBL

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos