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: 
Visitor blood
Visitor
9,995 Views
Registered: ‎03-30-2016

Zynq mysterious 8 byte partition

Hi all, first post here. I am trying to figure out what is the purpose of the 8 byte long partition that is part of the program image when constructing a boot image with bootgen.  There seems to be nothing about that in the docs that I have found.  Also, I have noticed that when including a second image, (cor core1 for example) sometimes I get a 8-byte partition for that image and sometimes I do not. Can anyone shed some light on this. I am writing code to reformat the boot image in the flash device by moving partitions around etc.

0 Kudos
3 Replies
Scholar austin
Scholar
9,972 Views
Registered: ‎02-27-2008

Re: Zynq mysterious 8 byte partition

b,

 

It appears (to me) that this is related to "tag values," in the "tag file," and used by ARM to control linking and loading (formatting of ELF files).

 

8 bytes seems to be a default, and perhaps someone can explain why that is, as I do not seem to see the reason.

 

 

Austin Lesea
Principal Engineer
Xilinx San Jose
0 Kudos
Visitor blood
Visitor
9,735 Views
Registered: ‎03-30-2016

Re: Zynq mysterious 8 byte partition

Well, someone at Xilinx (probably whoever wrote bootgen went to a lot of trouble to create images with this extra 8 byte partition. This really complicates the task of moving images around in the boot device, and dealing with firmware updates. It is impossible to know if we need to deal with these files changing from build to build, or if it is safe to just assume they will be the same. In addition, It is not clear if these are even needed at all. To make matters worse, I have seen these 8-byte files get generated at one point in development, and then later on, not be present. For example, I was adding a core1 executable, and initially it was being generated with it's own 8-byte partition in addition to the one associated with core-0. One day, for no apparent reason, the core-1 executable started to be generated without the 8-byte partition.  I feel a bit uncomfortable not knowing what is going on with this.  Regards.

0 Kudos
Visitor blood
Visitor
9,732 Views
Registered: ‎03-30-2016

Re: Zynq mysterious 8 byte partition

Here is a dump of my file system showing the 8-byte partition as partition 1, and a dump of the data in that partition at the bottom.

Any further info would be greatly appreciated.

Thanks.

 

----------------------------------------------------------------------------------------------------
                                     BOOTIMAGE SECTOR 3   INSTANCE 0
----------------------------------------------------------------------------------------------------
Size of BOOTIMAGESECTOR:  65536
Size of BOOTIMAGE:        32768
----------------------------------------------------------------------------------------------------
----------------------------------------------------------------
BOOT HEADER
----------------------------------------------------------------
 Start of Boot Header             0x00000000
 Width Detection:                 0x00000020 0xAA995566
 Image Identification:            0x00000024 XNLX
 Encryption Status:               0x00000028 0
 User Defined Word:               0x0000002C 0x01010000
 Source Offset:                   0x00000030 0x00001700 Offset 5888 Sector 3 Remain 5888
 Length of Image:                 0x00000034 98316 Bytes     Requires 2 Sector(s)
 Reserved 1:                      0x00000038 0
 Start of Execution:              0x0000003C 0x00000000
 Total Image Length:              0x00000040 98316
 Reserved 2:                      0x00000044 1
 Header Checksum:                 0x00000048 0xFC164528 Calculated Checksum: [0xFC164528] OK
 User Defined 84 bytes
 Register Init 2048 bytes
 Reserved 32 bytes (next field starts at 0x8C0)
----------------------------------------------------------------
IMAGE HEADER TABLE
----------------------------------------------------------------
----------------------------------------------------------------
IMAGE HEADER TABLE HEADER
----------------------------------------------------------------
 version:                         0x000008C0 0x01020000
 image_header_count:              0x000008C4 0x00000004
 word_offset_2_part_hdr:          0x000008C8 0x00000320 byte offset:[0x00000C80]
 word_offset_2_first_image_hdr:   0x000008CC 0x00000240 byte offset:[0x00000900]
 word_offset_2_hdr_auth:          0x000008D0 0x00000000
----------------------------------------------------------------------------------------------------
IMAGE HEADER TABLE ENTRY 0
----------------------------------------------------------------------------------------------------
 next_header_offset:              0x00000900 0x00000250 byte offset:[0x00000940]
 firstpartitionheaderwordoffset:  0x00000904 0x00000320 byte offset:[0x00000C80]
 always 0:                        0x00000908 0x00000000
 actual partition count:          0x0000090C 0x00000001
 Image Name:                      0x00000910 MicroZed_FSBL.elf
----------------------------------------------------------------------------------------------------
IMAGE HEADER TABLE ENTRY 1
----------------------------------------------------------------------------------------------------
 next_header_offset:              0x00000940 0x00000260 byte offset:[0x00000980]
 firstpartitionheaderwordoffset:  0x00000944 0x00000330 byte offset:[0x00000CC0]
 always 0:                        0x00000948 0x00000000
 actual partition count:          0x0000094C 0x00000002
 Image Name:                      0x00000950 RTOSDemo.elf
----------------------------------------------------------------------------------------------------
IMAGE HEADER TABLE ENTRY 2
----------------------------------------------------------------------------------------------------
 next_header_offset:              0x00000980 0x00000000 byte offset:[0x00000000]
 firstpartitionheaderwordoffset:  0x00000984 0x00000350 byte offset:[0x00000D40]
 always 0:                        0x00000988 0x00000000
 actual partition count:          0x0000098C 0x00000001
 Image Name:                      0x00000990 CORE1_App.elf
----------------------------------------------------------------------------------------------------
IMAGE HEADER TABLE ENTRY 3
----------------------------------------------------------------------------------------------------
 next_header_offset:              0x000009C0 0xFFFFFFFF byte offset:[0xFFFFFFFC]
 firstpartitionheaderwordoffset:  0x000009C4 0xFFFFFFFF byte offset:[0xFFFFFFFC]
 always 0:                        0x000009C8 0xFFFFFFFF
 actual partition count:          0x000009CC 0xFFFFFFFF
 Image Name:                      0x000009D0 END OF IMAGES
----------------------------------------
print_PARTITIONHEADER_table Partition header table located at: [0x04ECFC20])
----------------------------------------
size of partition header=0x      40
----------------------------------------------------------------------------------------------------
PARTITION HEADER (0)
----------------------------------------------------------------------------------------------------
 partition_data_word_length:      0x00000C80 0x00006003 Decimal length :   98316 Bytes
 extracted_data_word_length:      0x00000C84 0x00006003 Decimal length :   98316 Bytes
 DRS_words_avail                  0x00000CB8 0x00000000 Space Available:       0 Bytes Sectors:0
 total_partition_word_length:     0x00000C88 0x00006003 Space Used     : 2 Sectors
 destination_load_address:        0x00000C8C 0x00000000
 destination_execution_address:   0x00000C90 0x00000000
 data_word_offset_in_image:       0x00000C94 0x000005C0 0x00001700 5888 Bytes   Sector 3  Remain 5888
  end of data in image:                      0x000065C3 0x0001970C
 attribute_bits:                  0x00000C98 0x00000010
  tail_alignment:                            0x00000000
  head_alignment:                            0x00000000
  destination_device:                        0x00000001 PS
  destination_instance:                      0x00000000
  checksum type:                             0x00000000
  rsa_sig_present:                           0x00000000
  partition_owner:                           0x00000000 FSBL
 section_count:                   0x00000C9C 0x00000001
 checksum_word_offset:            0x00000CA0 0x00000000 No Checksum Provided
 image_header_word_offset:        0x00000CA4 0x00000240 Offset into Flash 0x00000900
 authentication_cert_word_offset: 0x00000CA8 0x00000000
 header checksum:                 0x00000CBC 0xFFFED7E5 Partitionheader checksum: [0xFFFED7E5] OK
