blocks - 2024.1 English

Vitis Unified Software Platform Documentation: Embedded Software Development (UG1400)

Document ID
UG1400
Release Date
2024-05-30
Version
2024.1 English

Syntax

  • For Zynq devices and Zynq UltraScale+ MPSoC:
                                                      
    [blocks = <size><num>;<size><num>;...;<size><*>] <partition> 
    
  • For Versal adaptive SoC:
    { blocks = <size><num>;...;<size><*>, file=<partition> }

Description

Specify block sizes for key-rolling feature in encryption. Each module is encrypted using its own unique key. The initial key is stored at the key source on the device, while keys for each successive module are encrypted (wrapped) in the previous module.

Arguments

<size>
Specifies the size of blocks (in bytes).

Example

  • For AMD Zynq™ UltraScale+™ MPSoC:
    Sample BIF - test.bif                                          
    all:
    {
    	[keysrc_encryption] bbram_red_key
    	[bootloader,encryption=aes, aeskeyfile=encr.nky, 
    	destination_cpu=a53-0,blocks=4096(2);1024;2048(2);4096(*)]
    	fsbl.elf
    }
  • For Versal adaptive SoC:
    all:
    {
    	id_code = 0x04ca8093
    	extended_id_code = 0x01
    	id = 0x2
    
    	metaheader
    	{
    		encryption = aes,
    		keysrc = bbram_red_key,
    		aeskeyfile = efuse_red_metaheader_key.nky,
    		dpacm_enable
    	}
    
    	image
    	{
    		name = pmc_subsys, id = 0x1c000001
    		partition
    		{
    			id = 0x01, type = bootloader,
    			encryption = aes,
    			keysrc = bbram_red_key,
    			aeskeyfile = bbram_red_key.nky,
    			dpacm_enable,
    			blocks = 4096(2);1024;2048(2);4096(*),
    			file = plm.elf
    		}
    		partition
    		{
    			id = 0x09, type = pmcdata, load = 0xf2000000,
    			aeskeyfile = pmcdata.nky,
    			file = pmc_data.cdo
    		}
    	}
    
    	image
    	{
    		name = lpd, id = 0x4210002
    		partition
    		{
    			id = 0x0C, type = cdo,
    			encryption = aes,
    			keysrc = bbram_red_key,
    			aeskeyfile = key1.nky,
    			dpacm_enable,
    			blocks = 8192(20);4096(*),
    			file = lpd_data.cdo
    		}
    		partition
    		{
    			id = 0x0B, core = psm,
    			encryption = aes,
    			keysrc = bbram_red_key,
    			aeskeyfile = key2.nky,
    			dpacm_enable,
    			blocks = 4096(2);1024;2048(2);4096(*),
    			file = psm_fw.elf
    		}
    	}
    
    	image
    	{
    		name = fpd, id = 0x420c003
    		partition
    		{
    			id = 0x08, type = cdo,
    			encryption = aes,
    			keysrc = bbram_red_key,
    			aeskeyfile = key5.nky,
    			dpacm_enable,
    			blocks = 8192(20);4096(*),
    			file = fpd_data.cdo
    		}
    	}
    }
Note: In the above example, the first two blocks are of 4096 bytes, followed by a block of 1024 bytes, and then the next two blocks are of 2048 bytes. The rest of the blocks are of 4096 bytes.