----------------------------------------------------------------------------------------------------
PARTITION HEADER (1)
----------------------------------------------------------------------------------------------------
 partition_data_word_length:      0x00000CC0 0x00000002 Decimal length :       8 Bytes
 extracted_data_word_length:      0x00000CC4 0x00000002 Decimal length :       8 Bytes
 DRS_words_avail                  0x00000CF8 0x00000000 Space Available:       0 Bytes Sectors:0
 total_partition_word_length:     0x00000CC8 0x00000002 Space Used     : 1 Sectors
 destination_load_address:        0x00000CCC 0x0408C000
 destination_execution_address:   0x00000CD0 0x040000B0
 data_word_offset_in_image:       0x00000CD4 0x000065D0 0x00019740 104256 Bytes   Sector 4  Remain 38720
  end of data in image:                      0x000065D2 0x00019748
 attribute_bits:                  0x00000CD8 0x00001010
  tail_alignment:                            0x00000000
  head_alignment:                            0x00000000
  destination_device:                        0x00000001 PS
  destination_instance:                      0x00000000
  checksum type:                             0x00000001
  rsa_sig_present:                           0x00000000
  partition_owner:                           0x00000000 FSBL
 section_count:                   0x00000CDC 0x00000002
 checksum_word_offset:            0x00000CE0 0x0002C600 Offset into Image 0x000B1800 Offset into Flash 0x000E1800
  Checksum Data:                                        14 A8 AE 1F 54 68 7E 2D 2E E8 33 1B 65 DC D1 73
 image_header_word_offset:        0x00000CE4 0x00000250 Offset into Flash 0x00000940
 authentication_cert_word_offset: 0x00000CE8 0x00000000
 header checksum:                 0x00000CFC 0xF7F40117 Partitionheader checksum: [0xF7F40117] OK
----------------------------------------------------------------------------------------------------
PARTITION HEADER (2)
----------------------------------------------------------------------------------------------------
 partition_data_word_length:      0x00000D00 0x00023005 Decimal length :  573460 Bytes
 extracted_data_word_length:      0x00000D04 0x00023005 Decimal length :  573460 Bytes
 DRS_words_avail                  0x00000D38 0x00000000 Space Available:       0 Bytes Sectors:0
 total_partition_word_length:     0x00000D08 0x00023005 Space Used     : 9 Sectors
 destination_load_address:        0x00000D0C 0x04000000
 destination_execution_address:   0x00000D10 0x00000000
 data_word_offset_in_image:       0x00000D14 0x000065E0 0x00019780 104320 Bytes   Sector 4  Remain 38784
  end of data in image:                      0x000295E5 0x000A5794
 attribute_bits:                  0x00000D18 0x00001010
  tail_alignment:                            0x00000000
  head_alignment:                            0x00000000
  destination_device:                        0x00000001 PS
  destination_instance:                      0x00000000
  checksum type:                             0x00000001
  rsa_sig_present:                           0x00000000
  partition_owner:                           0x00000000 FSBL
 section_count:                   0x00000D1C 0x00000000
 checksum_word_offset:            0x00000D20 0x0002C610 Offset into Image 0x000B1840 Offset into Flash 0x000E1840
  Checksum Data:                                        D0 6E A6 7D FF A7 03 53 F2 3A 6E DA FC A3 3B 00
 image_header_word_offset:        0x00000D24 0x00000250 Offset into Flash 0x00000940
 authentication_cert_word_offset: 0x00000D28 0x00000000
 header checksum:                 0x00000D3C 0xFBF631A0 Partitionheader checksum: [0xFBF631A0] OK
----------------------------------------------------------------------------------------------------
PARTITION HEADER (3)
----------------------------------------------------------------------------------------------------
 partition_data_word_length:      0x00000D40 0x00003003 Decimal length :   49164 Bytes
 extracted_data_word_length:      0x00000D44 0x00003003 Decimal length :   49164 Bytes
 DRS_words_avail                  0x00000D78 0x00000000 Space Available:       0 Bytes Sectors:0
 total_partition_word_length:     0x00000D48 0x00003003 Space Used     : 1 Sectors
 destination_load_address:        0x00000D4C 0x08000000
 destination_execution_address:   0x00000D50 0x08000000
 data_word_offset_in_image:       0x00000D54 0x000295F0 0x000A57C0 677824 Bytes   Sector 13  Remain 22464
  end of data in image:                      0x0002C5F3 0x000B17CC
 attribute_bits:                  0x00000D58 0x00001010
  tail_alignment:                            0x00000000
  head_alignment:                            0x00000000
  destination_device:                        0x00000001 PS
  destination_instance:                      0x00000000
  checksum type:                             0x00000001
  rsa_sig_present:                           0x00000000
  partition_owner:                           0x00000000 FSBL
 section_count:                   0x00000D5C 0x00000001
 checksum_word_offset:            0x00000D60 0x0002C620 Offset into Image 0x000B1880 Offset into Flash 0x000E1880
  Checksum Data:                                        3B 97 FB A4 82 75 5A 98 5E 01 36 F9 9C 96 43 EC
 image_header_word_offset:        0x00000D64 0x00000260 Offset into Flash 0x00000980
 authentication_cert_word_offset: 0x00000D68 0x00000000
 header checksum:                 0x00000D7C 0xEFFA0175 Partitionheader checksum: [0xEFFA0175] OK
---------------------------------------------------------------------------------------------------------------------
DRS ZYNQ DEBUGGER: Uptime:    64325 Seconds BUILD:Apr  4 2016 TIME:17:13:04  Enter ? for help
---------------------------------------------------------------------------------------------------------------------
Command:  par p 3 0 1
dump_partition_hex() BootSector:3 BootBlock:0 Partition:1
 Relative Offset of partition = 0x00019740
 Flash Offset of partition    = 0x00049740
 Length of partition          = 0x00000008 bytes  8 (decimal)
 Required Sectors           =0x1
--------------------------------------------------------------------------
Un-Named Buffer
--------------------------------------------------------------------------
00000008  DC 23 FD 7F 01 00 00 00 FF FF FF FF FF FF FF FF .#............
00000018  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................
00000028  FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ................

0 Kudos